LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
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-21-2010, 02:31 AM   #1
escaflown
Member
 
Registered: Apr 2009
Location: Canada
Distribution: Slackware
Posts: 237

Rep: Reputation: 30
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?
 
Old 02-21-2010, 02:39 AM   #2
Daedra
Senior Member
 
Registered: Dec 2005
Location: Springfield, MO
Distribution: Slackware64-14.1
Posts: 1,223

Rep: Reputation: 177Reputation: 177
generally

-DLIB_SUFFIX=${LIBDIRSUFFIX} \

---


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

Last edited by Daedra; 02-21-2010 at 02:32 PM.
 
Old 02-21-2010, 05:17 AM   #3
rpedrica
Member
 
Registered: Nov 2008
Location: Cape Town
Distribution: Slackware64 -current
Posts: 208

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

ARCH=${ARCH:-x86_64}
or
ARCH=${ARCH:-i486}
 
Old 02-21-2010, 06:37 AM   #4
Alien Bob
Slackware Contributor
 
Registered: Sep 2005
Location: Eindhoven, The Netherlands
Distribution: Slackware
Posts: 5,305

Rep: Reputation: Disabled
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
 
1 members found this post helpful.
Old 02-21-2010, 10:12 AM   #5
escaflown
Member
 
Registered: Apr 2009
Location: Canada
Distribution: Slackware
Posts: 237

Original Poster
Rep: Reputation: 30
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
 
Old 02-21-2010, 10:31 AM   #6
lumak
Member
 
Registered: Aug 2008
Location: Phoenix
Distribution: Arch
Posts: 799
Blog Entries: 32

Rep: Reputation: 109Reputation: 109
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.

Last edited by lumak; 02-21-2010 at 10:35 AM.
 
Old 02-21-2010, 11:08 AM   #7
wadsworth
Member
 
Registered: Aug 2007
Distribution: Slackware64 13.37
Posts: 215

Rep: Reputation: 64
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.
 
Old 02-21-2010, 02:27 PM   #8
escaflown
Member
 
Registered: Apr 2009
Location: Canada
Distribution: Slackware
Posts: 237

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by wadsworth View Post
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
 
Old 02-22-2010, 09:58 AM   #9
AlvaroG
Member
 
Registered: Jul 2009
Location: Canelones, Uruguay
Distribution: Slackware
Posts: 128

Rep: Reputation: 31
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.
 
Old 02-22-2010, 07:11 PM   #10
escaflown
Member
 
Registered: Apr 2009
Location: Canada
Distribution: Slackware
Posts: 237

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by AlvaroG View Post
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!
 
Old 02-22-2010, 08:39 PM   #11
lumak
Member
 
Registered: Aug 2008
Location: Phoenix
Distribution: Arch
Posts: 799
Blog Entries: 32

Rep: Reputation: 109Reputation: 109
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.
 
Old 02-22-2010, 10:33 PM   #12
escaflown
Member
 
Registered: Apr 2009
Location: Canada
Distribution: Slackware
Posts: 237

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by lumak View Post
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 ???
 
Old 02-23-2010, 02:17 AM   #13
gnashley
Amigo developer
 
Registered: Dec 2003
Location: Germany
Distribution: Slackware
Posts: 4,766

Rep: Reputation: 474Reputation: 474Reputation: 474Reputation: 474Reputation: 474
Everything under /usr/local should be empty unless *you* install something there.
 
Old 02-23-2010, 07:31 AM   #14
escaflown
Member
 
Registered: Apr 2009
Location: Canada
Distribution: Slackware
Posts: 237

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by gnashley View Post
Everything under /usr/local should be empty unless *you* install something there.
Ok. Thanks.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Reversing Multilib mlangdn Slackware 3 02-05-2010 12:00 PM
ffmpeg Slackbuild fails in current multilib damgar Slackware 4 01-09-2010 09:12 PM
Multilib woes... Alexvader Slackware 18 12-16-2009 07:11 AM
Question about multilib ProtoformX Linux From Scratch 3 08-06-2009 04:02 AM
Multilib - impacts? cs-cam Linux - General 0 08-06-2006 10:55 PM


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

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration