-   Slackware (
-   -   Compile SDL app in Slackware64 w Eric's Multilib installed (

lightkuragari 07-03-2010 12:38 PM

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:, needed by /usr/lib64/gcc/x86_64-slackware-linux/4.4.4/../../../../lib/, 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/ 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:


and no other is set in my project's include path.
What do you think is wrong?

Alien Bob 07-03-2010 04:02 PM

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/ and the symbolic link to that file, /usr/lib/ 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 FAQ:


lightkuragari 07-04-2010 08:15 PM

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 :cry: )

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?

Petri Kaukasoina 07-05-2010 03:05 AM


Originally Posted by lightkuragari (Post 4023885)
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 :cry: )

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:

rm $(find /usr/lib -maxdepth 1 -type l -name '*.so')
rm $(find /lib -maxdepth 1 -type l -name '*.so')
rm /usr/lib/ /usr/lib/
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.

lightkuragari 07-06-2010 08:54 AM

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

I will try it when i have the chance.

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