Page 1 of 1

Problem compiling exult on x86_64 (Linux, Suse 9.2, GCC 3.3.

Posted: Tue Aug 09, 2005 11:24 pm
by Raphael
Hello,

I want to run exult 1.2 on my AMD64 system with SuSE 9.2 (GCC 3.3.4) as OS.
Calling './configure' seems to work since no error message appears. But if
I call 'make' afterwards, the compilation process stops with an error 'can
not convert xxx to png_int_32 in pngio.cc' or so (I am not sitting on my
private PC right now, so I can not tell you the precise report).
Unfortunately I could not find binaries for my system so I hope anyone of
you can help me to use exult!

Re: Problem compiling exult on x86_64 (Linux, Suse 9.2, GCC

Posted: Wed Aug 10, 2005 7:54 am
by drcode
This sounds similar to a libpng version problem we've had before. When you're home, could you post the exact error msg?

Re: Problem compiling exult on x86_64 (Linux, Suse 9.2, GCC

Posted: Wed Aug 10, 2005 9:43 am
by Raphael
The error message is:
=====================================
g++ -DHAVE_CONFIG_H -I. -I. -I.. -I./../headers -I./.. -I./../files -I./../image
win -I/usr/include/SDL -D_REENTRANT -I/usr/include/freetype2 -DXWIN -O2 -Wno-lon
g-long -g -O2 -c pngio.cc -MT pngio.lo -MD -MP -MF .deps/pngio.TPlo -o pngio.o
pngio.cc: In function `int Import_png8(const char*, int, int&, int&, int&,
int&, int&, unsigned char*&, unsigned char*&, int&)':
pngio.cc:95: error: cannot convert `long unsigned int*' to `png_uint_32*' for
argument `3' to `png_uint_32 png_get_IHDR(png_struct*, png_info*,
png_uint_32*, png_uint_32*, int*, int*, int*, int*, int*)'
pngio.cc: In function `int Import_png32(const char*, int&, int&, int&, int&,
int&, unsigned char*&, bool)':
pngio.cc:322: error: cannot convert `long unsigned int*' to `png_uint_32*' for
argument `3' to `png_uint_32 png_get_IHDR(png_struct*, png_info*,
png_uint_32*, png_uint_32*, int*, int*, int*, int*, int*)'
make[2]: *** [pngio.lo] Error 1
make[2]: Leaving directory `/home/raphael/exult-1.2/shapes'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/raphael/exult-1.2'
make: *** [all] Error 2
=====================================
I thought the problem might be that on x86_64 architectures gcc has 64bit precision for long integers. But other users compiling from source should have discovered such an issue before, shouldn't they?

If you need the full configuration or compilation screen output, email me.

Raphael

Re: Problem compiling exult on x86_64 (Linux, Suse 9.2, GCC

Posted: Wed Aug 10, 2005 10:33 am
by drcode
Thanks. I should be able to fix that tonight. If you want to try fixing it locally, look for the "unsigned long w, h;" line just above each error, and change it to "png_uint_32 w, h;".

Re: Problem compiling exult on x86_64 (Linux, Suse 9.2, GCC

Posted: Wed Aug 10, 2005 10:25 pm
by Raphael
Ok, I have exult running now! :-)

But at first the compilation stopped with an error anyhow:
==============================
g++ -O2 -Wno-long-long -g -O2 -o exult actions.o actorio.o actors.o alloc.o args.o bggame.o browser.o cheat.o cheat_screen.o combat.o delobjs.o devgame.o dir.o drag.o effects.o exult.o exultmenu.o game.o gameclk.o gamedat.o gamemap.o gamerend.o gamewin.o keys.o keyactions.o menulist.o monsters.o mouse.o npcnear.o npctime.o palette.o party.o paths.o readnpcs.o schedule.o segfile.o shapeid.o sigame.o tqueue.o txtscroll.o version.o xdrag.o -Wl,-rpath -Wl,/usr/lib64 pathfinder/.libs/libpathfinder.a audio/.libs/libaudio.a audio/midi_drivers/.libs/libmididrv.a flic/.libs/libflic.a conf/.libs/libconf.a imagewin/.libs/libimagewin.a server/.libs/libserver.a usecode/.libs/libusecode.a shapes/.libs/libshapes.a objs/.libs/libobjs.a gumps/.libs/libgumps.a files/.libs/libu7file.a files/zip/.libs/libminizip.a -L/usr/lib64 -L/usr/X11R6/lib64 /usr/lib64/libSDL_mixer.so /usr/lib64/libvorbisfile.so /usr/lib64/libvorbis.so /usr/lib64/libogg.so /usr/lib64/libsmpeg.so /usr/lib64/libSDL.so /usr/lib64/libstdc++.so -lc -lgcc_s /usr/lib64/libasound.so -ldl -lXext /usr/lib64/libaa.so -lslang -lm -lX11 -lgpm -lpthread -lz
g++: /usr/lib64/libsmpeg.so: No such file or directory
make[2]: *** [exult] Error 1
make[2]: Leaving directory `/home/raphael/exult-1.2'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/raphael/exult-1.2'
make: *** [all] Error 2
==============================
Logged in as root I tried the following command:
"ln /usr/lib64/libsmpeg-0.4.so.0.1.4 /usr/lib64/libsmpeg"
and then again
"make"
Now the following error appeared:
==============================
g++ -O2 -Wno-long-long -g -O2 -o exult actions.o actorio.o actors.o alloc.o args.o bggame.o browser.o cheat.o cheat_screen.o combat.o delobjs.o devgame.o dir.o drag.o effects.o exult.o exultmenu.o game.o gameclk.o gamedat.o gamemap.o gamerend.o gamewin.o keys.o keyactions.o menulist.o monsters.o mouse.o npcnear.o npctime.o palette.o party.o paths.o readnpcs.o schedule.o segfile.o shapeid.o sigame.o tqueue.o txtscroll.o version.o xdrag.o -Wl,-rpath -Wl,/usr/lib64 pathfinder/.libs/libpathfinder.a audio/.libs/libaudio.a audio/midi_drivers/.libs/libmididrv.a flic/.libs/libflic.a conf/.libs/libconf.a imagewin/.libs/libimagewin.a server/.libs/libserver.a usecode/.libs/libusecode.a shapes/.libs/libshapes.a objs/.libs/libobjs.a gumps/.libs/libgumps.a files/.libs/libu7file.a files/zip/.libs/libminizip.a -L/usr/lib64 -L/usr/X11R6/lib64 /usr/lib64/libSDL_mixer.so /usr/lib64/libvorbisfile.so /usr/lib64/libvorbis.so /usr/lib64/libogg.so /usr/lib64/libsmpeg.so /usr/lib64/libSDL.so /usr/lib64/libstdc++.so -lc -lgcc_s /usr/lib64/libasound.so -ldl -lXext /usr/lib64/libaa.so -lslang -lm -lX11 -lgpm -lpthread -lz
/usr/lib64/gcc-lib/x86_64-suse-linux/3.3.4/../../../../x86_64-suse-linux/bin/ld: cannot find -lslang
collect2: ld returned 1 exit status
make[2]: *** [exult] Error 1
make[2]: Leaving directory `/home/raphael/exult-1.2'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/raphael/exult-1.2'
make: *** [all] Error 2
==============================
So I created the following link hoping that the utf8 Version is OK:
"ln /usr/lib64/libslang-utf8.so.1.4.9 /usr/lib64/libslang.so"
and then again
"make"
Compilation completed now, hence I continued with
"make install"

And after some ~/.exult.cfg editing exult run! The remainig issue was that I had to disable MIDI music otherwise the game crashed - maybe a timidity configuration issue?

So "DrCode", thanks for your patching instruction!

Raphael (glad, playing Ultima again)

Re: Problem compiling exult on x86_64 (Linux, Suse 9.2, GCC

Posted: Thu Aug 11, 2005 3:58 am
by Gradilla Dragon
Those missing libxxx.so are indication that you haven't installed the development packages for those.

Re: Problem compiling exult on x86_64 (Linux, Suse 9.2, GCC

Posted: Thu Aug 11, 2005 4:22 am
by Dominus
as for the timidity issue, did you take a look at:
http://exult.info/docs.php#linux_alsa

Re: Problem compiling exult on x86_64 (Linux, Suse 9.2, GCC

Posted: Thu Aug 11, 2005 8:22 am
by drcode
And I still have to remember to fix our code tonight!

Re: Problem compiling exult on x86_64 (Linux, Suse 9.2, GCC

Posted: Fri Aug 12, 2005 12:28 am
by Raphael
Of course I have searched the DVD of my SuSE 9.2 Distribution for libsmpeg.so and libslang.so, but I could only find libsmpeg-0.4.so.0.1.4 and libslang-utf8.so.1.4.9! Hence I created links such as mentioned in my previous post:
"ln /usr/lib64/libsmpeg-0.4.so.0.1.4 /usr/lib64/libsmpeg.so"
"ln /usr/lib64/libslang-utf8.so.1.4.9 /usr/lib64/libslang.so"
And it works!

Timidity runs flawlessly when invoked from the shell e.g.:
"timidity my_favourite_midi.mid". Do I have to create a timidity.cfg file anyway? But I do not mind the non-working midi too much since I downloaded the ogg music files.

Re: Problem compiling exult on x86_64 (Linux, Suse 9.2, GCC

Posted: Fri Aug 12, 2005 2:02 am
by Dominus
If you don't use it, then no, you don't need to create it. But if you want to use midi, yes :)

Fatal: Not able to open ./cache/production/data_global.php