Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 346469 - dev-util/mingw-runtime-3.18 fails to build on amd64 host (dev-util/w32api-3.14 has incorrect --libdir)
Summary: dev-util/mingw-runtime-3.18 fails to build on amd64 host (dev-util/w32api-3.1...
Status: RESOLVED DUPLICATE of bug 261070
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Toolchain Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-11-22 21:52 UTC by Sergei Trofimovich (RETIRED)
Modified: 2010-11-23 01:56 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
mingw-runtime-failure-build.log (build.log,85.59 KB, text/plain)
2010-11-22 21:52 UTC, Sergei Trofimovich (RETIRED)
Details
w32api-3.14.ebuild.patch (w32api-3.14.ebuild.patch,353 bytes, text/plain)
2010-11-22 22:11 UTC, Sergei Trofimovich (RETIRED)
Details
mingw-runtime-3.18.ebuild.patch - amends --libdir path (mingw-runtime-3.18.ebuild.patch,359 bytes, text/plain)
2010-11-22 22:49 UTC, Sergei Trofimovich (RETIRED)
Details

Note You need to log in before you can comment on or make changes to this bug.
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 ***