Bug List: (This bug is not in your last search results)   Show last search results      Search page      Enter new bug
Bug#: 103775
Alias:
Product:
Component:
Status: RESOLVED
Resolution: FIXED
Assigned To: AMD64 Project <amd64@gentoo.org>
Hardware:
OS:
Version:
Priority:
Severity:
Reporter: jolt256@hotmail.com
Add CC:
CC:
Remove selected CCs
URL:
Summary:
Status Whiteboard:
Keywords:

Filename Description Type Creator Created Size Actions
snes.patch patch for amd64 build problems patch Robert Ögren 2005-11-05 03:18 0000 762 bytes Details | Diff
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 103775 depends on: Show dependency tree
Bug 103775 blocks:
Votes: 0    Show votes for this bug    Vote for this bug

Additional Comments: (this is where you put emerge --info)


Not eligible to see or edit group visibility for this bug.






View Bug Activity   |   Format For Printing   |   XML   |   Clone This Bug


Description:   Opened: 2005-08-25 17:45 0000
snes9x fails to emerge on amd64, using either X or opengl output, complaining
of
incompatible libX11.so or libGLU.so

Reproducible: Always
Steps to Reproduce:
1. emerge snes9x
2. USE="-opengl" emerge snes9x
3.

Actual Results:  
opengl build:
c++  -fno-rtti -INONE
-I/var/tmp/portage/snes9x-1.43/work/snes9x-1.43-src/snes9x
-I/var/tmp/portage/snes9x-1.43/work/snes9x-1.43-src/snes9x/unzip  -o osnes9x
cpuops.o cpuexec.o sa1cpu.o spc700.o soundux.o apu.o  apudebug.o fxinst.o
fxemu.o fxdbg.o c4.o c4emu.o cpu.o sa1.o debug.o sdd1.o tile.o srtc.o gfx.o
memmap.o clip.o dsp1.o ppu.o dma.o snes9x.o data.o globals.o spc7110.o obc1.o
seta.o seta010.o seta011.o seta018.o 2xsai.o sdd1emu.o cheats.o cheats2.o
unix/unix.o unix/config.o snaporig.o snapshot.o screenshot.o movie.o netplay.o
server.o loadzip.o unzip/unzip.o unzip/explode.o unzip/unreduce.o
unzip/unshrink.o unix/x11.o unix/opengl.o  -lGL -lGLU -ldl  -lnsl   -m32  
-lpthread -lm
/usr/lib/gcc/x86_64-pc-linux-gnu/3.4.3/../../../../x86_64-pc-linux-gnu/bin/ld:
skipping incompatible /usr/lib/gcc/x86_64-pc-linux-gnu/3.4.3/../../../libGLU.so
when searching for -lGLU
/usr/lib/gcc/x86_64-pc-linux-gnu/3.4.3/../../../../x86_64-pc-linux-gnu/bin/ld:
skipping incompatible /usr/lib/gcc/x86_64-pc-linux-gnu/3.4.3/../../../libGLU.a
when searching for -lGLU
/usr/lib/gcc/x86_64-pc-linux-gnu/3.4.3/../../../../x86_64-pc-linux-gnu/bin/ld:
skipping incompatible /usr/lib/libGLU.so when searching for -lGLU
/usr/lib/gcc/x86_64-pc-linux-gnu/3.4.3/../../../../x86_64-pc-linux-gnu/bin/ld:
skipping incompatible /usr/lib/libGLU.a when searching for -lGLU
/usr/lib/gcc/x86_64-pc-linux-gnu/3.4.3/../../../../x86_64-pc-linux-gnu/bin/ld:
cannot find -lGLU
collect2: ld returned 1 exit status
make: *** [osnes9x] Error 1

x11 build:
c++  -fno-rtti -m32  -lX11 -lXext -lpthread 
-I/var/tmp/portage/snes9x-1.43/work/snes9x-1.43-src/snes9x
-I/var/tmp/portage/snes9x-1.43/work/snes9x-1.43-src/snes9x/unzip  -o offsets
offsets.cpp
/usr/lib/gcc/x86_64-pc-linux-gnu/3.4.3/../../../../x86_64-pc-linux-gnu/bin/ld:
skipping incompatible /usr/lib/gcc/x86_64-pc-linux-gnu/3.4.3/../../../libX11.so
when searching for -lX11
/usr/lib/gcc/x86_64-pc-linux-gnu/3.4.3/../../../../x86_64-pc-linux-gnu/bin/ld:
skipping incompatible /usr/lib/gcc/x86_64-pc-linux-gnu/3.4.3/../../../libX11.a
when searching for -lX11
/usr/lib/gcc/x86_64-pc-linux-gnu/3.4.3/../../../../x86_64-pc-linux-gnu/bin/ld:
skipping incompatible /usr/lib/libX11.so when searching for -lX11
/usr/lib/gcc/x86_64-pc-linux-gnu/3.4.3/../../../../x86_64-pc-linux-gnu/bin/ld:
skipping incompatible /usr/lib/libX11.a when searching for -lX11
/usr/lib/gcc/x86_64-pc-linux-gnu/3.4.3/../../../../x86_64-pc-linux-gnu/bin/ld:
cannot find -lX11
collect2: ld returned 1 exit status


Expected Results:  
emerged cleanly

Portage 2.0.51.22-r2 (default-linux/amd64/2005.1, gcc-3.4.3, glibc-2.3.5-r0,
2.6.12-gentoo-r6 x86_64)
=================================================================
System uname: 2.6.12-gentoo-r6 x86_64 AMD Hammer Family processor - Model
Unknown
Gentoo Base System version 1.6.12
dev-lang/python:     2.3.5
sys-apps/sandbox:    1.2.11
sys-devel/autoconf:  2.13, 2.59-r6
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.5
sys-devel/binutils:  2.15.92.0.2-r10
sys-devel/libtool:   1.5.18-r1
virtual/os-headers:  2.6.11-r2
ACCEPT_KEYWORDS="amd64"
AUTOCLEAN="yes"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -march=k8 -pipe -fomit-frame-pointer"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config
/usr/lib/X11/xkb /usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-O2 -march=k8 -pipe -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig distlocks sandbox sfperms strict"
GENTOO_MIRRORS="http://distfiles.gentoo.org
http://distro.ibiblio.org/pub/Linux/distributions/gentoo"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="amd64 X alsa avi berkdb bitmap-fonts crypt cups dvd eds encode esd fam
fftw
flac foomaticdb fortran gif gnome gpm gstreamer gtk gtk2 imlib ipv6 joystick
jpeg kde lirc lzw lzw-tiff mad matroska mp3 mpeg mysql ncurses net nvidia ogg
oggvorbis opengl pam pdflib perl png python qt quicktime readline sdl spell ssl
tcpd theora tiff transcode truetype truetype-fonts type1-fonts usb userlocales
vorbis xinerama xml2 xmms xpm xv xvid zlib userland_GNU kernel_linux
elibc_glibc"
Unset:  ASFLAGS, CTARGET, LANG, LC_ALL, LDFLAGS, LINGUAS, PORTDIR_OVERLAY

------- Comment #1 From SpanKY 2005-08-26 06:27:04 0000 -------
do you have the xlib emul packages emerged ?

------- Comment #2 From SpanKY 2005-08-26 21:25:59 0000 -------
fixed in cvs, added emul libs to DEPEND for amd64

------- Comment #3 From Torsten Kaiser 2005-08-27 11:56:56 0000 -------
I still get the same error with snes9x-1.43-r1 both building the opengl or the
X11 version, but I have emul-linux-x86-xlibs-2.1 installed.

emerge --info:
Portage 2.0.51.22-r2 (default-linux/amd64/2005.1, gcc-3.4.4, glibc-2.3.5-r1,
2.6.12-mm2 x86_64)
=================================================================
System uname: 2.6.12-mm2 x86_64 AMD Athlon(tm) 64 Processor 3200+
Gentoo Base System version 1.6.13
dev-lang/python:     2.3.5
sys-apps/sandbox:    1.2.12
sys-devel/autoconf:  2.13, 2.59-r7
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6
sys-devel/binutils:  2.15.92.0.2-r10
sys-devel/libtool:   1.5.18-r1
virtual/os-headers:  2.6.11-r2
ACCEPT_KEYWORDS="amd64"
AUTOCLEAN="yes"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O3 -pipe -fomit-frame-pointer -march=athlon64"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /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/lib64/mozilla/defaults/pref /usr/share/config
/usr/share/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/
/usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/
/usr/share/texmf/xdvi/ /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-O3 -pipe -fomit-frame-pointer -march=athlon64"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig buildpkg distlocks fixpackages sandbox sfperms strict"
GENTOO_MIRRORS="[removed]"
MAKEOPTS="-j2"
PKGDIR="/var/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/root/ebuilds"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="amd64 X a52 aac acl acpi alsa apache2 arts avi berkdb bitmap-fonts cdr
cross crypt cups curl customlog doc dts dvb dvd dvdr dvdread eds emacs encode
esd ethereal fam ffmpeg flac font-server foomaticdb fortran gcj gd gdbm gif
gnutls gpm gstreamer gtk gtk2 ieee1394 imagemagick imlib ipv6 ithreads java jpeg
junit kde libwww lzo lzw lzw-tiff mad matroska mbox mikmod motif mozcalendar
mozdevelop mozilla mozsvg mozxmlterm mp3 mpeg mysql ncurses nls nptl ogg
oggvorbis opengl pam pda pdflib perl png python qt quicktime readline ruby samba
scanner sdl session slang spell ssl tcltk tcpd tetex theora tiff truetype
truetype-fonts type1-fonts usb userlocales v4l v4l2 vcd vorbis xine xinerama xml
xml2 xmms xpm xv xvid zlib video_cards_radeon userland_GNU kernel_linux elibc_glibc"
Unset:  ASFLAGS, CTARGET, LANG, LC_ALL, LDFLAGS, LINGUAS

genlop -eu emul-linux-x86-xlibs:
 * app-emulation/emul-linux-x86-xlibs

[snip]
     Fri Mar 11 14:03:17 2005 >>> app-emulation/emul-linux-x86-xlibs-1.2-r7
     Mon May 23 20:11:13 2005 <<< app-emulation/emul-linux-x86-xlibs-1.2-r7
     Mon May 23 20:11:14 2005 >>> app-emulation/emul-linux-x86-xlibs-2.1

locate libGLU.so:
/usr/lib/libGLU.so.1.3
/usr/lib/libGLU.so.1
/usr/lib/libGLU.so
/emul/linux/x86/usr/lib/libGLU.so.1.3
/emul/linux/x86/usr/lib/libGLU.so
/emul/linux/x86/usr/lib/libGLU.so.1


I did a quick look into the configure of snes9x, it seems not to look for any of
the opengl libs, just setting a flag.
The Makefile then adds "-lGL -lGLU -ldl" without checking, assuming the libs are
at there default location.
But on amd64 this will only find the x86_64 versions which will fail to link
againts something build with -m32 

------- Comment #4 From Jeff 2005-09-15 01:28:26 0000 -------
Same here, I suggest to reopen the bug

------- Comment #5 From Chris Gianelloni (RETIRED) 2005-09-15 06:28:47 0000 -------
Alright... Anyone have a patch, then?

------- Comment #6 From Torsten Kaiser 2005-09-15 11:56:10 0000 -------
Using the secret trick from bug #104049 I was able to build a 64bit native
snes9x-1.43-r1.

osnes9x still crashes on startup, but with the normal snes9x executable I was
able to get to the startup screen of a game. Then it seems to hang, but is
better than the instant segfaults from the earlier ebuilds. Maybe the rom file
is damaged, but I dont have more time to test this.

So, if you want to build on amd64 you need to set this variable.

As the 32bit build does not work/build at all, should this be done automaticly?

------- Comment #7 From Robert Ögren 2005-11-05 03:17:08 0000 -------
I was able to make it build a 32-bit version on amd64 with some small changes
to
the ebuild. I'm pretty sure there's a better way to do it, but at least it
works. I'll attach a patch.

Note that although it built OK the OpenGL version (osnesx9x) didn't work on the
single game I tried it with. The plain X version (snes9x) seems to work OK so
far.

------- Comment #8 From Robert Ögren 2005-11-05 03:18:37 0000 -------
Created an attachment (id=72163) [details]
patch for amd64 build problems

------- Comment #9 From SpanKY 2005-11-05 13:06:35 0000 -------
(From update of attachment 72163 [details])
yeah, that's def not correct

------- Comment #10 From Robert Ögren 2005-11-06 06:31:11 0000 -------
So, how do you teach gcc to look for libs in the correct place when compiling
with -m32?

$ gcc -print-file-name=libz.so
/usr/lib/gcc/x86_64-pc-linux-gnu/3.4.4/../../../../lib64/libz.so
$ gcc -m32 -print-file-name=libz.so
/usr/lib/gcc/x86_64-pc-linux-gnu/3.4.4/../../../libz.so
$ gcc -print-file-name=libGLU.so
/usr/lib/gcc/x86_64-pc-linux-gnu/3.4.4/../../../../lib64/libGLU.so
$ gcc -m32 -print-file-name=libGLU.so
/usr/lib/gcc/x86_64-pc-linux-gnu/3.4.4/../../../libGLU.so

But /usr/lib64 is just a symlink to /usr/lib so libz.so and libGLU.so above are
64-bit libs AFAICS. libc.a on the other hand:

$ gcc -print-file-name=libc.a
/usr/lib/gcc/x86_64-pc-linux-gnu/3.4.4/../../../../lib64/libc.a
$ gcc -m32 -print-file-name=libc.a
/usr/lib/gcc/x86_64-pc-linux-gnu/3.4.4/../../../../lib32/libc.a

------- Comment #11 From Simon Stelling (RETIRED) 2005-12-26 08:31:56 0000 -------
adding

pkg_setup() {
 has_multilib_profile && ABI=x86
}

was the way to go. sorry for the huge delay

Bug List: (This bug is not in your last search results)   Show last search results      Search page      Enter new bug