Build problem for Mac OS X

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
Andrew Hyatt

Build problem for Mac OS X

Post by Andrew Hyatt »

First, congratulation on 1.0 of exult, it's really an amazing feat.

Anyway, since there is no Mac OS X download of 1.0, I decided to build from source. I'm using SDL 1.2.5. My build fails with this problem:

O2 -Wno-long-long -DEXULT_DATADIR=\"/usr/local/share/exult\" -g -O2 -c exult.cc
In file included from exult.cc:48:
xdrag.h:33: syntax error before `*' token
xdrag.h:34: 'Window' is used as a type, but is not defined as a type.
xdrag.h:35: 'Window' is used as a type, but is not defined as a type.
xdrag.h:36: 'Atom' is used as a type, but is not defined as a type.
xdrag.h:37: 'Atom' is used as a type, but is not defined as a type.
xdrag.h:38: 'Atom' is used as a type, but is not defined as a type.
xdrag.h:39: 'Atom' is used as a type, but is not defined as a type.
xdrag.h:40: 'Atom' is used as a type, but is not defined as a type.
xdrag.h:41: 'Atom' is used as a type, but is not defined as a type.
xdrag.h:42: 'Atom' is used as a type, but is not defined as a type.
xdrag.h:43: 'Atom' is used as a type, but is not defined as a type.
xdrag.h:44: 'Atom' is used as a type, but is not defined as a type.
xdrag.h:45: 'Atom' is used as a type, but is not defined as a type.
xdrag.h:46: 'Atom' is used as a type, but is not defined as a type.
xdrag.h:47: 'Atom' is used as a type, but is not defined as a type.
xdrag.h:48: 'Atom' is used as a type, but is not defined as a type.
xdrag.h:51: parse error before `[' token
xdrag.h:69: parse error before `*' token
xdrag.h:74: `XClientMessageEvent' was not declared in this scope
xdrag.h:74: `cev' was not declared in this scope
xdrag.h:74: invalid data member initialization
xdrag.h:74: (use `=' to initialize static data members)
xdrag.h:74: variable or field `client_msg' declared void
xdrag.h:75: `XSelectionEvent' was not declared in this scope
xdrag.h:75: `sev' was not declared in this scope
xdrag.h:75: invalid data member initialization
xdrag.h:75: variable or field `select_msg' declared void
exult.cc: In function `void Init()':
exult.cc:688: `struct SDL_SysWMinfo' has no member named `info'
exult.cc:688: `ConnectionNumber' undeclared (first use this function)
exult.cc:688: (Each undeclared identifier is reported only once for each
function it appears in.)
exult.cc:690: `struct SDL_SysWMinfo' has no member named `info'
exult.cc:690: `struct SDL_SysWMinfo' has no member named `info'
exult.cc:691: `struct SDL_SysWMinfo' has no member named `info'
exult.cc:693: warning: initializer list being treated as compound expression
exult.cc: In function `void Handle_event(SDL_Event&)':
exult.cc:1096: `XEvent' undeclared (first use this function)
exult.cc:1096: `ev' undeclared (first use this function)
exult.cc:1096: `struct SDL_SysWMmsg' has no member named `event'
exult.cc:1097: `ClientMessage' undeclared (first use this function)
exult.cc:1098: `XClientMessageEvent' undeclared (first use this function)
exult.cc:1098: parse error before `)' token
make[2]: *** [exult.o] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all-recursive-am] Error 2

If anyone has any help, or can point me to a 1.0 binary of Mac OS X, I'd be grateful. Thanks in advance for any help...
Dominus
Site Admin
Posts: 5656
Joined: Thu May 14, 2020 1:34 pm

Re: Build problem for Mac OS X

Post by Dominus »

hm, I hopw that Fingolfin shows up and tells you where you go wrong.
But anyway even if you'd succeed in building Exult, you would npt be able to run it properly due to a bug in the OS-X gcc.
Tey searching our forum for the latest Mac OSx posts and you will find a more detailed explanation.
--
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!
wjp
Site Admin
Posts: 1708
Joined: Thu May 14, 2020 1:34 pm

Re: Build problem for Mac OS X

Post by wjp »

From Fingolfin on IRC:

You're trying to compile ExultStudio support, which relies on X11 for drag&drop support, hence doesn't work under OS X "normally"
You can get it to work when you install X11, and GTK etc.
(well you used to be able to at least, some time since I last tried)
---

You can also try compiling without ExultStudio support. I think the switch to configure is --disable-exult-studio-support
Andrew Hyatt

Re: Build problem for Mac OS X

Post by Andrew Hyatt »

Thanks for the info everyone!
Coffee-dependent Dragon

Re: Build problem for Mac OS X

Post by Coffee-dependent Dragon »

Did you ever get version 1.00 to compile correctly for OS X?
Clock Nova

Re: Build problem for Mac OS X

Post by Clock Nova »

Is there anyone out there who still has the older version of the OS and the compiler who can compile Exult 1.0 for MacOS X? Apparently, that's all that's needed. Surely someone can do us a favor and compile it? Please.
osxdude

Re: Build problem for Mac OS X

Post by osxdude »

There's been a new version of the developer tools available for a while now for OS X. So, that being said, anyone know what the status is?
fingolfin
Site Admin
Posts: 41
Joined: Thu May 14, 2020 1:34 pm

Re: Build problem for Mac OS X

Post by fingolfin »

I think the status didn't change at all, but I'll try it once more.
Marc Kleine-Budde

Re: Build problem for Mac OS X

Post by Marc Kleine-Budde »

I can build the 1.0 Version of Exult, using the Dec. Developement Tools and the newest fink binary distribution.

First I build SDL latest CVS snapshot, than I tried exult...configure didn't recognize the host system properly. Trying the autogen.sh from CVs helped. After Patching the AudioOptions_gump.cc, it compiles.

A patch including a new AudioOptions_gump.cc and a new configure is available at
http://timberwolf.dyndns.org/exult/exul ... .patch.bz2

A AudioOptions_gump.cc only patch can be downloaded at
http://timberwolf.dyndns.org/exult/gump-osx.patch.bz2
Clock Nova

Re: Build problem for Mac OS X

Post by Clock Nova »

So, will you build it then make it available to the rest of us? Please?
wjp
Site Admin
Posts: 1708
Joined: Thu May 14, 2020 1:34 pm

Re: Build problem for Mac OS X

Post by wjp »

AFAIK, building it was never the problem. Running it, otoh, causes crashes because of a bug in the fstream implementation. (It skips the last byte when reading a file, or something like that)
Marc Kleine-Budde

Re: Build problem for Mac OS X

Post by Marc Kleine-Budde »

I've trouble starting a new game.....

BG: *** malloc_zone_malloc[1692]: argument too large: -6
SI: *** malloc_zone_malloc[1704]: argument too large: -1

Perhaps my Static files are corrupt. I haven't checked that. Anyway Exult-1.0 for OSX 10.2.3 can be downloaded at.

http://timberwolf.dyndns.org/exult/exul ... sx.tar.bz2
note: 3 MB on throttled DSL dialup :)

My version uses the .exult.cfg File in your $HOME dir. A sample is in the archive. The SDL isn't linked static, thus copy the opt dir from the archive to /opt so that SDL is in /opt/sdl-1.2

btw: the data dir is in Exult.app/Contents/MacOS/data

tell me how far you get....
wjp
Site Admin
Posts: 1708
Joined: Thu May 14, 2020 1:34 pm

Re: Build problem for Mac OS X

Post by wjp »

Clock Nova

Re: Build problem for Mac OS X

Post by Clock Nova »

I tried it, but the app won't launch. The icon bounces for a few seconds in the Dock, then goes away.

I remember this happened once before with an earlier build, before Fingolfin fixed it. Don't know what the problem was, though.
wjp
Site Admin
Posts: 1708
Joined: Thu May 14, 2020 1:34 pm

Re: Build problem for Mac OS X

Post by wjp »

The problem at the time was zlib, I think. (dynamic library not found, or something like that)
Marc Kleine-Budde

Re: Build problem for Mac OS X

Post by Marc Kleine-Budde »

Open the Console:
cd /Applications or whereever the Exult.app is
./Exult.app/Contents/MacOS/exult

what's the erros message?

Have U installed and changed the .exult.cfg, is your gamedata (static dirs) in the right place?
Clock Nova

Re: Build problem for Mac OS X

Post by Clock Nova »

The error message is:

DL-1.2.0.dylib (No such file or directory, errno = 2)
Trace/BPT trap

I have changed the .cfg file and the game data is in thge proper place.

What's Up?
wjp
Site Admin
Posts: 1708
Joined: Thu May 14, 2020 1:34 pm

Re: Build problem for Mac OS X

Post by wjp »

If that's SDL-1.2.0.dylib, it means it can't find the SDL development libraries.

(To the best of my rather limited OSX knowledge, that is)
Marc Kleine-Budde

Re: Build problem for Mac OS X

Post by Marc Kleine-Budde »

Have you copied the sdl-1.2 from the archive to /opt?
it should look like this:

[frogger@vulture:~]$ ls -l /opt/sdl-1.2/lib/
total 2328
drwxr-xr-x 8 frogger staff 272 Feb 2 10:21 .
drwxr-xr-x 7 frogger staff 238 Feb 2 10:21 ..
-rwxr-xr-x 1 frogger staff 1094508 Feb 2 10:21 libSDL-1.2.0.0.6.dylib
lrwxr-xr-x 1 frogger staff 22 Feb 2 10:21 libSDL-1.2.0.dylib -> libSDL-1.2.0.0.6.dylib
-rw-r--r-- 1 frogger staff 1212452 Feb 2 10:21 libSDL.a
lrwxr-xr-x 1 frogger staff 22 Feb 2 10:21 libSDL.dylib -> libSDL-1.2.0.0.6.dylib
-rwxr-xr-x 1 frogger staff 655 Feb 2 10:21 libSDL.la
-rw-r--r-- 1 frogger staff 64380 Feb 2 10:21 libSDLmain.a
Marc Kleine-Budde

Re: Build problem for Mac OS X

Post by Marc Kleine-Budde »

If someone can tell me how to build a static version of exult, I'll do that.....

LDFLAGS=-static failted, because gcc cannot find crt0.o
Clock Nova

Re: Build problem for Mac OS X

Post by Clock Nova »

I didn't copy the sdl-1.2 to /opt, it was already there. I just copied my files into the new archive folder.
wjp
Site Admin
Posts: 1708
Joined: Thu May 14, 2020 1:34 pm

Re: Build problem for Mac OS X

Post by wjp »

How to check for the fstream bug:

download
http://www.math.leidenuniv.nl/~wpalenst/readtest.cc

c++ -o readtest readtest.cc
echo test > bindata
./readtest

The output _should_ end with:
"total characters read: 5"
Marc Kleine-Budde

Re: Build problem for Mac OS X

Post by Marc Kleine-Budde »

What does that mean to us OSX users?

[frogger@vulture-w:~/test]$ ./readtest
is before: 0xbffffaa0, is after: 0xbffffaa0, char 1: 't'
is before: 0xbffffaa0, is after: 0xbffffaa0, char 2: 'e'
is before: 0xbffffaa0, is after: 0xbffffaa0, char 3: 's'
is before: 0xbffffaa0, is after: 0xbffffaa0, char 4: 't'
is before: 0xbffffaa0, is after: 0, EOF
total characters read: 4
Dominus
Site Admin
Posts: 5656
Joined: Thu May 14, 2020 1:34 pm

Re: Build problem for Mac OS X

Post by Dominus »

that that bug is still plagueing you ?
--
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!
wjp
Site Admin
Posts: 1708
Joined: Thu May 14, 2020 1:34 pm

Re: Build problem for Mac OS X

Post by wjp »

Yes, that means the bug is still there. It fails to read the last character (the CR, in this case) in the file. As you can probably imagine, this can cause some pretty serious problems with binary data files.
Marc Kleine-Budde

Re: Build problem for Mac OS X

Post by Marc Kleine-Budde »

This was a kind of rhetorical question ;)

I've searched the web for 'fstream bug' but found nothing useful. Does this Bug has a other 'name'? Is it known to Apple? Is a workaround available? What can we do?
wjp
Site Admin
Posts: 1708
Joined: Thu May 14, 2020 1:34 pm

Re: Build problem for Mac OS X

Post by wjp »

AFAIK, Fingolfin has notified Apple, but apparently they haven't fixed it yet.

I guess it wouldn't hurt to submit another bug report? :-)
fliptw

Re: Build problem for Mac OS X

Post by fliptw »

Do files on OSX still have the resource fork?
Marc Kleine-Budde

Re: Build problem for Mac OS X

Post by Marc Kleine-Budde »

What is a 'resource fork'?
fingolfin
Site Admin
Posts: 41
Joined: Thu May 14, 2020 1:34 pm

Re: Build problem for Mac OS X

Post by fingolfin »

My original bug report was closed as a duplicate. Due to the shitty nature of Apple's "Radar" bug tracker, I have no way to see any information on the bug which mine was a duplicate off... grr

Luckily, I have good contacts to certain Apple employees . It seems that the fstream bug was in GCC 3.1, too, but was fixed there (and of course in subsequent FSF GCC releases, hence it works on Linux). They merged the fix into the Apple GCC tree, and the next dev tool update hopefully will have the fix, too.
wjp
Site Admin
Posts: 1708
Joined: Thu May 14, 2020 1:34 pm

Re: Build problem for Mac OS X

Post by wjp »

Additionally:

and yes OS X still has resource forks
but as under OS 9, resource forks are nothing mandatory, i.e. there are plenty of files w/o one, too :-)
out of curiosity; any way to access them with 'standard' unix tools?
most standard unix tools ignore them, but there is a special notion, you can do something like "cp foo/rsrc bar" to copy the res fork of foo to the data fork of bar etc. (the syntax is a bit different I think, never use it)
Clock Nova

Re: Build problem for Mac OS X

Post by Clock Nova »

Thanks, Fingolfin. I am looking forward to the inevitable release of the OSX 1.0 version. I hope you'll continue to release later versions. Your work is much appreciated.
Marc Kleine-Budde

Re: Build problem for Mac OS X

Post by Marc Kleine-Budde »

I'm finally able to compile, start and _play_ the 1.0 Version!

Some interested in Binarys?
fingolfin
Site Admin
Posts: 41
Joined: Thu May 14, 2020 1:34 pm

Re: Build problem for Mac OS X

Post by fingolfin »

Interesting, Marc, how did you do it? Building never was a problem for me, but how did you work around the buggy C++ library?
Marc Kleine-Budde

Re: Build problem for Mac OS X

Post by Marc Kleine-Budde »

First I build a vanilla (w/o apple extentions) gcc-3.2.2, but SDL cannot be compiled with a gcc that not supporing the apple extentions like --framwork.

Than I tried the gcc from opendarwin.org's cvs. That supports the apple stuff, but is still buggy. After some gdb-ing of wjp's test programm, I thought the problem may be in /usr/include/gcc/darwin/3.1/g++-v3/bits/istream.tcc. Then I merged the differences from gcc-3.2.2's istream.tcc into the opendarwin.org's (a simple copy will do it, too) and recompiled it. To my suprise it works ;) (I never coded c++ before).

The resulting binary is not depending on the 'new' g++ libs...Simply changing apple's istream.tcc doesn't work. :(

If someone can tell me how to compile exult static (with SDL) I will do so...
matt

Re: Build problem for Mac OS X

Post by matt »

So has a binary of 1.00 been created yet by anyone for OS X?

I know absolutely nothing about this stuff, so I'm currently using .99...
Dominus
Site Admin
Posts: 5656
Joined: Thu May 14, 2020 1:34 pm

Re: Build problem for Mac OS X

Post by Dominus »

You can ask Marc for a copy of his built (better yet ask him to do a 1.1.x built). An official release of 1.0 for Mac OSX is still waiting for an official fix for the above issue from apple.
--
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!
wjp
Site Admin
Posts: 1708
Joined: Thu May 14, 2020 1:34 pm

Re: Build problem for Mac OS X

Post by wjp »

I heard from Fingolfin that the issue has been fixed by Apple internally, btw. So now we're just waiting for the next release of the dev.tools, I guess.
Marc Kleine-Budde

Re: Build problem for Mac OS X

Post by Marc Kleine-Budde »

I'll try to build a 1.1.x this evening (CET)...
Clock Nova

Re: Build problem for Mac OS X

Post by Clock Nova »

Thanks, Marc. I'm going to want a copy of that, too. Will it be added to the downloads page?
Marc

Re: Build problem for Mac OS X

Post by Marc »

With Fingolfin's help, there is a static version of exult 1.0.0 for OSX! This version uses the config file in the users $HOME dir. (~/.exult.cfg). A 1.1.x Version will come soon....

http://www.stud.uni-hannover.de/~kleine ... 0.0.tar.gz
Marc

Re: Build problem for Mac OS X

Post by Marc »

Hi *!

...a static 1.1.x version of exult can be found at:

http://www.stud.uni-hannover.de/~kleine ... cvs.tar.gz

...happy testing
Clock Nova

Re: Build problem for Mac OS X

Post by Clock Nova »

No luck getting the 1.1 to run. It can't find the data files, though I'm using the same config file and the same directory structure as before. Any ideas?
Clock Nova

Re: Build problem for Mac OS X

Post by Clock Nova »

Here's a question:

The last OSX version has a folder in it called "Data" which the 1.1 version does not. If I copy the data folder over to the 1.1 directory, the game start, then immediately quits, withou even an error window. What's the significance of the Data folder? It seems to have nothing to do with the U7 files.

Also, why no config file with the 1.1 version?
Dominus
Site Admin
Posts: 5656
Joined: Thu May 14, 2020 1:34 pm

Re: Build problem for Mac OS X

Post by Dominus »

the data folder contains vital stuff for exult to function. If that is missing from the snapshot above, then the snapshot is not correctly playable. you could try running "exult --nocrc" so it uses the data files you copied over.
--
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!
Clock Nova

Re: Build problem for Mac OS X

Post by Clock Nova »

Hmmm. I think I will just wait for another build.
Marc

Re: Build problem for Mac OS X

Post by Marc »

The data folder is included in the package, it can be found at
exult-1.1.0-cvs/Exult-cvs.app/Contents/MacOS/data

The CVS Version uses the config file in your $HOME dir. Assuming your username is 'nova', the exult uses the following config config file:
/Users/nova/.exult.cfg

To get Exult running:
1) download and extract the exult-1.1.0-cvs.tar.gz
2) erase or move away ~/.exult.cfg
3) start exult-cvs with clicking at exult icon, then exult should start and tell you that it cannot find the data files for either BG or SI
4) open ~/.exult.cfg with your favourite editor
5) change the entry config-disk-game-blackgate-path (should be line 6) from '.' to the adequate path containing the static dir of BG. for example the dir /opt/exult/share/exult/bg/static is the original static folder from BG, so line 6 will read '/opt/exult/share/exult/bg' (of course without the quotes)
6) change line 20 (config-disk-game-serpentisle-path) pointing to corresponding SI path
7) start exult
8) play or post error message
Danjuro

exult quitting without saying anything.

Post by Danjuro »

Greetings,

about the "If I copy the data folder over to the 1.1 directory, the game start, then immediately quits, withou even an error window" problem: I had the exact same trouble while experiencing and playing around with exult 0.99rc2 and 1.0: it appears the .flx files are crucial and proper to each exult version, otherwise leading to this 'non-event'. As those files weren't included in the archives Marc kindly provided us, I got the same error, and could work around thru the somewhat tedious process of asking a peecee friend to get me the proper files from the win32 cvs build.

So far I must say, this is the most stable exult release (whether official or not) ever! For some reason, the midi musics have always beeen very unstable when switching, and since Ogg-powered MT32 music goodness finally blesses my hears, the problem is gone :)

Thank you for the hard work, gentlemen.

Best regards.
wjp
Site Admin
Posts: 1708
Joined: Thu May 14, 2020 1:34 pm

Re: Build problem for Mac OS X

Post by wjp »

If Exult doesn't find the right .flx files, it prints an error message to the console. I guess if you start Exult from a GUI, it doesn't show this.

The .flx files are versioned to prevent weird incompatibility issues. You can make Exult ignore the .flx CRC by passing the --nocrc option to Exult, if you really want to. (But this is _not_ recommended)
Marc

Re: Build problem for Mac OS X

Post by Marc »

As already mentioned the data files are included! They are in the dir exult-1.1.-cvs/Exult-cvs.app/Contents/MacOS/data/.

[frogger@vulture:~]$ ll exult-1.*/Exult*/Contents/MacOS/data/

exult-1.0.0/Exult.app/Contents/MacOS/data/:
total 328k
drwxr-xr-x 6 frogger staff 204 Mar 18 00:36 .
drwxr-xr-x 4 frogger admin 136 Mar 18 09:40 ..
-rw-r--r-- 1 frogger staff 102k Mar 18 00:35 exult.flx
-rw-r--r-- 1 frogger staff 133k Mar 18 00:35 exult_bg.flx
-rw-r--r-- 1 frogger staff 59k Mar 18 00:35 exult_si.flx
-rw-r--r-- 1 frogger staff 25k Mar 18 00:36 midisfx.flx

exult-1.1.0-cvs/Exult-cvs.app/Contents/MacOS/data/:
total 328k
drwxr-xr-x 6 frogger staff 204 Mar 18 00:36 .
drwxr-xr-x 4 frogger admin 136 Mar 21 23:12 ..
-rw-r--r-- 1 frogger staff 102k Mar 21 23:11 exult.flx
-rw-r--r-- 1 frogger staff 134k Mar 21 23:11 exult_bg.flx
-rw-r--r-- 1 frogger staff 59k Mar 21 23:11 exult_si.flx
-rw-r--r-- 1 frogger staff 25k Mar 21 23:11 midisfx.flx
Locked