suse9.2 and exult 1.2 compile

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
darthgrog

suse9.2 and exult 1.2 compile

Post by darthgrog »

I've downloaded both the source rpm and the tarball for exult 1.2 and can't successfully compile on a new install of suse 9.2.

Here is the end of the failed compile:

:
pngio.cc:95: error: invalid conversion from `long unsigned int*' to `png_uint_32*'
pngio.cc:95: error: invalid conversion from `long unsigned int*' to `png_uint_32*'
pngio.cc: In function `int Import_png32(const char*, int&, int&, int&, int&, int&, unsigned char*&, bool)':
pngio.cc:322: error: invalid conversion from `long unsigned int*' to `png_uint_32*'
pngio.cc:322: error: invalid conversion from `long unsigned int*' to `png_uint_32*'
make[2]: *** [pngio.lo] Error 1
make[2]: Leaving directory `/usr/src/packages/BUILD/exult-1.2/shapes'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/src/packages/BUILD/exult-1.2'
make: *** [all] Error 2
error: Bad exit status from /var/tmp/rpm-tmp.45773 (%build)


RPM build errors:
Bad exit status from /var/tmp/rpm-tmp.45773 (%build)

-----------------------------------

Could anyone give me any hints why this won't compile?

Thanks
wjp
Site Admin
Posts: 1708
Joined: Thu May 14, 2020 1:34 pm

Re: suse9.2 and exult 1.2 compile

Post by wjp »

In shapes/pngio.cc, look for lines 'unsigned long w, h;' two lines above a line starting with 'png_get_IHDR'. This combination will occur two times. (Once around line 95, once around line 322.)

Replace the 'unsigned long' by 'png_uint_32' in both cases.

That should do the trick, I hope.
darthgrog

Re: suse9.2 and exult 1.2 compile

Post by darthgrog »

That did fix the png problem, but now I am getting a bunch of problems in the xdrag.h and exult.cc source files.
---------------------------------------------------------------------------
/usr/include/SDL/SDL_syswm.h:68: error: 'XEvent' is used as a type, but is not
defined as a type.
/usr/include/SDL/SDL_syswm.h:81: error: syntax error before `*' token
/usr/include/SDL/SDL_syswm.h:82: error: 'Window' is used as a type, but is not
defined as a type.
/usr/include/SDL/SDL_syswm.h:92: error: 'Window' is used as a type, but is not
defined as a type.
/usr/include/SDL/SDL_syswm.h:93: error: 'Window' is used as a type, but is not
defined as a type.
In file included from exult.cc:48:
xdrag.h:33: error: syntax error before `*' token
xdrag.h:34: error: 'Window' is used as a type, but is not defined as a type.
xdrag.h:35: error: 'Window' is used as a type, but is not defined as a type.
xdrag.h:36: error: 'Atom' is used as a type, but is not defined as a type.
xdrag.h:37: error: 'Atom' is used as a type, but is not defined as a type.
xdrag.h:38: error: 'Atom' is used as a type, but is not defined as a type.
xdrag.h:39: error: 'Atom' is used as a type, but is not defined as a type.
xdrag.h:40: error: 'Atom' is used as a type, but is not defined as a type.
xdrag.h:41: error: 'Atom' is used as a type, but is not defined as a type.
xdrag.h:42: error: 'Atom' is used as a type, but is not defined as a type.
xdrag.h:43: error: 'Atom' is used as a type, but is not defined as a type.
xdrag.h:44: error: 'Atom' is used as a type, but is not defined as a type.
xdrag.h:45: error: 'Atom' is used as a type, but is not defined as a type.
xdrag.h:46: error: 'Atom' is used as a type, but is not defined as a type.
xdrag.h:47: error: 'Atom' is used as a type, but is not defined as a type.
xdrag.h:48: error: 'Atom' is used as a type, but is not defined as a type.
xdrag.h:51: error: syntax error before `[' token
xdrag.h:69: error: syntax error before `*' token
xdrag.h:74: error: `XClientMessageEvent' was not declared in this scope
xdrag.h:74: error: `cev' was not declared in this scope
xdrag.h:74: error: invalid data member initialization
xdrag.h:74: error: (use `=' to initialize static data members)
xdrag.h:74: error: variable or field `client_msg' declared void
xdrag.h:75: error: `XSelectionEvent' was not declared in this scope
xdrag.h:75: error: `sev' was not declared in this scope
xdrag.h:75: error: invalid data member initialization
xdrag.h:75: error: variable or field `select_msg' declared void
exult.cc: In function `void Init()':
exult.cc:757: error: 'struct SDL_SysWMinfo::::' has
no member named 'display'
exult.cc:757: error: `ConnectionNumber' undeclared (first use this function)
exult.cc:757: error: (Each undeclared identifier is reported only once for each
function it appears in.)
exult.cc:759: error: 'struct SDL_SysWMinfo::::' has
no member named 'display'
exult.cc:759: error: 'struct SDL_SysWMinfo::::' has
no member named 'wmwindow'
exult.cc:760: error: 'struct SDL_SysWMinfo::::' has
no member named 'window'
exult.cc:762: error: initializer list being treated as compound expression
exult.cc: In function `void Handle_event(SDL_Event&)':
exult.cc:1218: error: `XEvent' undeclared (first use this function)
exult.cc:1218: error: `ev' undeclared (first use this function)
exult.cc:1218: error: 'union SDL_SysWMmsg::' has no member named '
xevent'
exult.cc:1219: error: `ClientMessage' undeclared (first use this function)
exult.cc:1220: error: `XClientMessageEvent' undeclared (first use this
function)
exult.cc:1220: error: syntax error before `)' token
make[2]: *** [exult.o] Error 1
make[2]: Leaving directory `/root/exult-1.2'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/root/exult-1.2'
make: *** [all] Error 2
----------------------------------------------------------------------------

Thanks again for the help!
wjp
Site Admin
Posts: 1708
Joined: Thu May 14, 2020 1:34 pm

Re: suse9.2 and exult 1.2 compile

Post by wjp »

Are you sure there are no errors above that?
darthgrog

Re: suse9.2 and exult 1.2 compile

Post by darthgrog »

There are a few lines before the output in my last post:
--------------------------------------------------------------
In file included from exult.cc:38:
/usr/include/SDL/SDL_syswm.h:55:22: X11/Xlib.h: No such file or directory
/usr/include/SDL/SDL_syswm.h:56:23: X11/Xatom.h: No such file or directory
In file included from exult.cc:38:
wjp
Site Admin
Posts: 1708
Joined: Thu May 14, 2020 1:34 pm

Re: suse9.2 and exult 1.2 compile

Post by wjp »

Do you have the X devel package installed?

If so, where are Xlib.h and Xatom.h located on your system?
Trurl
Posts: 3
Joined: Thu May 14, 2020 1:34 pm

Re: suse9.2 and exult 1.2 compile

Post by Trurl »

Looks like you don't have some neccessary files installed. SUSE is notorious for not including developement packages with default installations.
I don't know much about SUSE's package handling system, but I guess there is some option in YAST to search for RPMs. Go there and try searching for a package which contains the file "Xlib.h".

BTW, weren't there any errors when running "./configure" ?
darthgrog

Re: suse9.2 and exult 1.2 compile

Post by darthgrog »

OK. I did not have the xorg-x11-devel package installed. I'm now at yet another problem...
------------------------------------------------------------
/usr/lib/gcc-lib/i586-suse-linux/3.3.4/../../../../i586-suse-linux/bin/ld: cannot find -lslang
collect2: ld returned 1 exit status
darthgrog

Re: suse9.2 and exult 1.2 compile

Post by darthgrog »

No, I didn't have any problems with .configure. Everything seemed to go smoothly. I am finding a lot of development packages missing that are required to build exult. After the xorg devel package I also needed to install the libsmeg-devel package as well.
darthgrog

Re: suse9.2 and exult 1.2 compile

Post by darthgrog »

I got it. I was missing the slang-devel package. I finally made it through make. Thanks all!
darthgrog

Re: suse9.2 and exult 1.2 compile

Post by darthgrog »

Now I'm having problems compiling exult studio. ./configure claims that I don't have gtk+/glade files. I have both libglade and libglade2 installed with the development packages and the libglademm packages. I don't know what I'm missing.
wjp
Site Admin
Posts: 1708
Joined: Thu May 14, 2020 1:34 pm

Re: suse9.2 and exult 1.2 compile

Post by wjp »

What failed exactly according to config.log?
darthgrog

Re: suse9.2 and exult 1.2 compile

Post by darthgrog »

configure:25244: checking for GTK+/GLADE development files
configure:25261: result: no gtk+/libglade

My libglade so files are located in /opt/gnome/lib. I think it's looking in the wrong place.
darthgrog

Re: suse9.2 and exult 1.2 compile

Post by darthgrog »

Maybe this will help...
------------------------------------------------
#define USE_EXULTSTUDIO 1
#define VERSION "1.2"
#define VER_EXTRA ""
#define VER_MAJOR "1"
#define VER_MINOR "2"
#define YYTEXT_POINTER 1
#endif
#ifdef __cplusplus
extern "C" void std::exit (int) throw (); using std::exit;

configure: exit 1
wjp
Site Admin
Posts: 1708
Joined: Thu May 14, 2020 1:34 pm

Re: suse9.2 and exult 1.2 compile

Post by wjp »

It should be listing the compile/link errors in config.log as well...

Note that we're using pkg-config to find the libglade files, so if it can't find them you probably don't have that setup right.
Locked