LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 02-22-2011, 04:18 PM   #1
Cultist
Member
 
Registered: Feb 2010
Location: Georgia
Distribution: Slackware64 14.2
Posts: 779

Rep: Reputation: 107Reputation: 107
will a program written for x86 function on slackware64 if it is multilib enabled?


Been thinking about changing over to 64 bit, but I was just curious about whether or not I'll have to worry about incompatibility with a few 32bit-only applications I use, once I've set up multilib. I'll test it out in vbox when I get home but I wanted to check here to see if I could maybe get a solid yes/no/maybe answer.
thanks
 
Old 02-22-2011, 04:28 PM   #2
dugan
LQ Guru
 
Registered: Nov 2003
Location: Canada
Distribution: distro hopper
Posts: 11,233

Rep: Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320
Yes. That's what multilib is for.
 
Old 02-22-2011, 04:32 PM   #3
Cultist
Member
 
Registered: Feb 2010
Location: Georgia
Distribution: Slackware64 14.2
Posts: 779

Original Poster
Rep: Reputation: 107Reputation: 107
Quote:
Originally Posted by dugan View Post
Yes. That's what multilib is for.
thanks. I thought I remembered reading that there were certain cases that it had to actually be a 32 bit OS for certain programs to be able to run.
 
Old 02-22-2011, 06:20 PM   #4
SpelledJ
Member
 
Registered: Jun 2006
Location: Birmingham, AL
Distribution: Slackware64-13.1, 12.1
Posts: 119

Rep: Reputation: 20
Last weekend I was upgrading Firefox and didn't initially realize I had downloaded the 32-bit version on my 64-bit machine. I did an upgradepkg, replacing my older 64-bit copy with the latest 32-bit version. I've got multilib setup, and 32-bit Firefox ran without any noticeable difference. I happened to take one more look at the package name and realized it wasn't x86_64, and replaced it just to keep my system clean.
 
Old 02-23-2011, 06:21 AM   #5
Cultist
Member
 
Registered: Feb 2010
Location: Georgia
Distribution: Slackware64 14.2
Posts: 779

Original Poster
Rep: Reputation: 107Reputation: 107
quick question before I do this. are there any reasons a person should go with x86 slackware rather than multilib enabled slackware64?

and will the 32bit-only Adobe Flash Player plugin work in 64bit Firefox?

Last edited by Cultist; 02-23-2011 at 06:30 AM.
 
Old 02-23-2011, 06:57 AM   #6
Ramurd
Member
 
Registered: Mar 2009
Location: Rotterdam, the Netherlands
Distribution: Slackwarelinux
Posts: 703

Rep: Reputation: 111Reputation: 111
If you happen to have a 32-bit system, x86_64 will not work. So, first you'll need to have a system that's capable of running 64-bit.
Another reason people have posted about is that they don't want a multi-lib system. Frankly, I don't know why one would not want that, but that's just me I guess. There are 32-bit applications you cannot recompile yourself, and those are not going to stop me from running 64bit in general.

And to confirm: yes: multilib is just about that: running 32bit applications in a 64bit environment. Too bad: but the reverse won't work as easily. You'll need a layer in between (qemu for example) to emulate a 64bit processor...
 
Old 02-23-2011, 07:02 AM   #7
Cultist
Member
 
Registered: Feb 2010
Location: Georgia
Distribution: Slackware64 14.2
Posts: 779

Original Poster
Rep: Reputation: 107Reputation: 107
Quote:
Originally Posted by Ramurd View Post
There are 32-bit applications you cannot recompile yourself, and those are not going to stop me from running 64bit in general.
so if a program is a precompiled .bin application built for 32bit, it won't work even on a 64bit multilib?
 
Old 02-23-2011, 07:32 AM   #8
jhw
Member
 
Registered: Apr 2010
Posts: 83

Rep: Reputation: 32
It WILL work on a multilib system. What Ramurd is saying is just that you need a multilib system if you are running 64bit and you still want to be able to run 32bit applications.
 
Old 02-23-2011, 07:36 AM   #9
Ramurd
Member
 
Registered: Mar 2009
Location: Rotterdam, the Netherlands
Distribution: Slackwarelinux
Posts: 703

Rep: Reputation: 111Reputation: 111
Quote:
so if a program is a precompiled .bin application built for 32bit, it won't work even on a 64bit multilib?
No, wrong interpretation!

In short: a program will run if it's libraries / dependencies are installed correctly. So if the base 32bit libraries are installed (which is what multilib does) other 32bit applications can be compiled and thus also run.

Read more carefully and look for the context: I replied on the question if there is any reason to keep running x86 versions rather than 64bit multi-libbed. So I quote myself here:
Quote:
Another reason people have posted about is that they don't want a multi-lib system. Frankly, I don't know why one would not want that, but that's just me I guess. There are 32-bit applications you cannot recompile yourself, and those are not going to stop me from running 64bit in general.
That's about the reason to keep runnin x86: for keeping the system "clean" without the 32bit libraries as dependencies installed. I'll stretch that line a bit with a few extra words: There are 32-bit applications you cannot recompile yourself, which I still can run when you run multilib, so those are not stopping me from running 64bit in general.

Is it clear this way?
 
1 members found this post helpful.
Old 02-23-2011, 08:37 AM   #10
dugan
LQ Guru
 
Registered: Nov 2003
Location: Canada
Distribution: distro hopper
Posts: 11,233

Rep: Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320
Quote:
Originally Posted by Cultist View Post
and will the 32bit-only Adobe Flash Player plugin work in 64bit Firefox?
Yes if you use nspluginwrapper.

Why would this be a concern though, when there's a 64-bit Flash player plugin that works perfectly well? Just install the "square preview" release, either from Adobe's site, or via Alien Bob's package.

Last edited by dugan; 02-23-2011 at 08:39 AM.
 
Old 02-23-2011, 09:49 AM   #11
Slax-Dude
Member
 
Registered: Mar 2006
Location: Valadares, V.N.Gaia, Portugal
Distribution: Slackware
Posts: 528

Rep: Reputation: 272Reputation: 272Reputation: 272
Please remember that is a 32bit "program" has dependencies, those must be 32bit as well

example: "program A", which is only available in 32bit, depends on "program B" + "library 1" + " library 2"
On your brand new slackware64, you only have "library 2" installed, but it's the 64bit version...
... so, for "program A" to work, you have to compile the 32bit version of "program B" + "library 1" + " library 2"
 
Old 02-23-2011, 02:09 PM   #12
Skaperen
Senior Member
 
Registered: May 2009
Location: center of singularity
Distribution: Xubuntu, Ubuntu, Slackware, Amazon Linux, OpenBSD, LFS (on Sparc_32 and i386)
Posts: 2,684
Blog Entries: 31

Rep: Reputation: 176Reputation: 176
Quote:
Originally Posted by Ramurd View Post
In short: a program will run if it's libraries / dependencies are installed correctly. So if the base 32bit libraries are installed (which is what multilib does) other 32bit applications can be compiled and thus also run.
You don't actually have to install all 32bit libraries. You only need enough to satisfy the dependencies of what 32bit programs you want to run (which might be a lot for some things like Firefox). Statically linked 32bit programs shouldn't have any issue.

One interesting question is: what do you get if you compile a C program on a multilib system?
 
Old 02-23-2011, 02:16 PM   #13
Ramurd
Member
 
Registered: Mar 2009
Location: Rotterdam, the Netherlands
Distribution: Slackwarelinux
Posts: 703

Rep: Reputation: 111Reputation: 111
A statically linked program should not have any issues, true. Since most programs are dynamically linked, I did not mention statically linked programs for brevity and keeping things a bit less complex, as there is theory and practice ;-)

What you get if you compile a program on a multilib system depends on how you setup the environment; By default you'd get 64bit programs; For example in Alien Bob's multilib packages (which I assume are the way most people setup their multilib system in Slackware at least) there's a script that sets your environment to point to the 32bit libraries, so that you'd get a 32 bit application.
 
Old 02-23-2011, 04:30 PM   #14
Skaperen
Senior Member
 
Registered: May 2009
Location: center of singularity
Distribution: Xubuntu, Ubuntu, Slackware, Amazon Linux, OpenBSD, LFS (on Sparc_32 and i386)
Posts: 2,684
Blog Entries: 31

Rep: Reputation: 176Reputation: 176
Quote:
Originally Posted by Ramurd View Post
A statically linked program should not have any issues, true. Since most programs are dynamically linked, I did not mention statically linked programs for brevity and keeping things a bit less complex, as there is theory and practice ;-)

What you get if you compile a program on a multilib system depends on how you setup the environment; By default you'd get 64bit programs; For example in Alien Bob's multilib packages (which I assume are the way most people setup their multilib system in Slackware at least) there's a script that sets your environment to point to the 32bit libraries, so that you'd get a 32 bit application.
I think there's more to it than that. But maybe gcc will just generate either 32-bit or 64-bit code based on the environment? What about the other tools? I can believe the linker could figure it out dynamically (and complain if there is an incompatible mix). Don't know about binutils.

But at this point, I'm doing duallib instead of multilib, so I have cleaner semantics.
 
Old 02-23-2011, 04:42 PM   #15
Ramurd
Member
 
Registered: Mar 2009
Location: Rotterdam, the Netherlands
Distribution: Slackwarelinux
Posts: 703

Rep: Reputation: 111Reputation: 111
don't have Alien Bob's multilib packages in front of me, but weren't the binutils there as well; Anyway: if you tell gcc to link against 32bit libraries and build a 32bit binary, the result will be a 32bit binary. If you make either of the two 64bit, you'll get errors;

And what would be the difference between duallib and multilib in your view?
 
  


Reply



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
Slackware64 multilib and ettercap Bart_ Slackware 1 12-27-2010 06:23 AM
[SOLVED] compat32-packages for Slackware64 13.1 multilib integrale16 Slackware 4 10-03-2010 01:32 PM
Keeping Slackware64 multilib updated . . . Lufbery Slackware 8 09-24-2010 04:16 AM
Building WINE on Slackware64 multilib? Lufbery Slackware 12 07-19-2010 06:22 PM
[SOLVED] Google Earth Slackware64 Multilib mlangdn Slackware 20 03-19-2010 03:35 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 02:08 PM.

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