LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Running a 32-bit program on Slackware64 - question (https://www.linuxquestions.org/questions/slackware-14/running-a-32-bit-program-on-slackware64-question-761848/)

niels.horn 10-14-2009 09:40 AM

Running a 32-bit program on Slackware64 - question
 
I have the following problem...

There is this small command-line tool I use to convert a certain file format to another. It is free, but not "open" software, so I cannot build it myself.

The previous version was from 2002 and (don't ask me how...) the downloaded binary works fine under Slackware 32 & 64-bits versions.
It uses no libraries, it's just a single executable.
ldd tells me simply that it's "not a dynamic executable".

The newer version, released 6 years later, in 2008, doesn't work any longer on Slackware64, only on the 32-bits version. It gives an error message "No such file or directory" when I try to start it.
My Slackware64 installation is pure 64 bits, no compatibility libraries.
ldd on a 32-bits box says it uses:
- libstdc++.so.5
- libm.so.6
- libc.so.6
- libgcc_s.so.1

I tried to contact the author to convince him to compile a 64-bits version and even offered to help him, but have not received an answer. :(

I *might* consider installing the multi-lib packages from AlienBOB, but will that help in this case?

samac 10-14-2009 10:00 AM

What is the program, I have 32bit compat installed, if it is not too big (bad broadband connection), I will test it for you.

samac

niels.horn 10-14-2009 10:09 AM

It's only about 54K zipped :) The advantage of small command line utilities...

You can download it here.

It requires tons of switches and a large package of data files to actually do something useful, but it should at least start and give a description of all the options.

Thanks for the offer!

grissiom 10-14-2009 10:45 AM

IMHO, you need to install the 32-bit compatibility libraries. Because the program need 32bit libstdc++.so.5, libm.so.6 and so on. I have 32bit programs in SW64 facing the same problem but I have no time to install the 32bit compatibility libs. So these are just my guess.

brianL 10-14-2009 11:08 AM

On my 64/32bit multilib setup thingy running l3p I get loads of options.
Then with file and ldd I get:
Code:

bash-3.1$ cd Downloads
bash-3.1$ file l3p
l3p: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), not stripped
bash-3.1$ ldd l3p
        linux-gate.so.1 =>  (0xffffe000)
        libstdc++.so.5 => /usr/lib/libstdc++.so.5 (0xf7e8a000)
        libm.so.6 => /lib/libm.so.6 (0xf7e64000)
        libc.so.6 => /lib/libc.so.6 (0xf7d04000)
        libgcc_s.so.1 => /usr/lib/libgcc_s.so.1 (0xf7cf7000)
        /lib/ld-linux.so.2 (0xf7f71000)

Don't know if that means it will work, or if it helps.

samac 10-14-2009 11:16 AM

Seems like it works, but as I have no povray files I cannot test it fully, but running l3p gives a load of help options, so I guess it works with 32-bit compatibility installed.

samac

niels.horn 10-14-2009 11:19 AM

Well, if it gives you the long list of all the options on a multi-lib system, that gives me hope that it will actually work :)

Now I just have to decide whether to keep my Slackware64 "pure" or install the multilib packages.
I use this box a lot for building (64-bits) packages, so I wanted it to stay as original as possible.

Oh, cruel decisions...

@samac: it actually converts to .pov (from .ldr) but it needs two libraries of files installed.

brianL 10-14-2009 01:26 PM

You'll still be able to build 64bit packages...I think.

Alien Bob 10-14-2009 01:54 PM

Quote:

Originally Posted by brianL (Post 3719215)
You'll still be able to build 64bit packages...I think.

Of course you can!

Eric

brianL 10-14-2009 02:04 PM

There you are, niels. Assurance from Eric - nothing to lose going multilib.

niels.horn 10-14-2009 02:06 PM

Oh, I wasn't doubting that :)

I am in doubt about installing the multilib packages just because I like to keep this machine as "pure" or "original" as possible, so that I can be sure that the packages I create will run on other Slackware64 boxes.

I'll contemplate my decision well...

I might create a new 64-bits VM for creating the packages, with a snapshot of a "clean machine" I can easily fall back to.
The disadvantage is that VMs are a bit slower compiling sources etc...

brianL 10-14-2009 02:14 PM

My mind's like a sewer. I'm getting images of your virgin 64bit box being ravished by Eric's multilib packages. :)

niels.horn 10-14-2009 02:30 PM

brianL: You need some time away from computers! :D (my wife says the same thing to me all the time...)

MQMan 10-14-2009 04:25 PM

Here's an option I was given, when I asked a similar question.

I haven't had the time to try it yet, but it does sound interesting.

Cheers.

niels.horn 10-14-2009 05:19 PM

@MQMan: Hey, thanks for that one!
I installed & ran statifier on the 32-bits box and it created an executable with all the libraries inside.
The resulting file (4x as big :D) runs fine on my 64-bits box, without the multi-lib setup.

@brianL: You can sleep without worries: my virgin 64bit box continues "pure" ;)


All times are GMT -5. The time now is 01:54 PM.