Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 88725 - non-default location of emul-* libs causes linking problems.
Summary: non-default location of emul-* libs causes linking problems.
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Eclasses (show other bugs)
Hardware: All All
: High normal (vote)
Assignee: AMD64 Project
URL:
Whiteboard:
Keywords:
: 81082 85661 89598 wine_and_x11drv (view as bug list)
Depends on:
Blocks:
 
Reported: 2005-04-11 07:45 UTC by Herbie Hopkins (RETIRED)
Modified: 2007-02-20 09:14 UTC (History)
9 users (show)

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


Attachments
set CC in wine ebuild (wine-cc.patch,310 bytes, patch)
2005-04-11 07:58 UTC, Herbie Hopkins (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Herbie Hopkins (RETIRED) gentoo-dev 2005-04-11 07:45:30 UTC
The non-default location of our 32bit emul-* libs on amd64 causes linking problems when compiling 32bit applications. For example, see app-emulation/wine and games-emulation/zsnes. I therefore suggest adding:
-L/emul/linux/x86/lib -L/emul/linux/x86/usr/lib
to both CFLAGS_x86 and LDFLAGS_x86 in 2005.0/make.profile.
Comment 1 Herbie Hopkins (RETIRED) gentoo-dev 2005-04-11 07:47:17 UTC
*** Bug 81082 has been marked as a duplicate of this bug. ***
Comment 2 Herbie Hopkins (RETIRED) gentoo-dev 2005-04-11 07:48:11 UTC
*** Bug 85661 has been marked as a duplicate of this bug. ***
Comment 3 Herbie Hopkins (RETIRED) gentoo-dev 2005-04-11 07:58:35 UTC
Created attachment 55988 [details, diff]
set CC in wine ebuild

The above change seems to enable successful compilation of zsnes without
further modification. Unfortunately wine tries to be clever and sets CC="gcc
-m32" itself and thus overrides our CFLAGS_x86. This small patch sets the
compiler to use our gcc wrapper and together with the aforementioned profile
change enables successful compilation of wine.

SpanKY: is this approach to your satisfaction?
Comment 4 SpanKY gentoo-dev 2005-04-11 08:17:43 UTC
forcing CC to $(tc-getCC) is ok

forcing -L/emul/ paths in ebuilds is NOT ok which is what this bug should solve
Comment 5 Herbie Hopkins (RETIRED) gentoo-dev 2005-04-11 09:24:20 UTC
Agreed, which is exactly why I'm suggesting this be set in 2005.0/make.defaults so that ebuilds can simply set ABI=x86 and the gcc wrapper can handle the rest.
Comment 6 Amedee Van Gasse 2005-04-11 13:34:51 UTC
There is some... uh... improvement when I apply this patch, because now I get a different error:

make[2]: Entering directory `/var/tmp/portage/wine-20050310/work/wine-20050310/dlls/secur32'
x86_64-pc-linux-gnu-gcc -c -I. -I. -I../../include -I../../include  -D__WINESRC__ -DWINE_NO_DEBUG_MSGS -DWINE_NO_TRACE_MSGS  -D_REENTRANT -fP
IC -Wall -pipe -mpreferred-stack-boundary=2 -fno-strict-aliasing -gstabs+ -Wpointer-arith  -march=athlon64 -O2 -pipe -o secur32.o secur32.c
../../tools/winebuild/winebuild -D__WINESRC__ -DWINE_NO_DEBUG_MSGS -DWINE_NO_TRACE_MSGS -DCOM_NO_WINDOWS_H -o rsaenh.dll.dbg.c --debug -C. de
s.c handle.c implglue.c md2.c mpi.c rc2.c rc4.c rsa.c rsaenh.c
make[3]: Entering directory `/var/tmp/portage/wine-20050310/work/wine-20050310/dlls/rsaenh/tests'
x86_64-pc-linux-gnu-gcc -c -I. -I. -I../../../include -I../../../include  -DWINE_NO_DEBUG_MSGS -DWINE_NO_TRACE_MSGS  -D_REENTRANT -fPIC -Wall
 -pipe -mpreferred-stack-boundary=2 -fno-strict-aliasing -gstabs+ -Wpointer-arith  -march=athlon64 -O2 -pipe -o rsaenh.o rsaenh.c
x86_64-pc-linux-gnu-gcc -c -I. -I. -I../../include -I../../include  -D__WINESRC__ -DWINE_NO_DEBUG_MSGS -DWINE_NO_TRACE_MSGS  -D_REENTRANT -fP
IC -Wall -pipe -mpreferred-stack-boundary=2 -fno-strict-aliasing -gstabs+ -Wpointer-arith  -march=athlon64 -O2 -pipe -o thunks.o thunks.c
x86_64-pc-linux-gnu-gcc -c -I. -I. -I../../include -I../../include  -D__WINESRC__ -DWINE_NO_DEBUG_MSGS -DWINE_NO_TRACE_MSGS  -D_REENTRANT -fP
IC -Wall -pipe -mpreferred-stack-boundary=2 -fno-strict-aliasing -gstabs+ -Wpointer-arith  -march=athlon64 -O2 -pipe -o wrapper.o wrapper.c
../../tools/winebuild/winebuild -D__WINESRC__ -DWINE_NO_DEBUG_MSGS -DWINE_NO_TRACE_MSGS  -o secur32.dll.dbg.c --debug -C. secur32.c thunks.c
wrapper.c
x86_64-pc-linux-gnu-gcc -c -I. -I. -I../../include -I../../include  -D__WINESRC__ -DWINE_NO_DEBUG_MSGS -DWINE_NO_TRACE_MSGS  -D_REENTRANT -fP
IC -Wall -pipe -mpreferred-stack-boundary=2 -fno-strict-aliasing -gstabs+ -Wpointer-arith  -march=athlon64 -O2 -pipe -o secur32.dll.dbg.o sec
ur32.dll.dbg.c
../../tools/winegcc/winegcc -B../../tools/winebuild -shared ./secur32.spec    secur32.o thunks.o wrapper.o  secur32.dll.dbg.o   -o secur32.dl
l.so -L../../dlls  -luser32 -ladvapi32 -lkernel32 -lntdll -L../../libs/wine -lwine  -L../../libs/port -lwine_port -Wl,-O1
make[2]: Leaving directory `/var/tmp/portage/wine-20050310/work/wine-20050310/dlls/secur32'
make[2]: Entering directory `/var/tmp/portage/wine-20050310/work/wine-20050310/dlls/sensapi'
x86_64-pc-linux-gnu-gcc -c -I. -I. -I../../include -I../../include  -D__WINESRC__ -DWINE_NO_DEBUG_MSGS -DWINE_NO_TRACE_MSGS  -D_REENTRANT -fP
IC -Wall -pipe -mpreferred-stack-boundary=2 -fno-strict-aliasing -gstabs+ -Wpointer-arith  -march=athlon64 -O2 -pipe -o sensapi.o sensapi.c
In file included from ../../include/ole2.h:27,
                 from sensapi.c:36:
../../include/oleidl.h:1653: error: parse-fout before "H"
../../include/oleidl.h:1653: let op: geen puntkomma aan het einde van een struct of union
../../include/oleidl.h:1653: error: stray '\18' in program
../../include/oleidl.h:1664: error: parse-fout before '}' token
make[2]: *** [sensapi.o] Error 1
make[2]: Leaving directory `/var/tmp/portage/wine-20050310/work/wine-20050310/dlls/sensapi'
make[1]: *** [sensapi] Error 2
make[1]: *** Waiting for unfinished jobs....
x86_64-pc-linux-gnu-gcc -c -I. -I. -I../../../include -I../../../include  -DWINE_NO_DEBUG_MSGS -DWINE_NO_TRACE_MSGS  -D_REENTRANT -fPIC -Wall         -pipe -mpreferred-stack-boundary=2 -fno-strict-aliasing -gstabs+ -Wpointer-arith  -march=athlon64 -O2 -pipe -o testlist.o testlist.c
../../../tools/winegcc/winegcc -B../../../tools/winebuild -mconsole rsaenh.o testlist.o  -o rsaenh_test.exe.so -L../../../libs/port -lwine_po        rt -L../../../dlls -L../../../libs -ladvapi32 -lkernel32  -Wl,-O1
make[3]: Leaving directory `/var/tmp/portage/wine-20050310/work/wine-20050310/dlls/rsaenh/tests'
x86_64-pc-linux-gnu-gcc -c -I. -I. -I../../include -I../../include  -D__WINESRC__ -DWINE_NO_DEBUG_MSGS -DWINE_NO_TRACE_MSGS -DCOM_NO_WINDOWS_        H -D_REENTRANT -fPIC -Wall -pipe -mpreferred-stack-boundary=2 -fno-strict-aliasing -gstabs+ -Wpointer-arith  -march=athlon64 -O2 -pipe -o rsa        enh.dll.dbg.o rsaenh.dll.dbg.c
../../tools/winegcc/winegcc -B../../tools/winebuild -shared ./rsaenh.spec    des.o handle.o implglue.o md2.o mpi.o rc2.o rc4.o rsa.o rsaenh.o          rsaenh.dll.dbg.o   -o rsaenh.dll.so -L../../dlls  -ladvapi32 -lkernel32 -L../../libs/wine -lwine  -L../../libs/port -lwine_port -Wl,-O1
make[2]: Leaving directory `/var/tmp/portage/wine-20050310/work/wine-20050310/dlls/rsaenh'
make[1]: Leaving directory `/var/tmp/portage/wine-20050310/work/wine-20050310/dlls'
make: *** [dlls] Error 2

!!! ERROR: app-emulation/wine-20050310 failed.
!!! Function src_compile, Line 108, Exitcode 2
!!! all
!!! If you need support, post the topmost build error, NOT this status message.

emerge info

Portage 2.0.51.19 (default-linux/amd64/2005.0, gcc-3.4.3-20050110, glibc-2.3.4.20050125-r1, 2.6.12-rc1-mm3 x86_64)
=================================================================
System uname: 2.6.12-rc1-mm3 x86_64 AMD Athlon(tm) 64 Processor 3000+
Gentoo Base System version 1.6.10
Python:              dev-lang/python-2.3.5 [2.3.5 (#1, Mar  5 2005, 14:41:15)]
distcc 2.18.3 x86_64-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled]
ccache version 2.4 [enabled]
dev-lang/python:     2.3.5
sys-devel/autoconf:  2.59-r6, 2.13
sys-devel/automake:  1.7.9-r1, 1.8.5-r3, 1.5, 1.4_p6, 1.6.3, 1.9.5
sys-devel/binutils:  2.15.92.0.2-r8
sys-devel/libtool:   1.5.14
virtual/os-headers:  2.6.8.1-r4
ACCEPT_KEYWORDS="amd64 ~amd64"
AUTOCLEAN="yes"
CFLAGS="-march=athlon64 -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.3/env /usr/kde/3.3/share/config /usr/kde/3.3/shutdown /usr/kde/3.4/env /usr/kde/3.4/share/config /usr/kde/3.4/shutdown /usr/kde/3/share/config /usr/lib/X11/xkb /usr/lib/mozilla/defaults/pref /usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/texmf/web2c /etc/env.d"
CXXFLAGS="-march=athlon64 -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs autoconfig ccache distlocks fixpackages"
GENTOO_MIRRORS="http://ftp.belnet.be/mirror/rsync.gentoo.org/gentoo/ http://ftp.snt.utwente.nl/pub/os/linux/gentoo ftp://ftp.belnet.be/mirror/rsync.gentoo.org/gentoo/ ftp://ftp.snt.utwente.nl/pub/os/linux/gentoo"
LANG="nl_BE@euro"
LC_ALL="nl_BE@euro"
LDFLAGS="-Wl,-O1"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.be.gentoo.org/gentoo-portage"
USE="amd64 X Xaw3d aalib acpi alsa apache2 arts avi bash-completion berkdb bitmap-fonts cdr crypt cups curl doc dvd dvdr esd fam flac flash font-server fortran gd gdbm geoip gif gnome gpm gstreamer gtk gtk2 gtkhtml guile hal imagemagick imlib innodb java javascript jp2 jpeg kde kdeenablefinal kdexdeltas libcaca libwww lm_sensors lzw lzw-tiff mad maildir motif mozilla mp3 mpeg mysql ncurses neXt nls nvidia offensive oggvorbis opengl oss pam pdflib perl php png python qt readline sasl scanner sdl slang snmp spell ssl svg symlink tcltk tcpd tetex tidy tiff truetype truetype-fonts type1-fonts usb userlocales wmf xine xml xml2 xmms xosd xpm xprint xrandr xv zlib linguas_nl"
Unset:  ASFLAGS, CBUILD, CTARGET
Comment 7 Herbie Hopkins (RETIRED) gentoo-dev 2005-04-11 14:00:27 UTC
Amedee: that looks like a completely seperate problem and is probably best dealt with in a seperate bug report.
Comment 8 Herbie Hopkins (RETIRED) gentoo-dev 2005-04-19 04:49:44 UTC
*** Bug 89598 has been marked as a duplicate of this bug. ***
Comment 9 Herbie Hopkins (RETIRED) gentoo-dev 2005-04-19 09:50:40 UTC
I believe the underlying problem here that on amd64 we do not install the pkg-config files for our 32bit libs. So when a package tries to inherit the cflags using pkg-config it only get's -L${libdir} for the 64bit version of the lib. Hopefully we can fix this properly when we get around to 2005.1 and all our 32bit libs compiled locally. I suggest we have a PKG_CONFIG_PATH_${ARCH} defined in our make.defaults and multilib.eclass can export the correct PKG_CONFIG_PATH.

However at present we have at least two packages keyworded that do not compile so I've committed this workaround for now.
Comment 10 Mikko Tiihonen 2005-04-24 22:34:20 UTC
The -L/emul/ trick is no longer enough for me. To compile newer sandbox-1.2.1-r3 I had to add -L/lib32 and -L/usr/lib32 to the CFLAGS_X86 and LDFLAGS_X86.

Without them the compilation fails with cannot find libc.so.6 in /emul

I'm using glibc-2.3.4.20050125-r1 and the dummy emul-linux-x86-glibc-1000 which cause the libc.so.6 to be in /lib32.

I believe the same problem is preventing me to compile glibc 2.3.5 but I have not tested it yet.
Comment 11 SpanKY gentoo-dev 2005-04-26 15:48:38 UTC
*** Bug 90472 has been marked as a duplicate of this bug. ***
Comment 12 Standa 2005-04-26 17:04:29 UTC
Hello, i was told my problem is duplicate of this bug. I tried what is here told and i updated my make.conf and i get this:
../../include/winnls.h:749: warning: `__stdcall__' attribute ignored
../../include/winnls.h:750: warning: `__stdcall__' attribute ignored
../../include/winnls.h:751: warning: `__stdcall__' attribute ignored
../../include/winnls.h:753: warning: `__stdcall__' attribute ignored
../../include/winnls.h:754: warning: `__stdcall__' attribute ignored
../../include/winnls.h:756: warning: `__stdcall__' attribute ignored
../../include/winnls.h:757: warning: `__stdcall__' attribute ignored
../../include/winnls.h:758: warning: `__stdcall__' attribute ignored
{standard input}: Assembler messages:
{standard input}:2082: Error: Incorrect register `%rbx' used with `l' suffix
make[2]: *** [debug.o] Error 1
make[2]: Leaving directory `/var/tmp/portage/wine-20050419/work/wine-20050419/libs/wine'
make[1]: *** [wine] Error 2
make[1]: Leaving directory `/var/tmp/portage/wine-20050419/work/wine-20050419/libs'
make: *** [libs] Error 2

!!! ERROR: app-emulation/wine-20050419 failed.
!!! Function src_compile, Line 106, Exitcode 2
!!! depend
!!! If you need support, post the topmost build error, NOT this status message.

bash-2.05b#

list of  ../../include/winnls.h:758: warning: `__stdcall__' attribute ignored is really really long more than my buffer in xterm.

Standa
Comment 13 Herbie Hopkins (RETIRED) gentoo-dev 2005-06-22 12:56:06 UTC
The workaround seems to work well enough for now. However, this won't be
properly fixed until we have a multilib capable portage and install pkgconfig
files for our 32bit libs. Resolving as LATER for now.
Comment 14 Simon Stelling (RETIRED) gentoo-dev 2007-02-20 09:14:16 UTC
reopen
Comment 15 Simon Stelling (RETIRED) gentoo-dev 2007-02-20 09:14:51 UTC
emul-packages install to default locations now