Fwd: [PATCH] Cygport: generate object files into {B} instead of ${S}/*_w64-mingw32

Jon Turney jon.turney@dronecode.org.uk
Mon Mar 17 22:26:15 GMT 2025


On 17/03/2025 09:02, Carlo B. via Cygwin-apps wrote:
> Hello,
> sorry for the delay to your message.
> Unfortunately, you are right, the debuginfo package is not created
> correctly after my patch.
> So, the correction that I had sent was not good.

I have some hope that this might work with gcc 13 and 
'-fcanon-prefix-map', which is probably (longer-term) the "right way" to 
fix all this, but I haven't had a chance to test that.

> To explain better the problem, I created a tiny example that you can use.
[...]
> Run-time dependency glib-2.0 found: NO (tried pkgconfig)
> 
> meson.build:10:11: ERROR: Dependency "glib-2.0" not found, tried pkgconfig
> 
> A full log can be found at
> /home/carlo/packages/lv2.src/zix/test/mingw64-x86_64-test_cygport-1.2.3-1.noarch/src/test-1.2.3/x86_64-w64-mingw32/meson-logs/meson-log.txt
> *** ERROR: meson failed
> 
> The error does not happen if we are compiling without using a cross compiler.
> The same package build for CYGWIN instead of MinGW-w64 works fine.
> I don't know why it happens.
> The only way to bypass this issue was to run meson outside ${S} but I
> cannot explain the reason.
> I hope that it will help to find the cause of the problem.

Thanks very much for the simple test case!

This is pretty weird. The meson-log.txt file says that running 
'/usr/bin/x86_64-w64-mingw32-pkg-config --modversion glib-2.0' is 
failing, but that works fine when run from the command line.

After poking at it for a bit, I discovered that the presence of a 
'x86_64-w64-mingw32' directory in the working directory seems to be the 
thing which makes it fail.

(So I'm guessing pkgconf does something like look there, rather than in 
the sysroot, if it exists, although I can't find that documented 
anywhere, and I don't have time to go diving through the source right now)

I guess maybe a fix/workaround would be to change the name of the 
subdirectory used for the meson build from '${CHOST}' to 
'build.${CHOST}' or similar.



More information about the Cygwin-apps mailing list