project-navigation
Personal tools

Author Topic: SUSE - compiling manual :-)  (Read 6227 times)

abrax

  • Guest
SUSE - compiling manual :-)
« on: May 21, 2009, 07:56:29 am »
Hello all,

I'm quite fresh linux user and I'm experiencing some troubles during my first ever compilation of a program: UFO:AI. I would like to play this superiour game but it takes time to find out how all this things work. It would be easier with some help :-)

So First I've installed UFO through Yast, but it had problems with saving and entering the battlefield, so I've downloaded "ufo:ai".run file. After running it I was given well known problem with missing "libcurl-gnutls.so.4" file... After several tries with symbolic links I've finally gave it up and here I am compiling the game from the sources.

After reading wiki and installing several additional programs from the list (make, gcc etc.) I'm still getting some troubles.:
So now let's see what I have:

linux-j88j:/usr/local/games/ufoai/ufoai_2.2 # ./configure
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking target system type... i686-pc-linux-gnu
checking system... UNIX (GNU/Linux)
checking for sed... yes
checking for echo... yes
checking target OS... linux-gnu
checking target CPU... i386
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for short... yes
checking size of short... 2
checking for int... yes
checking size of int... 4
checking for long... yes
checking size of long... 4
checking for long long... yes
checking size of long long... 8
checking for int*... yes
checking size of int*... 4
checking for rm... yes
checking for mkdir... yes
checking for getaddrinfo... yes
checking for freeaddrinfo... yes
checking whether AI_NUMERICSERV is declared... yes
checking for stdint.h... (cached) yes
checking for library containing dlopen... -ldl
checking for library containing cos... -lm
checking for library containing stricmp... no
checking for library containing strcasecmp... none required
checking zlib.h usability... yes
checking zlib.h presence... yes
checking for zlib.h... yes
checking for compress in -lz... yes
checking curl/curl.h usability... yes
checking curl/curl.h presence... yes
checking for curl/curl.h... yes
checking for curl_easy_init in -lcurl... yes
checking jpeglib.h usability... yes
checking jpeglib.h presence... yes
checking for jpeglib.h... yes
checking for jpeg_CreateDecompress in -ljpeg... yes
checking libintl.h usability... yes
checking libintl.h presence... yes
checking for libintl.h... yes
checking for library containing gettext... none required
checking for sdl-config... yes
checking SDL.h usability... yes
checking SDL.h presence... yes
checking for SDL.h... yes
checking SDL_mixer.h usability... yes
checking SDL_mixer.h presence... yes
checking for SDL_mixer.h... yes
checking for library containing Mix_OpenAudio... -lSDL_mixer
checking SDL_ttf.h usability... yes
checking SDL_ttf.h presence... yes
checking for SDL_ttf.h... yes
checking for library containing TTF_Init... -lSDL_ttf
checking png.h usability... yes
checking png.h presence... yes
checking for png.h... yes
checking for png_create_info_struct in -lpng... yes
checking GL/gl.h usability... yes
checking GL/gl.h presence... yes
checking for GL/gl.h... yes
checking GL/glu.h usability... yes
checking GL/glu.h presence... yes
checking for GL/glu.h... yes
configure: Without shader support
checking for library containing newwin... no
configure: Without curses
configure: Enabling client
configure: Enabling dedicated server
configure: Enabling ufo2map
configure: Enabling debug build
configure: creating ./config.status
config.status: creating Makefile
config.status: creating config.h
config.status: config.h is unchanged

So as I understand it If it was all right the next step shoul go without any problems? So please tell me what to do next because next step looks like this:

linux-j88j:/usr/local/games/ufoai/ufoai_2.2 # make
 * [MAP] ... linking  (-lm   -lz -ljpeg)
debug-linux-gnu-i386/tools/ufo2map/tools/ufo2map/levels.o: file not recognized: File truncated
collect2: ld returned 1 exit status
make: *** [ufo2map] Błąd 1

Thank You in advance...

Offline Mattn

  • Administrator
  • PHALANX Commander
  • *****
  • Posts: 4831
  • https://github.com/mgerhardy/vengi
    • View Profile
    • Vengi Voxel Tools
Re: SUSE - compiling manual :-)
« Reply #1 on: May 21, 2009, 08:39:35 am »
please try make clean and then make again

abrax

  • Guest
Re: SUSE - compiling manual :-)
« Reply #2 on: May 21, 2009, 06:35:44 pm »
Thank You :-) As far as I can tell it helped a lot :-)

Here is what happened:

linux-j88j:/usr/local/games/ufoai/ufoai_2.2 # make clean
Making clean
linux-j88j:/usr/local/games/ufoai/ufoai_2.2 # make
 * [UFO] src/client/cl_actor.c
 * [UFO] src/client/cl_aliencont.c
 * [UFO] src/client/cl_aircraft.c
 * [UFO] src/client/cl_airfight.c
 * [UFO] src/client/cl_basemanagement.c
 * [UFO] src/client/cl_basesummary.c
 * [UFO] src/client/cl_campaign.c
 * [UFO] src/client/cl_cinematic.c
 * [UFO] src/client/cl_console.c
 * [UFO] src/client/cl_event.c
 * [UFO] src/client/cl_employee.c
 * [UFO] src/client/cl_fx.c
 * [UFO] src/client/cl_hospital.c
 * [UFO] src/client/cl_http.c
 * [UFO] src/client/cl_inventory.c
 * [UFO] src/client/cl_input.c
 * [UFO] src/client/cl_irc.c
 * [UFO] src/client/cl_keys.c
 * [UFO] src/client/cl_language.c
 * [UFO] src/client/cl_le.c
 * [UFO] src/client/cl_main.c
 * [UFO] src/client/cl_menu.c
 * [UFO] src/client/cl_market.c
 * [UFO] src/client/cl_map.c
 * [UFO] src/client/cl_mapfightequip.c
 * [UFO] src/client/cl_popup.c
 * [UFO] src/client/cl_produce.c
 * [UFO] src/client/cl_parse.c
 * [UFO] src/client/cl_particle.c
 * [UFO] src/client/cl_radar.c
 * [UFO] src/client/cl_research.c
 * [UFO] src/client/cl_save.c
 * [UFO] src/client/cl_shader.c
 * [UFO] src/client/cl_screen.c
 * [UFO] src/client/cl_sound.c
 * [UFO] src/client/cl_sequence.c
 * [UFO] src/client/cl_team.c
 * [UFO] src/client/cl_tip.c
 * [UFO] src/client/cl_transfer.c
 * [UFO] src/client/cl_ufo.c
 * [UFO] src/client/cl_ufopedia.c
 * [UFO] src/client/cl_vid.c
 * [UFO] src/client/cl_view.c
 * [UFO] src/common/cmd.c
 * [UFO] src/common/http.c
 * [UFO] src/common/ioapi.c
 * [UFO] src/common/unzip.c
 * [UFO] src/common/cmodel.c
 * [UFO] src/common/common.c
 * [UFO] src/common/cvar.c
 * [UFO] src/common/files.c
 * [UFO] src/common/md4.c
 * [UFO] src/common/md5.c
 * [UFO] src/common/mem.c
 * [UFO] src/common/msg.c
 * [UFO] src/common/net.c
 * [UFO] src/common/netpack.c
 * [UFO] src/common/dbuffer.c
 * [UFO] src/common/scripts.c
 * [UFO] src/server/sv_ccmds.c
 * [UFO] src/server/sv_game.c
 * [UFO] src/server/sv_init.c
 * [UFO] src/server/sv_main.c
 * [UFO] src/server/sv_send.c
 * [UFO] src/server/sv_user.c
 * [UFO] src/server/sv_world.c
 * [UFO] src/game/q_shared.c
 * [UFO] src/game/inv_shared.c
 * [UFO] src/renderer/r_anim.c
 * [UFO] src/renderer/r_shader.c
 * [UFO] src/renderer/r_draw.c
 * [UFO] src/renderer/r_font.c
 * [UFO] src/renderer/r_image.c
 * [UFO] src/renderer/r_light.c
 * [UFO] src/renderer/r_mesh.c
 * [UFO] src/renderer/r_mesh_md2.c
 * [UFO] src/renderer/r_mesh_md3.c
 * [UFO] src/renderer/r_model.c
 * [UFO] src/renderer/r_model_alias.c
 * [UFO] src/renderer/r_model_brush.c
 * [UFO] src/renderer/r_model_md2.c
 * [UFO] src/renderer/r_model_md3.c
 * [UFO] src/renderer/r_model_obj.c
 * [UFO] src/renderer/r_model_sp2.c
 * [UFO] src/renderer/r_main.c
 * [UFO] src/renderer/r_misc.c
 * [UFO] src/renderer/r_surf.c
 * [UFO] src/renderer/r_state.c
 * [UFO] src/renderer/r_warp.c
 * [UFO] src/renderer/r_particle.c
 * [UFO] src/renderer/r_shadows.c
 * [UFO] src/renderer/qgl.c
 * [UFO] src/renderer/r_sdl.c
 * [UFO] src/shared/byte.c
 * [UFO] src/shared/infostring.c
 * [UFO] src/shared/shared.c
 * [UFO] src/ports/linux/linux_main.c
 * [UFO] src/ports/unix/unix_console.c
 * [UFO] src/ports/unix/unix_main.c
 * [UFO] src/ports/unix/unix_glob.c
 * [UFO] ... linking  (-ldl  -lm   -lz -lcurl -ljpeg -lpng -lSDL_ttf -lSDL_mixer  -L/usr/lib -lSDL -lpthread)
 * [DED] src/common/cmd.c
 * [DED] src/common/http.c
 * [DED] src/common/ioapi.c
 * [DED] src/common/unzip.c
 * [DED] src/common/cmodel.c
 * [DED] src/common/common.c
 * [DED] src/common/cvar.c
 * [DED] src/common/files.c
 * [DED] src/common/md4.c
 * [DED] src/common/md5.c
 * [DED] src/common/mem.c
 * [DED] src/common/msg.c
 * [DED] src/common/dbuffer.c
 * [DED] src/common/net.c
 * [DED] src/common/netpack.c
 * [DED] src/common/scripts.c
 * [DED] src/server/sv_ccmds.c
 * [DED] src/server/sv_game.c
 * [DED] src/server/sv_init.c
 * [DED] src/server/sv_main.c
 * [DED] src/server/sv_send.c
 * [DED] src/server/sv_user.c
 * [DED] src/server/sv_world.c
 * [DED] src/server/sv_clientstub.c
 * [DED] src/game/q_shared.c
 * [DED] src/game/inv_shared.c
 * [DED] src/shared/byte.c
 * [DED] src/shared/infostring.c
 * [DED] src/shared/shared.c
 * [DED] src/ports/linux/linux_main.c
 * [DED] src/ports/unix/unix_console.c
 * [DED] src/ports/unix/unix_main.c
 * [DED] src/ports/unix/unix_glob.c
 * [DED] ... linking  (-ldl  -lm   -lz -lcurl )
 * [MAP] src/tools/ufo2map/ufo2map.c
 * [MAP] src/tools/ufo2map/qrad3.c
 * [MAP] src/tools/ufo2map/qbsp3.c
 * [MAP] src/tools/ufo2map/brushbsp.c
 * [MAP] src/tools/ufo2map/csg.c
 * [MAP] src/tools/ufo2map/faces.c
 * [MAP] src/tools/ufo2map/levels.c
 * [MAP] src/tools/ufo2map/lightmap.c
 * [MAP] src/tools/ufo2map/map.c
 * [MAP] src/tools/ufo2map/patches.c
src/tools/ufo2map/patches.c:324: warning: ‘SubdividePatch’ defined but not used
 * [MAP] src/tools/ufo2map/portals.c
 * [MAP] src/tools/ufo2map/routing.c
 * [MAP] src/tools/ufo2map/textures.c
 * [MAP] src/tools/ufo2map/tree.c
 * [MAP] src/tools/ufo2map/writebsp.c
 * [MAP] src/tools/ufo2map/common/bspfile.c
 * [MAP] src/tools/ufo2map/common/cmdlib.c
 * [MAP] src/tools/ufo2map/common/mathlib.c
 * [MAP] src/tools/ufo2map/common/polylib.c
 * [MAP] src/tools/ufo2map/common/scriplib.c
 * [MAP] src/tools/ufo2map/common/trace.c
 * [MAP] src/tools/ufo2map/common/imagelib.c
 * [MAP] src/shared/byte.c
 * [MAP] src/shared/shared.c
 * [MAP] src/common/unzip.c
 * [MAP] src/common/ioapi.c
 * [MAP] ... linking  (-lm   -lz -ljpeg)
 * [GAM] src/game/q_shared.c
 * [GAM] src/game/g_ai.c
 * [GAM] src/game/g_client.c
 * [GAM] src/game/g_combat.c
 * [GAM] src/game/g_cmds.c
 * [GAM] src/game/g_phys.c
 * [GAM] src/game/g_main.c
src/game/g_main.c:265: warning: no previous prototype for ‘GetGameAPI’
 * [GAM] src/game/g_spawn.c
 * [GAM] src/game/g_svcmds.c
 * [GAM] src/game/g_utils.c
 * [GAM] src/game/inv_shared.c
 * [GAM] src/shared/shared.c
 * [GAM] src/shared/infostring.c
 * [GAM] ... linking  (-lm  )
CFLAGS
-----------------------
-g -O2 -D_GNU_SOURCE -D_BSD_SOURCE -D_XOPEN_SOURCE -DSHARED_EXT="so" -DHAVE_CONFIG_H -Wall -pipe -Winline -Wcast-qual -Wcast-align -ansi -Wdeclaration-after-statement -Wmissing-prototypes -Wmissing-declarations -ggdb -O0 -DDEBUG -fno-inline
-I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT

LDFLAGS
-----------------------

-ldl -lm -lz -lcurl -ljpeg -lpng -lSDL_ttf -lSDL_mixer -L/usr/lib -lSDL -lpthread

Gettext
-----------------------
Type 'make lang' to compile the gettext translation files.

Maps
-----------------------
Type 'make maps' to compile the maps

Built for debug-linux-gnu-i386


So , now I should type "make lang" and then "make maps" ... Am I right?

abrax

  • Guest
Re: SUSE - compiling manual :-)
« Reply #3 on: May 21, 2009, 06:45:48 pm »
So here I am again, with the next step:

linux-j88j:/usr/local/games/ufoai/ufoai_2.2 # make lang
Making lang
cs.po
1997 translated messages, 9 fuzzy translations, 3 untranslated messages.
da.po
1988 translated messages, 17 fuzzy translations, 4 untranslated messages.
de.po
1956 translated messages, 30 fuzzy translations, 23 untranslated messages.
el.po
1988 translated messages, 17 fuzzy translations, 4 untranslated messages.
en.po
2009 translated messages.
es_ES.po
925 translated messages, 601 fuzzy translations, 483 untranslated messages.
es.po
772 translated messages, 657 fuzzy translations, 580 untranslated messages.
est.po
836 translated messages, 616 fuzzy translations, 557 untranslated messages.
fi.po
428 translated messages, 236 fuzzy translations, 1345 untranslated messages.
fr.po
2008 translated messages.
it.po
1276 translated messages, 411 fuzzy translations, 322 untranslated messages.
ja.po
960 translated messages, 31 fuzzy translations, 1018 untranslated messages.
pl.po
1620 translated messages, 130 fuzzy translations, 259 untranslated messages.
pt_BR.po
1776 translated messages, 259 untranslated messages.
ru.po
1278 translated messages, 416 fuzzy translations, 315 untranslated messages.
slo.po
497 translated messages, 719 fuzzy translations, 793 untranslated messages.
sv.po
1735 translated messages, 81 fuzzy translations, 193 untranslated messages.
th.po
1349 translated messages, 371 fuzzy translations, 289 untranslated messages.
linux-j88j:/usr/local/games/ufoai/ufoai_2.2 #

I'm a bit afraid before the next step which is compiling maps... It will definately take a while because I've got Athlon 2200+ here... ;-) Please confirm if I am making all properly :-)                                         

abrax

  • Guest
Re: SUSE - compiling manual :-)
« Reply #4 on: May 21, 2009, 07:13:55 pm »
Anyway, the game starts nicely, but i didn't check anything but the ability to execute ufo. It even tells me that it was compiled today! Wow, I can't describe how I feel now, it was my first time :-)

Compiling maps:
(this text was taken somewhere there between the other maps which has been already compiled)

../../ufo2map -nice 19 -extra spedition06n.map
---- ufo2map 1.1 ----
nice = 19
extrasamples = true
path: 'spedition06n.map'
gamedir: /usr/local/games/ufoai/ufoai_2.2/base/
Could not load image pk3 (/usr/local/games/ufoai/ufoai_2.2/base/0pics.pk3)
...map: '/usr/local/games/ufoai/ufoai_2.2/base/maps/spedition06n.map'
...bsp: '/usr/local/games/ufoai/ufoai_2.2/base/maps/spedition06n.bsp'
entering /usr/local/games/ufoai/ufoai_2.2/base/maps/spedition06n.map
      LEVEL % 10...20...30...40...50...60...70...80...90... (time:    2s, count: 258)
  UNITCHECK % 10...20...30...40...50...60...70...80...90... (time:    0s, count: 524288)
  CONNCHECK % 10...20...30...40...50...60...70...80...90... (time:    1s, count: 524288)
Writing /usr/local/games/ufoai/ufoai_2.2/base/maps/spedition06n.bsp
    4 seconds elapsed
----- Radiosity ----
 FACELIGHTS % 10...20...30...40...50...60...70...80...90... (time:  386s, count: 5044)
 FINALLIGHT % 10...20...30...40...50...60...70...80...90... (time:    0s, count: 5044)
writing /usr/local/games/ufoai/ufoai_2.2/base/maps/spedition06n.bsp
  386 seconds elapsed
sum:   390 seconds elapsed

I can see that there is an error : Could not load image pk3 (/usr/local/games/ufoai/ufoai_2.2/base/0pics.pk3) What does it mean?

I hope that it won't make ma compiling all maps once again :-)

Please write here, write as much as needed because this topic was created to help (other people green as me ) completely describe the process... After all is done, I'm going to rewrite this and place it as sticky step-by step guide of compiling this game.

Offline geever

  • Project Coder
  • PHALANX Commander
  • ***
  • Posts: 2561
    • View Profile
Re: SUSE - compiling manual :-)
« Reply #5 on: May 22, 2009, 02:31:34 am »
That Could not load image pk3 message is non-fatal afaik. It will use files in base/pics dir instead.

-geever

abrax

  • Guest
Re: SUSE - compiling manual :-)
« Reply #6 on: May 22, 2009, 07:56:04 am »
Finally something happened that stopped all the process... :

../../ufo2map -nice 19 -extra corrupt04.map
---- ufo2map 1.1 ----
nice = 19
extrasamples = true
path: 'corrupt04.map'
gamedir: /usr/local/games/ufoai/ufoai_2.2/base/
Could not load image pk3 (/usr/local/games/ufoai/ufoai_2.2/base/0pics.pk3)
...map: '/usr/local/games/ufoai/ufoai_2.2/base/maps/corrupt04.map'
...bsp: '/usr/local/games/ufoai/ufoai_2.2/base/maps/corrupt04.bsp'
entering /usr/local/games/ufoai/ufoai_2.2/base/maps/corrupt04.map
      LEVEL % 10...20...30...40...50...60...70...80...90... (time:    3s, count: 258)
  UNITCHECK % 10...20...30...40...50...60...70...80...90... (time:    0s, count: 524288)
  CONNCHECK % 10...20...30...40...50...60...70...80...90... (time:    0s, count: 524288)
Writing /usr/local/games/ufoai/ufoai_2.2/base/maps/corrupt04.bsp
    4 seconds elapsed
----- Radiosity ----
 FACELIGHTS % 10...20...30...40...50...60...70...80...90...make[1]: *** [corrupt04.bsp] Naruszenie ochrony pamięci
make[1]: *** Kasuję plik `corrupt04.bsp' (says that is erasing this file)
make[1]: Opuszczenie katalogu `/usr/local/games/ufoai/ufoai_2.2/base/maps' (says that is leaving the folder)
make: *** [maps] Błąd 2 (says "error 2")

Can You please tell what does it mean?
How to fix this problem?
How to start the map compilation again from this point not from the beginning?

abrax

  • Guest
Re: SUSE - compiling manual :-)
« Reply #7 on: May 22, 2009, 08:12:48 am »
There is one more thing... The game starts nicely, everything is working fine, but it doesn't enter the battlefield... Again...

Is this due to the maps compiling process?

I've got another idea that the graphic card drivers are making problems with entering 3d graphic card mode... How is the UFO:AI constructed is it completely rendered with 3d acceleration or just the battlefield? I think that if there is something wrong with my graphics it may work fine till the 3d acceleration mode is needed... This would explain why I was having the same problem once before... (I use the graphic card driver suggested by the system, not the newest graphic card driver, TUX RACER runs smoothly, chromium, and other games as well, The graphic card is ATI RADEON 9200SE 64MB ram -> Yes i know that i could make a better choice but then I was meaning Windoze XP...

How do You think?



« Last Edit: May 22, 2009, 08:14:22 am by abrax »

Offline Mattn

  • Administrator
  • PHALANX Commander
  • *****
  • Posts: 4831
  • https://github.com/mgerhardy/vengi
    • View Profile
    • Vengi Voxel Tools
Re: SUSE - compiling manual :-)
« Reply #8 on: May 22, 2009, 10:39:42 am »
just run make maps again - it will continue where it stopped before

the "not-entering-battlefield" might be related with not all maps compiled properly - yes.

abrax

  • Guest
Re: SUSE - compiling manual :-)
« Reply #9 on: May 22, 2009, 06:44:44 pm »
Thank You,

I really don't know why the last error occured...  Just after getting home from work I've set my computer to make maps again and it nicely rendered the last map... So now it is still rendering...


abrax

  • Guest
Re: SUSE - compiling manual :-)
« Reply #10 on: May 23, 2009, 07:27:34 am »
Thank You once more,
I still have some questions but finally the game works fine as hell !!!!
I am able to play now :-)