-lSDL-ni qidirishda mos kelmaydigan /libSDL.a atlamoqda

Men IBMda "ioquake3" ni ishlab chiqarishga harakat qilaman. Lekin, "llll" xatosini qidirishda "mos kelmaydigan /libSDL.a" ni ataylab olishni davom ettirdim. Men sizni Linuxda boshlang'ich deb bilaman, ammo quilli emas! Har qanday kutubxonani o'rnatish uchun hech qanday imtiyozlarim yo'q va server administratorimiz hozircha bir hafta mobaynida javob bermayapti. Shunday qilib, hozir men hal qilish uchun sinovdan o'tdim. Xabarda aytilganidek, tizimdagi kutubxona mos kelmaydi. Shunday qilib, Ubuntu saytiga bordim va SDL PPC kutubxonasini yangitdan yuklab oldim. Men uni yukladim va belgilangan papkaga ochdim. Biroq, GCC bu kutubxonalarning qaerda ekanligini bilmaydi. Shunday qilib, "LD_LIBRARY_PATH =" ~/minoru/cfe2/yasirTemp/ioquake3dev/zzz/pkgs/usr/lib "  mening kutubxonalarim bo'lgan GCCga aytish. Biroq, men har doim "ish" qilsam, ro'yxatdagi "eksport" papkasini qilmayman.

Iltimos, faqat mos kelmaydigan SDL kutubxonasi muammoni tuzatish uchun boshqa usul bilan yordam bering.

Quyida chiqdi:

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  [email protected]  libSDLmain.a  libopenal.a  [email protected]  pkgconfig/
rmc104:~/minoru/cfe2/yasirTemp/ioquake3dev/zzz/pkgs/usr/lib[7191]%

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


4

1 javoblar

LD_LIBRARY_PATH determines the search path for shared libraries on runtime. What you want is to say where the library is on compile time. You can use LDFLAGS for this - with the -L switch you can set the search path for libraries: make LDFLAGS=-L/path/to/your/SDL.

Ehtimol, Ubuntu'dan olgan SDL ikkiliklari, mos kelmaydigan versiya va h.k. tufayli ishlamasligi mumkin. Bunday holatda SDL ni yuklab olish va tuzishni taklif qilaman.

3
qo'shib qo'ydi
Ha, bu yo'l .so fayllariga bir xil bo'ladi. LDFLAGS ni o'rnatganingizda kompilyatsiya qiladimi?
qo'shib qo'ydi muallif Antti, manba
Javob uchun rahmat. Men taklifingizni sinab ko'rdim. Men qo'shilgan bayroqni chiqishda ko'rmoqdaman. Biroq, yangi qidirish yo'li "qidirish" katalogida chiqmaydi. Men bilan .so fayllarini qo'shish kerak bo'lgan yo'l bormi?
qo'shib qo'ydi muallif user598208, manba
Mashinam 64 bit bo'lganida libSDL.so ning 32-bit ekanligini bilib oldim. Shunday qilib, ba'zi bir o'zgarishlar qildim, yangi libSDL.a & libSDL.so faylini tuzdim va ularni "make" papkasiga nusxalashdi. Endi esa, "./" yo'lini izlash yo'llarida topasiz. Ammo, "file -L ./libSDL.so" ni ko'rganimda, yangi olingan libSDL.so 64-bit emas, balki 32-bit ekanligini bilaman! Buning uchun libSDL.so ni "64-bit" va 32-bit emas, balki ularni "kompilyatsiya" qilishni so'raysizmi?
qo'shib qo'ydi muallif user598208, manba
Men faqat serverimiz debianni "64-bit kompilyatsiya qilmasligini" bilib oldim. 32-bitlik kompilyatsiya qilish uchun "bajarish" buyrug'iga qo'shishim mumkin bo'lgan variantni bilasizmi?
qo'shib qo'ydi muallif user598208, manba
Men buni topdim: BASE_CFLAGS = -m32 qiling
qo'shib qo'ydi muallif user598208, manba