LinuxQuestions.org
Visit Jeremy's Blog.
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-21-2010, 02:31 AM   #1
escaflown
Member
 
Registered: Apr 2009
Location: Canada
Distribution: Slackware
Posts: 239

Rep: Reputation: 31
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-15.0
Posts: 2,683

Rep: Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375
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: 281

Rep: Reputation: 42
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: 8,559

Rep: Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106
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: 239

Original Poster
Rep: Reputation: 31
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: 111Reputation: 111
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: 65
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: 239

Original Poster
Rep: Reputation: 31
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: 147

Rep: Reputation: 43
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.
 
1 members found this post helpful.
Old 02-22-2010, 07:11 PM   #10
escaflown
Member
 
Registered: Apr 2009
Location: Canada
Distribution: Slackware
Posts: 239

Original Poster
Rep: Reputation: 31
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: 111Reputation: 111
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: 239

Original Poster
Rep: Reputation: 31
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,928

Rep: Reputation: 612Reputation: 612Reputation: 612Reputation: 612Reputation: 612Reputation: 612
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: 239

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


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
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

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

All times are GMT -5. The time now is 12:42 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