[ I don't use crossdev as I'm paludis user, so have to create an environment by hands ] I have overlay of the following structure: cross-i686-pc-mingw32/binutils -> /usr/portage/sys-devel/binutils cross-i686-pc-mingw32/gcc -> /usr/portage/sys-devel/gcc cross-i686-pc-mingw32/gdb -> /usr/portage/sys-devel/gdb cross-i686-pc-mingw32/mingw-runtime -> /usr/portage/dev-util/mingw-runtime cross-i686-pc-mingw32/w32api -> /usr/portage/dev-util/w32api I've successfully merged stage1: - USE=headers-only cross/w32api - ok - cross/binutils - ok - USE="-* nocxx" cross/gcc - ok Failed at stage2: - cross/w32api - ok - cross/mingw-runtime - failure: The failure snippet: i686-pc-mingw32-gcc -B./ -shared -Wl,--image-base,0x6FBC0000 -Wl,--entry,_DllMainCRTStartup@12 mthr.o mthr_init.o mingwthrd.de f -Lmingwex -o mingwm10.dll /usr/libexec/gcc/i686-pc-mingw32/ld:: cannot find -luser32 After a little investigation I think I've found out the problem: w32api is installed to --libdir=.../lib64 on 64bit host: $ equery f w32api | grep user32 /usr/i686-pc-mingw32/usr/lib64/libuser32.a Full build log and a patch are to be attached soon.
Created attachment 255139 [details] mingw-runtime-failure-build.log
Created attachment 255143 [details] w32api-3.14.ebuild.patch fixes only 3.14 part, but should be applied 3.13 and 3.15 as well user32 is installed to proper place after patch: /usr/i686-pc-mingw32/usr/lib/libuser32.a and mingw-runtime does not fail. My patch looks quite hackish. Similar problem should bite mingw64-runtime (when build mingw64 on x86). Something more general, based on $CHOST/$CTARGET in econf (or get_libdir) itself might be better. What do you think?
Created attachment 255145 [details] mingw-runtime-3.18.ebuild.patch - amends --libdir path And the same disease with mingw-runtime. It prevents cross/gcc from being built: /usr/libexec/gcc/i686-pc-mingw32/ranlib libgcc.a /usr/libexec/gcc/i686-pc-mingw32/ld: dllcrt2.o: No such file: No such file or directory Contents of cross-i686-pc-mingw32/mingw-runtime-3.18 before the patch: /usr/i686-pc-mingw32/usr/lib64/dllcrt2.o and after: /usr/i686-pc-mingw32/usr/lib/dllcrt2.o
*** This bug has been marked as a duplicate of bug 261070 ***