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

NOTICE: This forum is archived as read only.
Please use the Github Discussions at https://github.com/exult/exult/discussions
Forum rules
NOTICE: This forum is archived as read only.
Please use the Github Discussions at https://github.com/exult/exult/discussions
Locked
Raphael

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

Post 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!
drcode
Site Admin
Posts: 2267
Joined: Thu May 14, 2020 1:34 pm

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

Post 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?
Raphael

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

Post 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
drcode
Site Admin
Posts: 2267
Joined: Thu May 14, 2020 1:34 pm

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

Post 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;".
Raphael

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

Post 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)
Gradilla Dragon
Posts: 468
Joined: Thu May 14, 2020 1:34 pm

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

Post by Gradilla Dragon »

Those missing libxxx.so are indication that you haven't installed the development packages for those.
- Gradilla Dragon
Dominus
Site Admin
Posts: 5656
Joined: Thu May 14, 2020 1:34 pm

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

Post by Dominus »

as for the timidity issue, did you take a look at:
http://exult.info/docs.php#linux_alsa
--
Read the documentation and the FAQ! There is no excuse for not reading them! RTFM
Read the Rules!
We do not support Piracy/Abandonware/Warez!
drcode
Site Admin
Posts: 2267
Joined: Thu May 14, 2020 1:34 pm

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

Post by drcode »

And I still have to remember to fix our code tonight!
Raphael

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

Post 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.
Dominus
Site Admin
Posts: 5656
Joined: Thu May 14, 2020 1:34 pm

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

Post 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 :)
--
Read the documentation and the FAQ! There is no excuse for not reading them! RTFM
Read the Rules!
We do not support Piracy/Abandonware/Warez!
Locked