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:
and no other is set in my project's include path.
What do you think is wrong?
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
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?
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:
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 01:02 AM.|