RE: [suse-amd64] 64b/32b library problems
/usr/lib is 32-bit libraries. /usr/lib64 is 64-bit libraries. To use 32-bit libraries you should be linking to /usr/lib and /usr/local/lib, not /usr/lib64 and /usr/local/lib64. -----Original Message----- From: Michael Galloway [mailto:mgx@ornl.gov] Sent: Tuesday, February 17, 2004 1:59 PM To: suse-amd64@suse.com Subject: [suse-amd64] 64b/32b library problems good day all ... i'm trying to build a simple perl module gd.pm. looks like gcc cannot use the 32b XFree libraries: LD_RUN_PATH="/usr/lib64:/usr/X11R6/lib" cc -shared -L/usr/local/lib64 GD.o -o blib/arch/auto/GD/GD.so -L/usr/lib64 -L/usr/lib/X11 -L/usr/X11R6/lib -L/usr/X11/lib -L/usr/local/lib -lgd -lpng -lz -lfreetype -ljpeg -lm -lX11 -lXpm /usr/lib64/gcc-lib/x86_64-suse-linux/3.3.1/../../../../x86_64-suse-linux/bin/ld: skipping incompatible /usr/X11R6/lib/libX11.so when searching for -lX11 /usr/lib64/gcc-lib/x86_64-suse-linux/3.3.1/../../../../x86_64-suse-linux/bin/ld: skipping incompatible /usr/X11R6/lib/libX11.a when searching for -lX11 /usr/lib64/gcc-lib/x86_64-suse-linux/3.3.1/../../../../x86_64-suse-linux/bin/ld: skipping incompatible /usr/X11/lib/libX11.so when searching for -lX11 /usr/lib64/gcc-lib/x86_64-suse-linux/3.3.1/../../../../x86_64-suse-linux/bin/ld: skipping incompatible /usr/X11/lib/libX11.a when searching for -lX11 /usr/lib64/gcc-lib/x86_64-suse-linux/3.3.1/../../../../x86_64-suse-linux/bin/ld: cannot find -lX11 collect2: ld returned 1 exit status where: mus:~/.cpan/build/GD-2.12 # file /usr/X11R6/lib/libX11.so.6.2 /usr/X11R6/lib/libX11.so.6.2: ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV), not stripped i played a little with trying: make CC="cc -m32" with the same results. i must be missing something simple here. is there a sane way to work around this issue? -- michael -- Check the List-Unsubscribe header to unsubscribe For additional commands, email: suse-amd64-help@suse.com
Hi marc.miller! yes, but they are mixed, gd puts its libs in /usr/lib64: mus:~/.cpan/build/GD-2.12 # rpm -ql gd /usr/lib64/libgd.so.2 /usr/lib64/libgd.so.2.0.0 and in the makefile for gd.pm: my @INC = qw(-I/usr/include -I/include -I/usr/local/include -I/usr/local/include/gd); my @LIBPATH = qw(-L/usr/lib64 -L/usr/lib/X11 -L/usr/X11R6/lib -L/usr/X11/lib -L/usr/local/lib); my @LIBS = qw(-lgd -lpng -lz); so i think it should link against the correct X libs. -- michael On Tue, 17 Feb 2004, marc.miller@amd.com wrote:
/usr/lib is 32-bit libraries. /usr/lib64 is 64-bit libraries. To use 32-bit libraries you should be linking to /usr/lib and /usr/local/lib, not /usr/lib64 and /usr/local/lib64.
-----Original Message----- From: Michael Galloway [mailto:mgx@ornl.gov] Sent: Tuesday, February 17, 2004 1:59 PM To: suse-amd64@suse.com Subject: [suse-amd64] 64b/32b library problems
good day all ...
i'm trying to build a simple perl module gd.pm. looks like gcc cannot use the 32b XFree libraries:
LD_RUN_PATH="/usr/lib64:/usr/X11R6/lib" cc -shared -L/usr/local/lib64 GD.o -o blib/arch/auto/GD/GD.so -L/usr/lib64 -L/usr/lib/X11 -L/usr/X11R6/lib -L/usr/X11/lib -L/usr/local/lib -lgd -lpng -lz -lfreetype -ljpeg -lm -lX11 -lXpm /usr/lib64/gcc-lib/x86_64-suse-linux/3.3.1/../../../../x86_64-suse-linux/bin/ld: skipping incompatible /usr/X11R6/lib/libX11.so when searching for -lX11 /usr/lib64/gcc-lib/x86_64-suse-linux/3.3.1/../../../../x86_64-suse-linux/bin/ld: skipping incompatible /usr/X11R6/lib/libX11.a when searching for -lX11 /usr/lib64/gcc-lib/x86_64-suse-linux/3.3.1/../../../../x86_64-suse-linux/bin/ld: skipping incompatible /usr/X11/lib/libX11.so when searching for -lX11 /usr/lib64/gcc-lib/x86_64-suse-linux/3.3.1/../../../../x86_64-suse-linux/bin/ld: skipping incompatible /usr/X11/lib/libX11.a when searching for -lX11 /usr/lib64/gcc-lib/x86_64-suse-linux/3.3.1/../../../../x86_64-suse-linux/bin/ld: cannot find -lX11 collect2: ld returned 1 exit status
where:
mus:~/.cpan/build/GD-2.12 # file /usr/X11R6/lib/libX11.so.6.2 /usr/X11R6/lib/libX11.so.6.2: ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV), not stripped
i played a little with trying: make CC="cc -m32" with the same results. i must be missing something simple here. is there a sane way to work around this issue?
-- michael
-- Check the List-Unsubscribe header to unsubscribe For additional commands, email: suse-amd64-help@suse.com
-- Check the List-Unsubscribe header to unsubscribe For additional commands, email: suse-amd64-help@suse.com
Hi suse-amd64! ok, i found it, i knew it was a simple thing. i was looking for the 64b X libs in the wrong place. once i found them all is well again. thanks! -- michael On Tue, 17 Feb 2004, Michael Galloway wrote:
Hi marc.miller!
yes, but they are mixed, gd puts its libs in /usr/lib64:
mus:~/.cpan/build/GD-2.12 # rpm -ql gd /usr/lib64/libgd.so.2 /usr/lib64/libgd.so.2.0.0
and in the makefile for gd.pm:
my @INC = qw(-I/usr/include -I/include -I/usr/local/include -I/usr/local/include/gd); my @LIBPATH = qw(-L/usr/lib64 -L/usr/lib/X11 -L/usr/X11R6/lib -L/usr/X11/lib -L/usr/local/lib); my @LIBS = qw(-lgd -lpng -lz);
so i think it should link against the correct X libs.
-- michael
On Tue, Feb 17, 2004 at 05:09:02PM -0500, Michael Galloway wrote:
Hi marc.miller!
yes, but they are mixed, gd puts its libs in /usr/lib64:
mus:~/.cpan/build/GD-2.12 # rpm -ql gd /usr/lib64/libgd.so.2 /usr/lib64/libgd.so.2.0.0
and in the makefile for gd.pm:
my @INC = qw(-I/usr/include -I/include -I/usr/local/include -I/usr/local/include/gd); my @LIBPATH = qw(-L/usr/lib64 -L/usr/lib/X11 -L/usr/X11R6/lib -L/usr/X11/lib -L/usr/local/lib); my @LIBS = qw(-lgd -lpng -lz);
so i think it should link against the correct X libs.
We use this hack locally to build it correctly: perl -pi -e 's#X11R6/lib#X11R6/%{_lib}#g;' Makefile.PL So the /usr/X11R6/lib should be patched to lib64. Ciao, Marcus
participants (3)
-
marc.miller@amd.com
-
Marcus Meissner
-
Michael Galloway