LINUX.ORG.RU

не собирается swars

 ,


0

0

Решил найти Syndicate Wars Port и нашел на гитхабе, так как оригинальный сайт умер. Но оно доступно только для 32-битов.

https://github.com/swfans/swars

В инструкции для сборки указано

Now as our host is ready, we can start working on the actual swars sources. Go to that folder, and generate build scripts from templates using autotools:

autoreconf -ivf

Next, proceed with the build steps; we will do that in a separate folder.

mkdir -p release; cd release
PKG_CONFIG_PATH="/usr/lib/i386-linux-gnu/pkgconfig" CFLAGS="-m32" CXXFLAGS="-m32" LDFLAGS="-m32" ../configure
make V=1
Я собираю так
autoreconf -if
        mkdir -p release; cd release
        #ac_cv_prog_PYTHON=python2
        PKG_CONFIG_PATH="/usr/lib/i386-linux-gnu/pkgconfig" CFLAGS="-m32" CXXFLAGS="-m32" LDFLAGS="-m32" ../configure --prefix=/usr
        #--build=i686-pc-linux-gnu --libdir=/usr/lib32
        make V=1

После вот этой строки

g++  -m32  -m32 -o swars swars-bflib_joyst.o swars-bflib_joyst_s.o swars-bflib_render_gpoly.o swars-bflib_render_plin_s.o swars-bflib_render_drspr.o swars-bflib_render_drspr_s.o swars-bflib_snd_mss_s.o swars-bflib_vidraw.o swars-bflib_vidraw_s.o swars-ailssa.o swars-trfringe.o swars-triangls.o swars-tringops.o swars-trpoints.o swars-trfind8.o swars-trstate.o swars-delaunay.o swars-bfsmack.o swars-smack2ail.o swars-bfsmacklib_s.o swars-linksmk.o swars-bmbang.o swars-bat.o swars-bigmap.o swars-building.o swars-campaign.o swars-command.o swars-cybmod.o swars-display.o swars-dos.o swars-drawtext.o swars-enginbckt.o swars-engindrwlstm.o swars-engindrwlstx.o swars-enginfexpl.o swars-enginfloor.o swars-enginlights.o swars-enginpriobjs.o swars-enginpritxtr.o swars-enginshrapn.o swars-enginsngobjs.o swars-enginsngtxtr.o swars-enginshadws.o swars-enginpeff.o swars-engintrns.o swars-enginzoom.o swars-febrief.o swars-fedebrief.o swars-fecntrls.o swars-fecryo.o swars-feequip.o swars-feoptions.o swars-fepanet.o swars-felogin.o swars-femail.o swars-femain.o swars-fenet.o swars-fepause.o swars-feresearch.o swars-festorage.o swars-feworld.o swars-guiboxes.o swars-guigraph.o swars-guitext.o swars-game.o swars-game_data.o swars-game_speed.o swars-game_sprani.o swars-game_sprts.o swars-hud_panel.o swars-hud_target.o swars-joy_modul1.o swars-joy_modul2.o swars-keyboard.o swars-lvdraw3d.o swars-lvobjctv.o swars-lvfiles.o swars-main.o swars-matrix.o swars-misstat.o swars-mouse.o swars-mydraw.o swars-netipx1.o swars-netser1.o swars-network.o swars-pathtrig.o swars-pathtrig_debug.o swars-packet.o swars-people.o swars-pepgroup.o swars-player.o swars-purpldrw.o swars-purpldrwlst.o swars-radica1.o swars-radica2.o swars-radica3.o swars-research.o swars-rules.o swars-scanner.o swars-scandraw.o swars-sound.o swars-specblit.o swars-swars.o swars-thing.o swars-thing_search.o swars-thing_debug.o swars-thing_debug_s.o swars-tngcolisn.o swars-tngobjdrw.o swars-timer.o swars-unix.o swars-util.o swars-vehicle.o swars-vehtraffic.o swars-wadfile.o swars-weapon.o swars-windows.o swars-wrcities.o wrappers_dos.o wrappers_game.o wrappers_libc.o wrappers_util.o  -L"../lib" -lbullfrog -L"../lib" -lbfsound -lSDL2  -lopenal -lvorbisfile  -lpng16
Выводит ошибки.

/usr/bin/ld: wrappers_libc.o: in function `ac_gets':
(.text+0x15c): warning: the `gets' function is dangerous and should not be used.
/usr/bin/ld: swars-bflib_joyst_s.o: warning: relocation in read-only section `.rodata'
/usr/bin/ld: ../lib/libbullfrog.a(libbullfrog_a-skeybd.o): in function `LbIKeyboardOpen':
skeybd.cpp:(.text+0x2429): undefined reference to `SDL_EnableKeyRepeat'
/usr/bin/ld: ../lib/libbullfrog.a(libbullfrog_a-smouse.o): in function `MouseToScreen':
smouse.cpp:(.text+0x783): undefined reference to `SDL_WarpMouse'
/usr/bin/ld: ../lib/libbullfrog.a(libbullfrog_a-spalette.o): in function `LbPaletteSet':
spalette.c:(.text+0x1ca): undefined reference to `SDL_SetColors'
/usr/bin/ld: spalette.c:(.text+0x23f): undefined reference to `SDL_SetColors'
/usr/bin/ld: ../lib/libbullfrog.a(libbullfrog_a-spalette.o): in function `LbIPaletteRestoreLost':
spalette.c:(.text+0x2d3): undefined reference to `SDL_SetColors'
/usr/bin/ld: ../lib/libbullfrog.a(libbullfrog_a-sscreen.o): in function `LbScreenUpdateIcon':
sscreen.c:(.text+0x1fc): undefined reference to `SDL_WM_SetIcon'
/usr/bin/ld: ../lib/libbullfrog.a(libbullfrog_a-sscreen.o): in function `LbIScreenDrawSurfaceCreate':
sscreen.c:(.text+0x730): undefined reference to `SDL_SetColors'
/usr/bin/ld: ../lib/libbullfrog.a(libbullfrog_a-sscreen.o): in function `LbScreenSetupAnyMode':
sscreen.c:(.text+0xa1e): undefined reference to `SDL_SetVideoMode'
/usr/bin/ld: sscreen.c:(.text+0xa85): undefined reference to `SDL_WM_SetCaption'
/usr/bin/ld: ../lib/libbullfrog.a(libbullfrog_a-sscreen.o): in function `LbHwCheckIsModeAvailable':
sscreen.c:(.text+0x11a1): undefined reference to `SDL_VideoModeOK'
/usr/bin/ld: ../lib/libbullfrog.a(libbullfrog_a-sscreen.o): in function `LbScreenSwap':
sscreen.c:(.text+0x1903): undefined reference to `SDL_Flip'
/usr/bin/ld: ../lib/libbullfrog.a(libbullfrog_a-sscreen.o): in function `LbScreenSwapClear':
sscreen.c:(.text+0x1a07): undefined reference to `SDL_Flip'
/usr/bin/ld: ../lib/libbullfrog.a(libbullfrog_a-sscreen.o): in function `LbScreenSwapBox':
sscreen.c:(.text+0x1c06): undefined reference to `SDL_Flip'
/usr/bin/ld: warning: creating DT_TEXTREL in a PIE
collect2: error: ld returned 1 exit status
make[2]: *** [Makefile:804: swars] Error 1
make[2]: Leaving directory '/usr/ports/aur/swars/work/src/swars-0.3.8.2795/src'
make[1]: *** [Makefile:711: all] Error 2
make[1]: Leaving directory '/usr/ports/aur/swars/work/src/swars-0.3.8.2795/src'
make: *** [Makefile:502: all-recursive] Error 1

Версия gcc 12.2. Версия ядра 6.1.114. Как собрать? Как тут исправить эту ошибку и в чем именно она заключается, подскажите пожалуйста?

PKG_CONFIG_PATH=«/usr/lib/i386-linux-gnu/pkgconfig» CFLAGS="-m32" CXXFLAGS="-m32" LDFLAGS="-m32"

в /etc/pkgmk.conf для 32-битов прописано

export CFLAGS="${CFLAGS} -m32"
export CXXFLAGS="${CXXFLAGS} -m32"
export LDFLAGS="${LDFLAGS} -m32"
export PKG_CONFIG_LIBDIR="/usr/lib32/pkgconfig"
нужно просто в директории с портом создать пустой файл .32bit.

teod0r ★★★★★
()