LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   slackbuild and multilib (https://www.linuxquestions.org/questions/slackware-14/slackbuild-and-multilib-790514/)

escaflown 02-21-2010 02:31 AM

slackbuild and multilib
 
The SlackBuilds FAQ suggests that setting LDFLAGS="-L/usr/lib${LIBDIRSUFFIX}" \ can help solving multilib issues related to the build process trying to link 32bit libraries instead of 64bit libraries. I was wondering how to achieve the same thing when the slackbuild relies on CMAKE?

Daedra 02-21-2010 02:39 AM

generally

-DLIB_SUFFIX=${LIBDIRSUFFIX} \

---


oh wait a minute, I misread your post sorry...

rpedrica 02-21-2010 05:17 AM

Or you can just edit the .SlackBuild file for the following field:

ARCH=${ARCH:-x86_64}
or
ARCH=${ARCH:-i486}

Alien Bob 02-21-2010 06:37 AM

I think both of you are missing the point here.
Escaflown talks about the fact that on a multilib system, the 32bit libraries can get in the way when linking your 64bit software into an executable program.

Escaflown, I think you should just try adding
Code:

export LDFLAGS="-L/usr/lib${LIBDIRSUFFIX}"
to your SlackBuild script, right before calling "cmake". The cmake should pick it up then according to thedocumentation I've read.
I did not run into this issue yet with any cmake build by the way.

Eric

escaflown 02-21-2010 10:12 AM

Thanks Bob! I tried your suggestion but it didn't work. I am having the issue with the kid3 slackbuild. The reason why I'm thinking about the build process trying to link to some 32 bits libraries is that it fails with:
Quote:

/usr/local/lib/libogg.so: could not read symbols: File in wrong format

lumak 02-21-2010 10:31 AM

Try using this:
Code:

CMAKE_PREFIX_PATH=/usr/lib$LIBDIRSUFFIX/qt \
cmake \

... wait that was my fix for QT... well regardless, just remove the /qt


come to think of it... That fix makes no sense... It helped compile q4wine though. GUI came up when I launched it, some other things didn't work though.

wadsworth 02-21-2010 11:08 AM

I was curious about this too, did a little searching and see this line often:
Code:

-DCMAKE_LD_FLAGS:STRING="-L/usr/lib64" \
I have no idea if this is correct, and haven't been in a situation to test it. ;)

escaflown 02-21-2010 02:27 PM

Quote:

Originally Posted by wadsworth (Post 3871565)
I was curious about this too, did a little searching and see this line often:
Code:

-DCMAKE_LD_FLAGS:STRING="-L/usr/lib64" \
I have no idea if this is correct, and haven't been in a situation to test it. ;)

I tried it and same result. It still tries to link 32 bits library

AlvaroG 02-22-2010 09:58 AM

In my case, I went the dirty and ugly way:

mv /usr/lib /usr/lib_
[compile]
mv /usr/lib_ /usr/lib

but I admit that's ugly and works only because I don't really use much 32bit stuff.

escaflown 02-22-2010 07:11 PM

Quote:

Originally Posted by AlvaroG (Post 3872689)
In my case, I went the dirty and ugly way:

mv /usr/lib /usr/lib_
[compile]
mv /usr/lib_ /usr/lib

but I admit that's ugly and works only because I don't really use much 32bit stuff.

:) I do agree: that's really ugly. But like you said it works. I'm still digging for finding a clean solution. Thanks!

lumak 02-22-2010 08:39 PM

I haven't tried this... but maybe there is a way to force ldconf to list the 64 libs before 32 libs by editing /etc/ld.so.conf?

and if updating it with /sbin/ldconfig doesn't do it, try moving /etc/ld.so.cache out of the way and then run it again.

escaflown 02-22-2010 10:33 PM

Quote:

Originally Posted by lumak (Post 3873317)
I haven't tried this... but maybe there is a way to force ldconf to list the 64 libs before 32 libs by editing /etc/ld.so.conf?

and if updating it with /sbin/ldconfig doesn't do it, try moving /etc/ld.so.cache out of the way and then run it again.

Thanx Lumak! Tried it but it didn't work. However, I got the slackbuild to finally compile. Like I said before, it was failing with the error message
Quote:

/usr/local/lib/libogg.so: could not read symbols: File in wrong format
So I noticed that I have the 64 bits version of libogg.so in /usr/lib64 but my /usr/local/lib64 is empty. So, I copied the libogg.so from /usr/lib64 to /usr/local/lib64. And the slackbuild succesfully compiled.
I am wondering now if it is normal that /usr/local/lib64 is empty ???

gnashley 02-23-2010 02:17 AM

Everything under /usr/local should be empty unless *you* install something there.

escaflown 02-23-2010 07:31 AM

Quote:

Originally Posted by gnashley (Post 3873523)
Everything under /usr/local should be empty unless *you* install something there.

Ok. Thanks.


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