Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
|
02-25-2011, 07:35 PM
|
#16
|
LQ Guru
Registered: Apr 2005
Location: /dev/null
Posts: 5,818
|
Not a problem. That works out, cause I need to run to the beer store....
|
|
|
02-25-2011, 07:39 PM
|
#17
|
LQ Guru
Registered: Apr 2005
Location: /dev/null
Posts: 5,818
|
One more thing - Since you brought up the libraries already, see if you have glibc-devel-2.11-2.i686 or similar installed.
|
|
|
02-25-2011, 07:45 PM
|
#18
|
Member
Registered: Jun 2006
Location: TX
Distribution: Debian
Posts: 102
Original Poster
Rep:
|
How do I check the version of the installed glibc? Below is yum search libc
in /lib I see libc-2.5.so
in /lib64 I see libc-2.5.so as well
Not sure if I see devel libraries.
compat-glibc.i386 : Compatibility C library
compat-glibc.x86_64 : Compatibility C library
compat-glibc-headers.x86_64 : Header files for development using standard C libraries.
cdparanoia-devel.i386 : Development tools for libcdda_paranoia (Paranoia III).
cdparanoia-devel.x86_64 : Development tools for libcdda_paranoia (Paranoia III).
cdparanoia-libs.i386 : Libraries for libcdda_paranoia (Paranoia III).
cdparanoia-libs.x86_64 : Libraries for libcdda_paranoia (Paranoia III).
compat-libcom_err.i386 : A libcom_err compatibility library
compat-libcom_err.x86_64 : A libcom_err compatibility library
curl-devel.i386 : Files needed for building applications with libcurl.
curl-devel.x86_64 : Files needed for building applications with libcurl.
glibc.i686 : The GNU libc libraries.
glibc.x86_64 : The GNU libc libraries.
glibc-common.x86_64 : Common binaries and locale data for glibc
glibc-devel.i386 : Object files for development using standard C libraries.
glibc-devel.x86_64 : Object files for development using standard C libraries.
glibc-headers.x86_64 : Header files for development using standard C libraries.
glibc-utils.x86_64 : Development utilities from GNU C library
kernel-headers.x86_64 : Header files for the Linux kernel for use by glibc
libc-client.i386 : C-client mail access routines for IMAP and POP protocols
libc-client.x86_64 : C-client mail access routines for IMAP and POP protocols
libc-client-devel.i386 : Development tools for programs which will use the IMAP library.
libc-client-devel.x86_64 : Development tools for programs which will use the IMAP library.
libcap.i386 : Library for getting and setting POSIX.1e capabilities
libcap.x86_64 : Library for getting and setting POSIX.1e capabilities
libcap-devel.i386 : Development files for libcap
libcap-devel.x86_64 : Development files for libcap
libchewing.i386 : Intelligent phonetic input method library for Traditional Chinese
libchewing.x86_64 : Intelligent phonetic input method library for Traditional Chinese
libchewing-devel.i386 : Development files for libchewing
libchewing-devel.x86_64 : Development files for libchewing
libcmpiutil.i386 : CMPI Utility Library
libcmpiutil.x86_64 : CMPI Utility Library
libcmpiutil-devel.i386 : Libraries, includes, etc. to use the CMPI utility library
libcmpiutil-devel.x86_64 : Libraries, includes, etc. to use the CMPI utility library
libcroco.i386 : A CSS2 parsing library
libcroco.x86_64 : A CSS2 parsing library
libcroco-devel.i386 : Libraries and include files for developing with libcroco.
libcroco-devel.x86_64 : Libraries and include files for developing with libcroco.
libcxgb3.i386 : Chelsio T3 iWARP HCA Userspace Driver
libcxgb3.x86_64 : Chelsio T3 iWARP HCA Userspace Driver
libcxgb3-static.x86_64 : Static version of the libcxgb3 driver
|
|
|
02-25-2011, 07:55 PM
|
#19
|
LQ Guru
Registered: Apr 2005
Location: /dev/null
Posts: 5,818
|
Check to make sure you have compat-glibc, glibc, and glibc-devel 32 bit libraries installed, among the dependencies they need.
|
|
|
02-25-2011, 10:16 PM
|
#20
|
Senior Member
Registered: Dec 2004
Posts: 1,222
|
Doesn't RHEL have some 32 bit compatibility libs? On debian, there's a package named ia32-libs that allows you to run 32 bit executables on 64 bit environments... Maybe there's something similar on RHEL? (the name may differ, though).
Last edited by Hungry ghost; 02-25-2011 at 10:28 PM.
|
|
|
02-26-2011, 12:23 AM
|
#21
|
LQ Guru
Registered: Apr 2005
Location: /dev/null
Posts: 5,818
|
Quote:
Originally Posted by odiseo77
Doesn't RHEL have some 32 bit compatibility libs? On debian, there's a package named ia32-libs that allows you to run 32 bit executables on 64 bit environments... Maybe there's something similar on RHEL? (the name may differ, though).
|
That's most likely it. I almost got confused between the libraries.
|
|
|
02-26-2011, 08:12 AM
|
#22
|
LQ Guru
Registered: Dec 2007
Distribution: Centos
Posts: 5,286
|
Quote:
Originally Posted by frznchckn
I'm trying to debug why I cannot run any java on my RHEL 5 box. Right now I'm just trying to run an example .jar file
|
Nothing in that post seems to connect to the issue in the title of the thread 32 bit binaries do not run on 64 bit machine.
Your later post supports the thread title, but even with that later post, it seems to be a leap to conclude your Java problem is the same as your 32 bit problem.
Quote:
Originally Posted by frznchckn
Code:
[rfriesen@****** c-test]$ gcc -m32 -o hw32 main.c
[rfriesen@****** c-test]$ chmod +x hw32
[rfriesen@****** c-test]$ ./hw32
./hw32
|
That was pretty convincing that you have some problem with 32 bit executables. A little more investigation might tell us a bit about what the problem is. Start with the output from these two commands:
For comparison, on my Centos system that 32 bit program works and those commands give the output
Code:
> file hw32
hw32: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), for GNU/Linux 2.6.9, dynamically linked (uses shared libs), for GNU/Linux 2.6.9, not stripped
> ldd hw32
linux-gate.so.1 => (0xffffe000)
libc.so.6 => /lib/libc.so.6 (0x00862000)
/lib/ld-linux.so.2 (0x00844000)
Last edited by johnsfine; 02-26-2011 at 08:19 AM.
|
|
1 members found this post helpful.
|
02-26-2011, 05:16 PM
|
#23
|
Member
Registered: Jun 2006
Location: TX
Distribution: Debian
Posts: 102
Original Poster
Rep:
|
Hmmm, I would've gotten back to this sooner but I didn't get an email about new comments for some reason..
anyways, I was following corp769's suggestion of installing the latest gcc which requires GMP 4.2+, MPFR 2.3.1+ and MPC 0.8.0+. I'm trying to install them without overwriting the versions I already have installed. I'm a little confused on how to use the rpm's relocate command to accomplish this. Would the following work?
rpm -ivf --relocate /usr=~/usr gmp-4.2.2-8.fc10.x86_64
for johnsfine
[rfriesen@***** c-test]$ file hw32
hw32: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), for GNU/Linux 2.6.9, dynamically linked (uses shared libs), for GNU/Linux 2.6.9, not stripped
[rfriesen@***** c-test]$ ldd hw32
linux-vdso.so.1 => (0x00007fff5dffc000)
libc.so.6 => /lib64/libc.so.6 (0x000000363aa00000)
/lib64/ld-linux-x86-64.so.2 (0x000000363a600000)
[rfriesen@***** c-test]$
I notice that my "libc.so.6" points to a "/lib64/libc.so.6" whereas yours does not. How can I fix this?
|
|
|
02-26-2011, 05:20 PM
|
#24
|
LQ Guru
Registered: Apr 2005
Location: /dev/null
Posts: 5,818
|
Quote:
Originally Posted by frznchckn
Hmmm, I would've gotten back to this sooner but I didn't get an email about new comments for some reason..
anyways, I was following corp769's suggestion of installing the latest gcc which requires GMP 4.2+, MPFR 2.3.1+ and MPC 0.8.0+. I'm trying to install them without overwriting the versions I already have installed. I'm a little confused on how to use the rpm's relocate command to accomplish this. Would the following work?
rpm -ivf --relocate /usr=~/usr gmp-4.2.2-8.fc10.x86_64
for johnsfine
[rfriesen@***** c-test]$ file hw32
hw32: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), for GNU/Linux 2.6.9, dynamically linked (uses shared libs), for GNU/Linux 2.6.9, not stripped
[rfriesen@***** c-test]$ ldd hw32
linux-vdso.so.1 => (0x00007fff5dffc000)
libc.so.6 => /lib64/libc.so.6 (0x000000363aa00000)
/lib64/ld-linux-x86-64.so.2 (0x000000363a600000)
[rfriesen@***** c-test]$
I notice that my "libc.so.6" points to a "/lib64/libc.so.6" whereas yours does not. How can I fix this?
|
Ahh, linker problems. Looks like you might not have all of the 32 bit libraries installed.... You might have to either manually link your program to 32 bit libraries, which technically is not recommended, or track those 32 bit ones down....
|
|
|
02-26-2011, 05:25 PM
|
#25
|
Member
Registered: Jun 2006
Location: TX
Distribution: Debian
Posts: 102
Original Poster
Rep:
|
well I see a /lib/libc-2.5.so
is that what should be loaded for this compilation?
|
|
|
02-26-2011, 05:40 PM
|
#26
|
LQ Guru
Registered: Mar 2004
Distribution: SusE 8.2
Posts: 5,863
Rep:
|
There's a lot of confusion in this thread:
1. The initial post seemed to have NOTHING to do with 32- vs 64-bit, and EVERYTHING to do with the correct syntax for invoking a Java program with the correct .jar. Please revisit that at some point before closing this thread.
2. In general, 32-bit apps CAN and DO run without any problem on 64-bit OS's.
The "magic" that allows this to happen is installing parallel 32- and 64-bit runtime libraries (including, but not limited to, libc).
Most 64-bit distros install both by default. Some don't. The problem often manifests itself when people try using the Android SDK on a 64-bit OS. A common solution is some variation of this:
Quote:
sudo apt-get install ia32-libs
|
3. Please cut/paste your exact "hello world" source, compile command and command line output now that you've updated your libraries. If anything's wrong, please run "file hw*" and "ldd hw*" on your "hw" executables, and cut/paste the results.
Thanx in advance .. PSM
|
|
|
02-26-2011, 05:46 PM
|
#27
|
Member
Registered: Jun 2006
Location: TX
Distribution: Debian
Posts: 102
Original Poster
Rep:
|
Do you have a suggestion on how to install ia32-libs using yum?
|
|
|
02-26-2011, 06:33 PM
|
#28
|
LQ Guru
Registered: Dec 2007
Distribution: Centos
Posts: 5,286
|
Quote:
Originally Posted by frznchckn
[rfriesen@***** c-test]$ ldd hw32
linux-vdso.so.1 => (0x00007fff5dffc000)
libc.so.6 => /lib64/libc.so.6 (0x000000363aa00000)
/lib64/ld-linux-x86-64.so.2 (0x000000363a600000)
|
Those are all three wrong. So the next step is to see whether the correct files are missing vs. something else went wrong during linking.
So start with
Code:
ls -l /lib/libc.so.*
ls -l /lib/ld-linux.so.*
I'm not sure where linux-gate.so.* is supposed to be.
I'm not at a Centos system now, so I can't experiment with yum commands. When a file isn't present, the "yum provides" command generally tells you the package you could get it from. Something like
Code:
yum provides "/lib/libc.so.*"
Last edited by johnsfine; 02-26-2011 at 06:37 PM.
|
|
|
02-26-2011, 06:37 PM
|
#29
|
Member
Registered: Jun 2006
Location: TX
Distribution: Debian
Posts: 102
Original Poster
Rep:
|
[rfriesen@2 ~]$ ls -l /lib/libc.so.*
lrwxrwxrwx 1 root root 11 Feb 25 09:35 /lib/libc.so.6 -> libc-2.5.so
[rfriesen@~]$ ls -l /lib/ld-linux.so.*
lrwxrwxrwx 1 root root 9 Feb 25 09:35 /lib/ld-linux.so.2 -> ld-2.5.so
a "sudo find / -name linux-gate.so.*" turned up empty?
|
|
|
02-26-2011, 08:38 PM
|
#30
|
LQ Guru
Registered: Dec 2007
Distribution: Centos
Posts: 5,286
|
So it isn't something simple such as those two .so file missing.
I didn't actually know what linux-gate was before myself. I never looked at that detail of ldd before. Even on my Mepis system, ldd shows linux-gate.so.1 and locate can't find it. So with google I found
http://www.trilithium.com/johan/2005/08/linux-gate/
That explains why I see linux-gate.so.1 from ldd. It doesn't explain why you see the 64bit version for your 32 bit executable.
I'm getting a bit out of my depth on link time problems, but we should at least look at the info gcc passes to the linker. So try this (output is fairly large):
Code:
gcc -v -m32 -o hw32 main.c
Quote:
Originally Posted by corp769
Ahh, linker problems.
|
Probably, but what linker problem and why?
Quote:
Looks like you might not have all of the 32 bit libraries installed.
|
The indications are pretty clear that the only 32 bit .so files required for this example are /lib/libc.so.6 and /lib/ld-linux.so.2 and the OP showed both are present.
Last edited by johnsfine; 02-26-2011 at 08:55 PM.
|
|
|
All times are GMT -5. The time now is 01:32 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|