VOGONS


First post, by Blakkie

User metadata

Hi guys,

I have been trying to get DOSbox to compile and install on my linux box and it is just causing me head aches. (though it is not really Dosbox's fault)

I have installed SDL development packages from rpms on SDL website

When I try to do a ./configure it comes up with SDL not being there,as it couldn't run the test program.
This is the output from the config.log


configure:4020: gcc -o conftest -g -O2 -I/usr/include/SDL -D_REENTRANT conftest.c -L/usr/lib -Wl,-rpath,/usr/lib -lSDL -lpthread >&5
/usr/bin/ld: skipping incompatible /usr/lib/libSDL.a when searching for -lSDL
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-mandriva-linux-gnu/4.0.1/../../../libSDL.a when searching for -lSDL
/usr/bin/ld: skipping incompatible /usr/lib/libSDL.a when searching for -lSDL
/usr/bin/ld: cannot find -lSDL
collect2: ld returned 1 exit status
configure:4023: $? = 1
configure: program exited with status 1
configure: failed program was:
| /* confdefs.h. */

So obviously there is some problem finding SDL, have I missed some vital step? or am I just being stupid? (maybe not answer that second question)

I'm a bit of a linux noob, so my knowledge of compiling and configuring is pretty hazy so some help would be appreciated. I have trawled lots of FAQs, forums and stuff, and this forum seemed the most likely to be able to help.

Cheers
Andy

I am running Mandriva 2006 on an AMD64 2800+

Reply 1 of 5, by HunterZ

User metadata
Rank l33t++
Rank
l33t++

I'm not a Linux user, but it looks like it's finding your libSDL.a files but is saying they're "incompatible". What version of SDL did you install?

Edit: I think 1.2 or higher may be required: http://www.libsdl.org/download-1.2.php

Reply 2 of 5, by nsmcovox

User metadata
Rank Newbie
Rank
Newbie

My question is: have you tried just installing a regular game that depends on the main libsdl RPM package. Ordinarily when you compile a game, it chooses to link to the lib file libSDL.so.1 (.so being a library file that's read by the program at runtime). In this instance, it appears to have found a static library (libSDL.a, basically an archive full of binary code which is built into the executable at compile time), but rejected it. It appears to be looking for libSDL.so, which should be installed with the ordinary non-development SDL package.

Also, as you appear to be running the AMD64 compiler, are you sure the SDL library is an AMD64-compatible version of the RPM? Just a thought.

Last edited by nsmcovox on 2006-01-19, 13:23. Edited 1 time in total.

Reply 3 of 5, by dougdahl

User metadata
Rank Member
Rank
Member

Several possibilities present themselves to me:
1-You may have to download the SDL as well as SDL-devel packages. Quite a few programs will require files provided by -devel packages when they are compiling.
For example on my computer the /usr/lib/libSDL.a is provided by the SDL-devel package as opposed to SDL. (I apologize if you already have but I was unsure whether by "SDL development packages" you meant just SDL-1.2.9 packages from the developer's website or not)


2-The packages you have may have been intended for x86 instead of amd64. I don't have a 64 computer so I don't know if that would be a problem. Or what, if any, are the differences between i586, amd64, or x86-64. You could always try looking for a amd64 version. There are some that look close at
http://fr2.rpmfind.net/linux/rpm2html/search. … .&system=&arch=
But I don't know if they are precisely what you are looking for.


3-The libSDL.a may have been placed in a different spot. In looking at a Fedora x86-64 SDL-devel(just as an example), the libSDL.a gets placed in /usr/lib64 not /usr/lib. You may want to try looking for libSDL.a and if it gets placed elsewhere consider a symbolic link to /usr/lib.
(Using /usr/lib64 as an example of where it might be the command would be "ln -s /usr/lib64/libSDL.a /usr/lib" )
Not sure how you want to check for libSDL.a. On my system I could run a "slocate libSDL.a", failing that go to the /usr directory (or if that fails the / directory) and run "find -iname libSDL.a" but it takes much, much longer depending upon the number and size of files to search through.
I usually want to keep track of such files as if I change or upgrade, these files tend to get left behind instead of being either erased or corrected and could conceivably cause problems.
Alternately if there is a libSDL.a, there may be a way to set it up so that when compiling that it will look in the right spot, but I am not quite sure how to do it correctly.



If all else fails there is a Mandriva-amd64 version at
http://fr2.rpmfind.net//linux/RPM/mandriva/de … mdk.x86_64.html
No idea about dependencies.

Reply 4 of 5, by gulikoza

User metadata
Rank Oldbie
Rank
Oldbie

incompatible usually means it's the wrong library. Maybe you've installed 32-bit SDL lib and trying to build a 64-bit dosbox or the other way around...

http://www.si-gamer.net/gulikoza

Reply 5 of 5, by Guest

User metadata

Thanks guys,

sorry I forgot to mention my version of SDL was 1.2.9 or something like that, but the real problem was the incompatability with my AMD64, installing 64bit version of SDL and Dosbox from RPM have solved this problem, not as nice as compiling it myself, but there you go. At least it works!!

Cheers
Andy