Google
  Web www.spinics.net

32-bit Compiling and Linking

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


We have user home directories that are shared across 32-bit and 64-bit
systems.  We have setup a wrapper script around gcc/g++ so that our
64-bit systems compile in 32-bit mode by default; basically, the "-m32"
option is just inserted into a user's gcc/g++ command.  This works fine
if the user is not linking against a library (e.g. "gcc -o hello
hello.c").  However, if they need to link against a library, they get an
error like this:

[user@host dir]$ gcc -o sslnumbers -lssl sslnumbers.c
/usr/bin/ld: skipping incompatible /usr/lib64/libssl.so when searching
for -lssl/usr/bin/ld: skipping incompatible /usr/lib64/libssl.a when
searching for -lssl
/usr/bin/ld: cannot find -lssl
collect2: ld returned 1 exit status

Obviously, it cannot find the 32-bit version of the "ssl" library.  This
occurs because their in fact is no "/usr/lib/libssl.so", although
"/usr/lib/libssl3.so" *does* exist.  Further, as far as I know there is
no package that includes the necessary "/usr/lib/libssl.so" link.  Is
there a way to have the linker find the necessary 32-bit library (other
than manually creating a link)?

Thanks,
Jeremy Dreese

-- 

amd64-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/amd64-list

[Search]     [Home]     [Kernel List]     [Linux ia64]     [Linux X86_64]     [Red Hat Install]     [Red Hat Migration]     [Red Hat Development]     [Red Hat 9 Bible]     [Red Hat 9 Mailing List]     [Fedora Legacy]     [Yosemite News]