Find the answer to your Linux question:
Page 2 of 2 FirstFirst 1 2
Results 11 to 20 of 20
It would be helpful to know how these libraries (the 64-bit ones in the 32-bit directory tree) were installed....
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #11
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
    Posts
    11,677

    It would be helpful to know how these libraries (the 64-bit ones in the 32-bit directory tree) were installed.
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

  2. #12
    Just Joined!
    Join Date
    Mar 2010
    Posts
    8
    well not knowing if I messed things up, and because I have multiple hdd to mess with
    I installed an fresh copy of Ubuntu x86_64 9.10

    nothing else done...

    guess what
    readelf -h /usr/lib/gio/modules/libgiogconf.so
    ELF Header:
    Magic: 7f 45 4c 46 02 01 01 00 00 00 00 00 00 00 00 00
    Class: ELF64

    looks like uBuntu uses /usr/lib like I though they did... putting 64 bits libraries into /usr/llib
    anyone else using x86_64 Linux that can confirm the 64 bit ELF are in /usr/lib ?

  3. #13
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
    Posts
    11,677
    What package are these libraries from anyway? I don't see them on my CentOS system.
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

  4. $spacer_open
    $spacer_close
  5. #14
    Just Joined!
    Join Date
    Jul 2010
    Location
    Annapolis, MD
    Posts
    1

    lib vs. lib32 vs. lib64

    Quote Originally Posted by Rubberman View Post
    A 64-bit linux (x86_64) can run either or both 32-bit and 64-bit programs. That's why /usr/lib is for 32-bit only libraries, plus some configuration stuff that isn't relevant to this discussion. All 64-bit libraries go into /usr/lib64. So, is incorrect. /usr/lib MUST be 32-bit only.
    I am using Ubuntu 10.04 and the installer linked my libraries: lib64 -> lib so that all 64-bit code goes to lib. There is a separate lib32 directory for 32-bit code.

    Cheers!
    Mark

  6. #15
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
    Posts
    11,677
    Sigh... It figures that Ubuntu would "have a better idea" about library naming. In some ways it makes sense that the platform architecture libraries go into /lib, at least indirectly. RHEL/CentOS (not sure about Fedora since I don't use that) do not, so the 32-bit libraries are in /lib. Oh well. Thanks for the info. My Ubuntu systems are all 32-bit right now, though I'm thinking about going 64-bit on my dual-core laptop.
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

  7. #16
    Just Joined!
    Join Date
    Jul 2010
    Location
    Vancouver, Canada
    Posts
    3
    I'm seeing this too - on Ubuntu 10.04. I have the 32-bit libs in /usr/lib32 (And have verified that they are 32-bit with the readelf tool) but it seems like the app is looking in /usr/lib and finding the 64-bit version. /usr/lib64 is just a link to /usr/lib.

    Any ideas how I can tell it to look in /usr/lib32? Is there a environment variable or something that I can set?

  8. #17
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
    Posts
    11,677
    You can tell the compiler that you are building a 32-bit app, but you also need to tell the linker to use libraries in /usr/lib32 specifically. For the compilation phase, use -march=i386 and/or -m32. For the link phase, use -L /usr/lib32.
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

  9. #18
    Just Joined!
    Join Date
    Jul 2010
    Location
    Vancouver, Canada
    Posts
    3
    Quote Originally Posted by Rubberman View Post
    You can tell the compiler that you are building a 32-bit app, but you also need to tell the linker to use libraries in /usr/lib32 specifically. For the compilation phase, use -march=i386 and/or -m32. For the link phase, use -L /usr/lib32.
    That sadly won't be possible for me as I'm not building the app. Or rather I am, but it's a Java app that uses some native code. I've tried setting my LD_LIBRARY_PATH to include only /usr/lib32 (And the same with Java's version of that) but no joy.

    Thanks though.

  10. #19
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
    Posts
    11,677
    What happens if you install and use 64-bit Java?
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

  11. #20
    Just Joined!
    Join Date
    Jul 2010
    Location
    Vancouver, Canada
    Posts
    3
    Quote Originally Posted by Rubberman View Post
    What happens if you install and use 64-bit Java?
    I get a different error - At least it looks like it's finding the correct libs this time!

    Cheers.

Page 2 of 2 FirstFirst 1 2

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •