Click here to Skip to main content
15,886,026 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello,
I am trying to "make" ioquake3 on IBM machine.
But, I kept getting the "skipping incompatible /libSDL.a when searching for -lSDL" error.
I am thee ultimate beginner at Linux, but not a quitter!
I have no privileges to install any libraries, and our server admin is not responding for about a week now. So, I've been googling/testing for for a solution now.
As the message said, the library that is on the system is incompatible. So, I went to the Ubuntu site, and downloaded SDL PPC library freshly.
I uploaded, unpacked it into a designated folder.
However, GCC doesn't know where those libraries are. So, I found something called "LD_LIBRARY_PATH="~/minoru/cfe2/yasirTemp/ioquake3dev/zzz/pkgs/usr/lib"
to tell GCC where my libraries are.
However, everytime I do a "make", I do not my "export" folder in the list.

Please help, even with a different way, just to fix my incompatible SDL library problem.

below is the output:

CSS
rmc104:~/minoru/cfe2/yasirTemp/ioquake3dev/svfb_201110271440/ioquake3dev_clean[7188]% echo $LD_LIBRARY_PATH
~/minoru/cfe2/yasirTemp/ioquake3dev/zzz/pkgs/usr/lib
rmc104:~/minoru/cfe2/yasirTemp/ioquake3dev/svfb_201110271440/ioquake3dev_clean[7189]% cd ~/minoru/cfe2/yasirTemp/ioquake3dev/zzz/pkgs/usr/lib
rmc104:~/minoru/cfe2/yasirTemp/ioquake3dev/zzz/pkgs/usr/lib[7190]% ls
libSDL.a  libSDL.la  libSDL.so@  libSDLmain.a  libopenal.a  libopenal.so@  pkgconfig/
rmc104:~/minoru/cfe2/yasirTemp/ioquake3dev/zzz/pkgs/usr/lib[7191]%


CSS
rmc104:~/minoru/cfe2/yasirTemp/ioquake3dev/svfb_201110271440/ioquake3dev_clean[7174]% make
make[1]: Entering directory `/r/home7/yasir/minoru/cfe2/yasirTemp/ioquake3dev/svfb_201110271440/ioquake3dev_clean'

Building ioquake3 in build/release-linux-ppc64:
  PLATFORM: linux
  ARCH: ppc64
  VERSION: 1.36
  COMPILE_PLATFORM: linux
  COMPILE_ARCH: ppc64
  CC: cc

  CFLAGS:
    -MMD
    -Wall
    -fno-strict-aliasing
    -Wimplicit
    -Wstrict-prototypes
    -pipe
    -DUSE_ICON
    -I/usr/include/SDL
    -D_GNU_SOURCE=1
    -D_REENTRANT
    -DUSE_OPENAL
    -DUSE_CURL
    -maltivec
    -Icode/SDL12/include
    -m64
    -DUSE_MUMBLE
    -DUSE_VOIP
    -DFLOATING_POINT
    -DUSE_ALLOCA
    -Icode/libspeex/include
    -DUSE_LOCAL_HEADERS
    -DPRODUCT_VERSION="1.36"
    -DNDEBUG
    -O3
    -ffast-math
    -funroll-loops
    -fomit-frame-pointer

  LDFLAGS:

  LIBS:
    -ldl
    -lm

  Output:
    build/release-linux-ppc64/ioq3ded.ppc64
    build/release-linux-ppc64/ioquake3.ppc64
    build/release-linux-ppc64/baseq3/cgameppc64.so
    build/release-linux-ppc64/baseq3/qagameppc64.so
    build/release-linux-ppc64/baseq3/uippc64.so
    build/release-linux-ppc64/missionpack/cgameppc64.so
    build/release-linux-ppc64/missionpack/qagameppc64.so
    build/release-linux-ppc64/missionpack/uippc64.so

make[2]: Entering directory `/r/home7/yasir/minoru/cfe2/yasirTemp/ioquake3dev/svfb_201110271440/ioquake3dev_clean'
make[2]: `build/release-linux-ppc64/ioq3ded.ppc64' is up to date.
LD build/release-linux-ppc64/ioquake3.ppc64
/usr/bin/ld: skipping incompatible /usr/lib/libSDL.so when searching for -lSDL
/usr/bin/ld: skipping incompatible /usr/lib/libSDL.a when searching for -lSDL
/usr/bin/ld: skipping incompatible /usr/lib/gcc/powerpc-linux-gnu/4.4.5/../../../libSDL.so when searching for -lSDL
/usr/bin/ld: skipping incompatible /usr/lib/gcc/powerpc-linux-gnu/4.4.5/../../../libSDL.a when searching for -lSDL
/usr/bin/ld: skipping incompatible /usr/lib/libSDL.so 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
make[2]: *** [build/release-linux-ppc64/ioquake3.ppc64] Error 1
make[2]: Leaving directory `/r/home7/yasir/minoru/cfe2/yasirTemp/ioquake3dev/svfb_201110271440/ioquake3dev_clean'
make[1]: *** [targets] Error 2
make[1]: Leaving directory `/r/home7/yasir/minoru/cfe2/yasirTemp/ioquake3dev/svfb_201110271440/ioquake3dev_clean'
make: *** [release] Error 2
rmc104:~/minoru/cfe2/yasirTemp/ioquake3dev/svfb_201110271440/ioquake3dev_clean[7175]% ls
Posted

This is usually due to incompatible compile. For example, libSDL.a is for 64 bit and and you are compiling 32 bit.

Try using the file command. This will give you details on the archive type. For example file -L /usr/lib/libSDL.so.
Compare this to to running the file command on any of the output files that you have compiled.
Make sure you are in the top level of your quake folder (the folder where you type make) and type file -L `find . | grep "\.[ao]$" | tail -n1`" exactly as it is there. ` is the grave character (the key to the left of the 1 key at the top of the keyboard).

The bits that are most important are architecture (either 32-bit or 64-bit), platform (something like Intel 80386) and version. The format may or may not matter, depending on what they are (probably ELF). Ignore anything like dynamically linked or stripped, that is irrelevant.

If some of the output is different also run uname -a. This will tell you (somewhat cryptically) what the computer architecture is. Needless to say, this is what you want the file command to say too.

If they are different architectures and you still need help, reply to this with the output of both file commands and the uname command.
 
Share this answer
 
v2
Comments
coffeenet 30-Oct-11 10:35am    
Sorry for the late reply, weekend and all. This is what you kindly asked for:
rmc104:~/minoru/cfe2/yasirTemp/ioquake3dev/svfb_201110271440/ioquake3dev_clean[7322]% uname -a
Linux rmc104 2.6.32-5-powerpc64 #1 SMP Tue Jun 14 11:04:52 UTC 2011 ppc64 GNU/Linux
rmc104:~/minoru/cfe2/yasirTemp/ioquake3dev/svfb_201110271440/ioquake3dev_clean[7323]% file -L /usr/lib/libSDL.so
/usr/lib/libSDL.so: ELF 32-bit MSB shared object, PowerPC or cisco 4500, version 1 (SYSV), dynamically linked, with unknown capability 0x41000000 = 0x13676e75, with unknown capability 0x10000 = 0xb0401, stripped
rmc104:~/minoru/cfe2/yasirTemp/ioquake3dev/svfb_201110271440/ioquake3dev_clean[7324]%
Ok, here I am seeing 2.6.32-5-powerpc64, which means the computer is 64 bit PowerPC. In the output of the file comand however I am seeing 32-bit, and from your original question, Building ioquake3 in build/release-linux-ppc64

So, the server is 64 bit, and you are compiling for 64 bit, however the libSDL.a files you have are only 32 bit.

Not sure why the libSDL is only 32 bit, but you are going to need the 64 bit one. Try searching the computer for other libSDL.a files, there may be one that is not in the search paths. Use find / | grep "libSDL\.a$"

if you find one, you can add an additional search path to the compier with the -L/path/to/directory option if you can edit the makefile, otherwise you can create a symbolic link to the correct file in the directory the make command is in when trying to link.
cd /r/home7/yasir/minoru/cfe2/yasirTemp/ioquake3dev/svfb_201110271440/ioquake3dev_clean
ln -s /path/to/libSDL.a libSDL.a


If there is none which are 64 bit you can either
a. Install the 64 bit version (or get someone to do it for you)
b. Get the source code and compile it yourself
c. You may be able to reconfigure your solution to 32 bit (but then you may get this error on libraries which you only have in 64 bit, or may not run on the 64 bit computer)
 
Share this answer
 
Comments
coffeenet 30-Oct-11 11:30am    
Thank you for that quick response!
As for your kindly suggested solutions:
a. I tried the find, but:
<pre lang="vb">rmc104:~/minoru/cfe2/yasirTemp/ioquake3dev/zzz/SDL-1.2.13/build[7419]% find / | grep "libSDL\.a$"
find: `/var/cache/ldconfig': Permission denied
find: `/var/run/exim4': Permission denied
.
.
.
</pre>
b. I did the wget, and got the tar file. I did the "./configure", then, did "make". But:
<pre lang="vb">ranlib build/.libs/libSDL.a
creating build/libSDL.la
(cd build/.libs && rm -f libSDL.la && ln -s ../libSDL.la libSDL.la)
gcc -g -O2 -I./include -D_GNU_SOURCE=1 -fvisibility=hidden -I/usr/include/kde/artsc -pthread -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -D_REENTRANT -DXTHREADS -I/usr/include/directfb -D_REENTRANT -D_REENTRANT -DHAVE_LINUX_VERSION_H -c ./src/main/dummy/SDL_dummy_main.c -o build/SDL_dummy_main.o
ar cru build/libSDLmain.a build/SDL_dummy_main.o
ranlib build/libSDLmain.a</pre>
I don't know why it does a "rm -f libSDL.la at the end. After, the make finishes, I can't find libSDL.a anywhere.
c. I would like to do b instead because of the reason you kindly mentioned.

Where I live its already past-midnight. So, I have to go to sleep. I would really appreciate it if you could kindly tell me how to build the library with my VERY limited permissions!!!

Thank you again so much for the help!
Andrew Brock 30-Oct-11 11:42am    
Ok.
a. Ignore permission denied, I doubt it is hiding in any folder you don't have access to.

b. rm -f libSDL.la is deleting the link. It then creates a new link ("ln -s") to the libSDL.la in the parent directory.

You should find libSDL.a at build/.libs/libSDL.a
Note that anything starting with a period is hiden, and hence the folder ".libs" wont show up when you do an "ls". "ls -a" will list all, and it will then show up.

You can either copy that file into /r/home7/yasir/minoru/cfe2/yasirTemp/ioquake3dev/svfb_201110271440/ioquake3dev_clean
or create a symbolic link with "ln -s build/.libs/libSDL.a /r/home7/yasir/minoru/cfe2/yasirTemp/ioquake3dev/svfb_201110271440/ioquake3dev_clean/"

c. Good call

Also, where I live it is almost 3am :) I am working on my thesis presentation for tomorrow
coffeenet 30-Oct-11 21:37pm    
Good morning : )
Thank you for those great answers despite you having to write your thesis presentation :o (PhD?)
I used an ftp program, and copied libSDL.a from build/.libs/ to my program folder, where I "make". (Just wondering, why isn't there libSDL.so?)
But, I am still getting the incompatible error.
rmc104:~/minoru/cfe2/yasirTemp/ioquake3dev/svfb_201110271440/ioquake3dev_clean[7493]% make LDFLAGS=-L.
make[1]: Entering directory `/r/home7/yasir/minoru/cfe2/yasirTemp/ioquake3dev/svfb_201110271440/ioquake3dev_clean'

Building ioquake3 in build/release-linux-ppc64:
PLATFORM: linux
ARCH: ppc64
VERSION: 1.36
COMPILE_PLATFORM: linux
COMPILE_ARCH: ppc64
CC: cc

CFLAGS:
-MMD
-Wall
-fno-strict-aliasing
-Wimplicit
-Wstrict-prototypes
-pipe
-DUSE_ICON
-I/usr/include/SDL
-D_GNU_SOURCE=1
-D_REENTRANT
-DUSE_OPENAL
-DUSE_CURL
-maltivec
-Icode/SDL12/include
-m64
-DUSE_MUMBLE
-DUSE_VOIP
-DFLOATING_POINT
-DUSE_ALLOCA
-Icode/libspeex/include
-DUSE_LOCAL_HEADERS
-DPRODUCT_VERSION="1.36"
-DNDEBUG
-O3
-ffast-math
-funroll-loops
-fomit-frame-pointer

LDFLAGS:
-L.

LIBS:
-ldl
-lm

Output:
build/release-linux-ppc64/ioq3ded.ppc64
build/release-linux-ppc64/ioquake3.ppc64
build/release-linux-ppc64/baseq3/cgameppc64.so
build/release-linux-ppc64/baseq3/qagameppc64.so
build/release-linux-ppc64/baseq3/uippc64.so
build/release-linux-ppc64/missionpack/cgameppc64.so
build/release-linux-ppc64/missionpack/qagameppc64.so
build/release-linux-ppc64/missionpack/uippc64.so

make[2]: Entering directory `/r/home7/yasir/minoru/cfe2/yasirTemp/ioquake3dev/svfb_201110271440/ioquake3dev_clean'
make[2]: `build/release-linux-ppc64/ioq3ded.ppc64' is up to date.
LD build/release-linux-ppc64/ioquake3.ppc64
/usr/bin/ld: skipping incompatible ./libSDL.a when searching for -lSDL
/usr/bin/ld: skipping incompatible /usr/lib/libSDL.so when searching for -lSDL
/usr/bin/ld: skipping incompatible /usr/lib/libSDL.a when searching for -lSDL
/usr/bin/ld: skipping incompatible /usr/lib/gcc/powerpc-linux-gnu/4.4.5/../../../libSDL.so when searching for -lSDL
/usr/bin/ld: skipping incompatible /usr/lib/gcc/powerpc-linux-gnu/4.4.5/../../../libSDL.a when searching for -lSDL
/usr/bin/ld: skipping incompatible /usr/lib/libSDL.so 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
make[2]: *** [build/release-linux-ppc64/ioquake3.ppc64] Error 1
make[2]: Leaving directory `/r/home7/yasir/minoru/cfe2/yasirTemp/ioquake3dev/svfb_201110271440/ioquake3dev_clean'
make[1]: *** [targets] Error 2
make[1]: Leaving directory `/r/home7/yasir/minoru/cfe2/yasirTemp/ioquake3dev/svfb_201110271440/ioquake3dev_clean'
make: *** [release] Error 2
rmc104:~/minoru/cfe2/yasirTemp/ioquake3dev/svfb_201110271440/ioquake3dev_clean[7494]%
coffeenet 30-Oct-11 21:43pm    
I found "libSDL-1.2.so.0.11.2" so I renamed it to libSDL.so and copied it to my "make" folder.
Then compiled again. And got the same result. I did the "file" command:
rmc104:~/minoru/cfe2/yasirTemp/ioquake3dev/svfb_201110271440/ioquake3dev_clean[7497]% file -L ./libSDL.so
./libSDL.so: ELF 32-bit MSB shared object, PowerPC or cisco 4500, version 1 (SYSV), dynamically linked, with unknown capability 0x41000000 = 0x13676e75, with unknown capability 0x10000 = 0xb0401, not stripped
rmc104:~/minoru/cfe2/yasirTemp/ioquake3dev/svfb_201110271440/ioquake3dev_clean[7498]%

I guess the library is not compiling into 64 bit ones... How come?!
coffeenet 30-Oct-11 23:36pm    
I just learned that the debian our server "does not provide 64-bit compilation".
Do you know the option in which I can add to the "make" command to compile in 32-bit?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900