[SOLVED] 32 bit binaries do not run on 64 bit machine
Linux - SoftwareThis 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.
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.
I assume you mean frznchckn should attach the binary to a post (I think that is done by the paperclip icon when posting, but I've never tried it in this forum).
We do seem to be failing to distinguish whether something is wrong at link time vs. something is wrong both at load time and when ldd is run. So letting us examine the executable on our own systems should allow us to at least find decide that boundary.
Everything posted in post #20 looks correct to me, so I no longer believe anything went wrong at link time.
I don't know how to even investigate what might have gone wrong at load time. The usual problem is looking for .so files that aren't there. But we have already seen both that the correct .so files are present and that ldd thinks incorrect .so files are requested. Further, post #20 shows us the correct .so files are requested at link time.
Just to check a few more obscure possibilities, you should use the file -L command on the files referenced by the link command. I've copied those file names out of your link command to make that easier
Your hw32 still tried to load 64 bit libraries.
Hmm. I copied your hw32 to 64-bit box and it's run OK, so I think we can rule out
linking problem and say, that problem in your environment.
Also when I run hw32 on my 64-bt box under strace I got following:
Code:
execve("./hw32.txt", ["./hw32.txt"], [/* 30 vars */]) = 0
[ Process PID=32556 runs in 32 bit mode. ]
brk(0) = 0x88b0000
I.e on my box starce knows that it run 32-bit process, and on yours - not.
I haven't read them carefully yet, but the pages found on a google search for
"/proc/sys/fs/binfmt_misc/32bits"
seem to say there is a security flaw in 32 bit support for 64 bit RHEL and a work around to disable 32 bit support, and your system seems to include that disable of 32 bit support.
Those say the following command as root will re enable 32 bit exectuables. Note I don't understand enough about the original security exploit to comment constructively on whether there is a good reason to leave 32 bit support disabled.
echo -1 > /proc/sys/fs/binfmt_misc/32bits
The whole discussion looks old enough to expect the original security flaw has been fixed correctly (if you reboot after installing a kernel update) and you are seeing the symptoms of a drastic patch that you no longer even need. But all of that is guesswork. I don't really know any status on RHEL kernel updates.
Quote:
Originally Posted by Valery Reznic
Code:
ls /proc/sys/fs/binfmt_misc/
And I am go to sleep...
Right before going to sleep you solved the mystery. Thanks, as often happens I got to learn more while trying to help someone than I learn working on my own issues.
I took your answer a tiny bit further, hopefully far enough for the OP to understand it.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.