Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 346469

Summary: dev-util/mingw-runtime-3.18 fails to build on amd64 host (dev-util/w32api-3.14 has incorrect --libdir)
Product: Gentoo Linux Reporter: Sergei Trofimovich (RETIRED) <slyfox>
Component: New packagesAssignee: Gentoo Toolchain Maintainers <toolchain>
Status: RESOLVED DUPLICATE    
Severity: normal    
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: mingw-runtime-failure-build.log
w32api-3.14.ebuild.patch
mingw-runtime-3.18.ebuild.patch - amends --libdir path

Description Sergei Trofimovich (RETIRED) gentoo-dev 2010-11-22 21:52:14 UTC
[ 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.
Comment 1 Sergei Trofimovich (RETIRED) gentoo-dev 2010-11-22 21:52:53 UTC
Created attachment 255139 [details]
mingw-runtime-failure-build.log
Comment 2 Sergei Trofimovich (RETIRED) gentoo-dev 2010-11-22 22:11:01 UTC
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?
Comment 3 Sergei Trofimovich (RETIRED) gentoo-dev 2010-11-22 22:49:57 UTC
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
Comment 4 SpanKY gentoo-dev 2010-11-23 01:56:30 UTC

*** This bug has been marked as a duplicate of bug 261070 ***