LinuxQuestions.org
Review your favorite Linux distribution.
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 07-03-2010, 12:38 PM   #1
lightkuragari
LQ Newbie
 
Registered: Jan 2005
Location: Cuernavaca, Morelos, México
Distribution: Slackware
Posts: 23

Rep: Reputation: 1
Unhappy Compile SDL app in Slackware64 w Eric's Multilib installed


Hi, I'm using slackware 64 13.1 and i followed alien bob's guide to a multilib system. Everything went amazingly perfect, i upgraded the listed packages, installed the compat32 packages and reinstalled my nvidia driver to include opengl 32 bit libs. After this i installed Eric's wine x86_64 package and configured DirectX, set up GTA San Andreas and all worked perfectly.

The problem now is that i tried to resume a development i'm currently working on, so i set up eclipse and cdt, created a new project, added my existing sources, i set up the libraries SDLmain, SDL and SDL_ttf (i have done this several times without any problem in 32 and 64 bit, but never with multilib), compiled and surprise!!! The linker says it can't find the following library:

/usr/lib64/gcc/x86_64-slackware-linux/4.4.4/../../../../x86_64-slackware-linux/bin/ld: warning: libXrandr.so.2, needed by /usr/lib64/gcc/x86_64-slackware-linux/4.4.4/../../../../lib/libSDL.so, not found (try using -rpath or -rpath-link)

so, i "slocated" it and found it in /usr/lib64.
I tried solving this by adding /usr/lib64 to /etc/ld.conf.so but it threw different errors in libSDL, so i guess it wasn't the right move. Could someone please orient me here? In my project environment, these are the directories listed in Include:

/usr/include
/usr/include/c++/4.4.4/
/usr/include/c++/4.4.4/backward
/usr/include/c++/x86_64-slackware-linux/32
/usr/lib64/gcc/x86_64-slackware-linux/4.4.4/include
/usr/lib64/gcc/x86_64-slackware-linux/4.4.4/include-fixed
/usr/lib64/qt/include
/usr/local/include

and no other is set in my project's include path.
What do you think is wrong?
 
Click here to see the post LQ members have rated as the most helpful post in this thread.
Old 07-03-2010, 04:02 PM   #2
Alien Bob
Slackware Contributor
 
Registered: Sep 2005
Location: Eindhoven, The Netherlands
Distribution: Slackware
Posts: 5,315

Rep: Reputation: Disabled
I see two possibilities, but you are not clear about it.

Either you are trying to compile a 32-bit program, after you have installed a full set of -compat32 packages (32-bit Slackware packages re-packaged for Slackware64's multilib). You would have libXrandr-compat32 on your system which provides the library file /usr/lib/libXrandr.so.2.2.0 and the symbolic link to that file, /usr/lib/libXrandr.so.2. In that case, you seem to be missing that package.

Or, you are trying to compile a 64-bit binary, and you are being bitten by the fact that /usr/lib64 is not searched before /usr/lib - we explain this in our slackbuilds.org FAQ: http://slackbuilds.org/faq/#multilib

Eric
 
2 members found this post helpful.
Old 07-04-2010, 08:15 PM   #3
lightkuragari
LQ Newbie
 
Registered: Jan 2005
Location: Cuernavaca, Morelos, México
Distribution: Slackware
Posts: 23

Original Poster
Rep: Reputation: 1
Thumbs up Thanks for the answer!

Somehow i thought i'd get an answer from you. That's great, thanks!

Currently i just want to compile my program in 64-bit, not as a requirement, i mean i just wanted to compile it for my current system configuration, later i will deal with cross compiling and all, but right now i'm only debugging and testing so i just want the thing to run.

As i was in a hurry, i chose to revert the multilib conversion process, so now i have my 64-bit only system again, which i love ( goodbye GTA )

But will give it a try again sometime soon. In the meantime, i think you gave me a valuable hint, but from what you say i suppose my application was getting compiled as a 32-bit app, because it looked for /usr/lib instead of /usr/lib64, right?

Anyway, thank you very much Eric. I hope this thread helps someone else as well because i haven't had the opportunity to help some other soul in disgrace :P mm... i wonder if i should mark this post as SOLVED?
 
Old 07-05-2010, 03:05 AM   #4
Petri Kaukasoina
Member
 
Registered: Mar 2007
Posts: 242

Rep: Reputation: 86
Quote:
Originally Posted by lightkuragari View Post
As i was in a hurry, i chose to revert the multilib conversion process, so now i have my 64-bit only system again, which i love ( goodbye GTA )
It is also possible to install multilib only partly to allow running 32-bit binaries without the ability to compile code to 32-bit binaries:

1. Don't install the multilib gcc packages, the vanilla Slackware gcc packages are enough.

2. Install the multilib glibc packages and the compat32-tools and all the compat32 compatibility packages.

3. remove all such stuff from the 32-bit /usr/lib and /lib directories what linker and configure scripts etc. might look, still leaving runtime support for 32-bit binaries:
Code:
rm $(find /usr/lib -maxdepth 1 -type l -name '*.so')
rm $(find /lib -maxdepth 1 -type l -name '*.so')
rm /usr/lib/libpthread.so /usr/lib/libc.so
rm /usr/lib/*.a /usr/lib/*.o /usr/lib/*.la
rm /lib/*.a /lib/*.la
rm /usr/lib/pkgconfig/*
This way your building process only finds the 64-bit stuff but you also have the 32-bit runtime compatibility needed to install and run 32-bit binaries.
 
1 members found this post helpful.
Old 07-06-2010, 08:54 AM   #5
lightkuragari
LQ Newbie
 
Registered: Jan 2005
Location: Cuernavaca, Morelos, México
Distribution: Slackware
Posts: 23

Original Poster
Rep: Reputation: 1
Smile

Thanks Petri, that's an interesting point, i didn't think about that.

I will try it when i have the chance.
 
  


Reply

Tags
multilib, sdl, slackware


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
[SOLVED] Broffice not compile on Slack64(multilib or no multilib);SlackBuild afreitascs Slackware 4 06-14-2010 07:16 AM
[SOLVED] Slackware64 multilib, can't compile 32-bit apps. RajahBrooke Slackware 19 06-05-2010 12:02 PM
[SOLVED] Transcode will not compile in Slackware64-13.0, Multilib TSquaredF Slackware 9 04-07-2010 10:39 PM
SDL is installed, included and linked, but will not compile SDL code mansizerooster Programming 10 05-31-2006 04:18 AM
OpenGL and SDL app wont compile redneon Programming 4 02-25-2006 09:45 PM


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