LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
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


Reply
  Search this Thread
Old 02-25-2011, 06:35 PM   #16
corp769
LQ Guru
 
Registered: Apr 2005
Location: /dev/null
Posts: 5,818

Rep: Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007

Not a problem. That works out, cause I need to run to the beer store....
 
Old 02-25-2011, 06:39 PM   #17
corp769
LQ Guru
 
Registered: Apr 2005
Location: /dev/null
Posts: 5,818

Rep: Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007
One more thing - Since you brought up the libraries already, see if you have glibc-devel-2.11-2.i686 or similar installed.
 
Old 02-25-2011, 06:45 PM   #18
frznchckn
Member
 
Registered: Jun 2006
Location: TX
Distribution: Debian
Posts: 102

Original Poster
Rep: Reputation: 15
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
 
Old 02-25-2011, 06:55 PM   #19
corp769
LQ Guru
 
Registered: Apr 2005
Location: /dev/null
Posts: 5,818

Rep: Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007
Check to make sure you have compat-glibc, glibc, and glibc-devel 32 bit libraries installed, among the dependencies they need.
 
Old 02-25-2011, 09:16 PM   #20
Hungry ghost
Senior Member
 
Registered: Dec 2004
Posts: 1,222

Rep: Reputation: 667Reputation: 667Reputation: 667Reputation: 667Reputation: 667Reputation: 667
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 09:28 PM.
 
Old 02-25-2011, 11:23 PM   #21
corp769
LQ Guru
 
Registered: Apr 2005
Location: /dev/null
Posts: 5,818

Rep: Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007
Quote:
Originally Posted by odiseo77 View Post
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.
 
Old 02-26-2011, 07:12 AM   #22
johnsfine
LQ Guru
 
Registered: Dec 2007
Distribution: Centos
Posts: 5,286

Rep: Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197
Quote:
Originally Posted by frznchckn View Post
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 View Post
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:
Code:
file hw32
ldd hw32
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 07:19 AM.
 
1 members found this post helpful.
Old 02-26-2011, 04:16 PM   #23
frznchckn
Member
 
Registered: Jun 2006
Location: TX
Distribution: Debian
Posts: 102

Original Poster
Rep: Reputation: 15
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?
 
Old 02-26-2011, 04:20 PM   #24
corp769
LQ Guru
 
Registered: Apr 2005
Location: /dev/null
Posts: 5,818

Rep: Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007
Quote:
Originally Posted by frznchckn View Post
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....
 
Old 02-26-2011, 04:25 PM   #25
frznchckn
Member
 
Registered: Jun 2006
Location: TX
Distribution: Debian
Posts: 102

Original Poster
Rep: Reputation: 15
well I see a /lib/libc-2.5.so

is that what should be loaded for this compilation?
 
Old 02-26-2011, 04:40 PM   #26
paulsm4
LQ Guru
 
Registered: Mar 2004
Distribution: SusE 8.2
Posts: 5,863
Blog Entries: 1

Rep: Reputation: Disabled
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
 
Old 02-26-2011, 04:46 PM   #27
frznchckn
Member
 
Registered: Jun 2006
Location: TX
Distribution: Debian
Posts: 102

Original Poster
Rep: Reputation: 15
Do you have a suggestion on how to install ia32-libs using yum?
 
Old 02-26-2011, 05:33 PM   #28
johnsfine
LQ Guru
 
Registered: Dec 2007
Distribution: Centos
Posts: 5,286

Rep: Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197
Quote:
Originally Posted by frznchckn View Post
[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 05:37 PM.
 
Old 02-26-2011, 05:37 PM   #29
frznchckn
Member
 
Registered: Jun 2006
Location: TX
Distribution: Debian
Posts: 102

Original Poster
Rep: Reputation: 15
[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?
 
Old 02-26-2011, 07:38 PM   #30
johnsfine
LQ Guru
 
Registered: Dec 2007
Distribution: Centos
Posts: 5,286

Rep: Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197
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 View Post
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 07:55 PM.
 
  


Reply

Tags
java, rhel, rhel54



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Java Woes: A Java Runtime Environment (JRE) or Java Development Kit (JDK) must be available ... chytraeus Slackware 10 11-27-2010 10:04 AM
Java runtime error. Exception in thread "main" java.lang.NoClassDefFoundError: / Priyadivya Red Hat 2 10-26-2010 05:01 AM
Runtime.getRuntime().exec("cd") returns java.io.IOException, error 2 in java tatarin Programming 4 03-28-2008 07:42 PM
Java-GTK glib-java-0.2.5 Error hikkerguy Linux - Software 2 07-19-2006 06:01 PM
Java error "Exception in thread "main" java.lang.StackOverflowError" nro Programming 1 09-04-2004 03:47 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 11:23 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration