-   Slackware (
-   -   Slackware64 multilib compile error (

Breeze 04-30-2011 12:41 AM

Slackware64 multilib compile error
I have installed multilib by
And 32-bit programs can run.
When I compile packages,something error.


/usr/lib/***.so: could not read symbols: File in wrong format
collect2: ld returned 1 exit status
I have tried what say and not work too. Thanks!

samac 04-30-2011 01:32 AM

This is probably the section you need to re-read.

Compiling 32-bit programs

In case you need to compile a 32-bit program (wine and grub are two examples
of open source programs that are 32-bit only) you first configure your
shell environment by running the command:

. /etc/profile.d/

Note the 'dot' in front of the filename - that is actually part of the
commandline! It will change or create several environment variables so
that 32-bit versions of binaries are preferred.

You will be able to use standard SlackBuilds to build 32-bit packages for
Slackware64. There are two things to keep in mind:
(1) You will have to define the ARCH variable as 'x86_64' even though you
are compiling a 32-bit program!
(2) You will have to edit the SlackBuild and if it wants to use 'lib64/'
directories for "$ARCH = x86_64", you will have to force it to use 'lib/'
directories instead. Usually, this is accomplished by finding a definition
and change this line to

Alternately you could use sbopkg to manage your 3rd party applications it is available here.

I they don't have a package you could learn to write a slackbuild or use something that will do the job for you, such as or

Hope this helps.


Breeze 04-30-2011 02:30 AM

Packages can be compiled before I install multilib.

marrowsuck 05-01-2011 10:26 AM

Are you trying to compile a 64bit program?
If so, maybe this helps: 05-21-2011 01:21 PM

From: alien multilib Wiki page:

-Compiling 32-bit programs
"Rather than editing the script and change/remove CFLAGS definitions, you can set the ARCH to “x86_64” and save yourself some time."

Hi all,

I am a Slackware noob, so forgive me any stupid questions.
How do you set ARCH to “x86_64”? The instructions say not to edit the Slackbuild script. I have been looking around and this site seemed the most appropriate to ask this question.

Thanks much!

R 05-21-2011 01:56 PM

ARCH=x86_64 ./some.SlackBuild

Found it, I guess.

Didier Spaier 05-21-2011 02:28 PM

Ralf, could please ask one question in only one place? 05-22-2011 03:56 AM

Hi Didier,

I will, I'm new to this forum and trying to find my way. Thanks for responding.


All times are GMT -5. The time now is 08:04 AM.