Jump to content
The Dark Mod Forums

Compiling on OSX


Midnight

Recommended Posts

I've been playing around with trying to compile TDM on OSX (Intel) but I'm getting compile errors and wondered if someone could give me some pointers. Note: I'm not a developer, but I thought I might have some luck if I hack away at this for long enough. rolleyes.gif Here's the compiler output...

 

 

MacBookPro:thedarkmod.1.03.src scott$ sudo ./darwinBuild.sh

scons: Reading SConscript files ...

Loading build configuration from site.conf:

DEDICATED='0'

GL_HARDLINK='0'

JOBS='1'

ID_NOLANADDRESS='0'

CC='gcc'

NOCURL='0'

TARGET_CORE='1'

BUILD_GAMEPAK='1'

BUILD='release'

BASEFLAGS=''

TARGET_DEMO='0'

CXX='g++'

ID_MCHECK='2'

BUILD_ROOT='build'

IDNET_HOST=''

LIBC_MALLOC='1'

TARGET_GAME='1'

TARGET_MONO='0'

DEBUG_MEMORY='0'

ALSA='1'

Command line: BUILD_GAMEPAK='1'

SDK.py hookup failed

Setup.py hookup failed

 

scons: warning: BuildDir() and the build_dir keyword have been deprecated;

use VariantDir() and the variant_dir keyword instead.

File "/Users/scott/Downloads/thedarkmod.1.03.src/SConstruct", line 472, in <module>

scons: done reading SConscript files.

scons: Building targets ...

scons: building associated VariantDir targets: build/release/game

g++ -o build/release/game/DarkMod/AI/CommunicationSubsystem.os -c -fPIC -pipe -Wall -Wno-unknown-pragmas -Wno-non-virtual-dtor -fmessage-length=0 -fvisibility=hidden -m32 -D__linux__ -O3 -march=pentium3 -ffast-math -fno-unsafe-math-optimizations -fomit-frame-pointer -fno-strict-aliasing -Wno-unused -Wno-deprecated -DSUPPRESS_CONSOLE_WARNINGS -DGAME_DLL -Iinclude -Iinclude/zlib -Iinclude/minizip -I. -IDeveloper/SDKs/MacOSX10.6.sdk/usr/X11/include -Ilinux/devil/include DarkMod/AI/CommunicationSubsystem.cpp

In file included from include/../idlib/precompiled.h:85,

from DarkMod/AI/CommunicationSubsystem.cpp:10:

include/../idlib/../sys/sys_public.h:95:1: warning: "BUILD_STRING" redefined

include/../idlib/../sys/sys_public.h:51:1: warning: this is the location of the previous definition

include/../idlib/../sys/sys_public.h:96:1: warning: "BUILD_OS_ID" redefined

include/../idlib/../sys/sys_public.h:52:1: warning: this is the location of the previous definition

include/../idlib/../sys/sys_public.h:108:1: warning: "ALIGN16" redefined

include/../idlib/../sys/sys_public.h:61:1: warning: this is the location of the previous definition

In file included from include/../idlib/../renderer/qgl.h:26,

from include/../idlib/precompiled.h:120,

from DarkMod/AI/CommunicationSubsystem.cpp:10:

include/GL/gl.h:1402:1: warning: "GL_GLEXT_LEGACY" redefined

In file included from include/../idlib/precompiled.h:120,

from DarkMod/AI/CommunicationSubsystem.cpp:10:

include/../idlib/../renderer/qgl.h:24:1: warning: this is the location of the previous definition

DarkMod/AI/CommunicationSubsystem.cpp: In member function ‘virtual idStr ai::CommunicationSubsystem::GetDebugInfo()’:

DarkMod/AI/CommunicationSubsystem.cpp:174: error: call of overloaded ‘idStr(size_t)’ is ambiguous

include/../idlib/../idlib/str.h:446: note: candidates are: idStr::idStr(float)

include/../idlib/../idlib/str.h:435: note: idStr::idStr(unsigned int)

include/../idlib/../idlib/str.h:424: note: idStr::idStr(int)

include/../idlib/../idlib/str.h:416: note: idStr::idStr(char)

include/../idlib/../idlib/str.h:408: note: idStr::idStr(bool)

include/../idlib/../idlib/str.h:367: note: idStr::idStr(const char*) <near match>

include/../idlib/../idlib/str.h:328: note: idStr::idStr(const idStr&) <near match>

scons: *** [build/release/game/DarkMod/AI/CommunicationSubsystem.os] Error 1

scons: building terminated because of errors.

mv: rename gamex86-base.so to gamex86.so: No such file or directory

strip: can't open file: gamex86.so (No such file or directory)

 

I set BASELINKFLAGS in SConstruct to -m32, but I get the same errors when calling scons directly and specifying this flag.

Edited by Midnight
Link to comment
Share on other sites

  • Replies 145
  • Created
  • Last Reply

Top Posters In This Topic

Try changing line 174 in CommunicationSubsystem.cpp from

return (_enabled) ? GetCurrentTaskName() + " (" + idStr(_taskQueue.size()) + ")" : "";

to

return (_enabled) ? GetCurrentTaskName() + " (" + idStr(static_cast<unsigned>(_taskQueue.size())) + ")" : "";

Does that error go away?

Link to comment
Share on other sites

  • 4 weeks later...

Doom3world member "Simulation" helped Hexen EOC compile their OSX version.

 

If this conversion process isn't yet "well in hand" someone with Doom3world access might want to ping him for advice?

 

Tracker:

 

http://bugs.angua.at/view.php?id=2518

Please visit TDM's IndieDB site and help promote the mod:

 

http://www.indiedb.com/mods/the-dark-mod

 

(Yeah, shameless promotion... but traffic is traffic folks...)

Link to comment
Share on other sites

  • 2 weeks later...

I wouldn't say this is well in hand. I did manage to get TDM compiled, but had problems with library dependencies.

I was using the MacPorts distribution platform to install all the required dependencies, but these were setup to compile for 64 bit. Although there's a setting in MacPorts to compile for x86, it doesn't look like all the libraries were tested for this option as I received errors when I tried this.

 

I haven't pursued this further since then, and won't get a chance to really focus on this for at least 2 months due to RL issues, so if someone from Doom3World is able to try this, by all means see if they're interested.

 

I am curious how many TDM players are interested in a OSX version. It would certainly be a nice update for moddb.

Link to comment
Share on other sites

Sorry for the lack of updates. The current TDM SVN sources are already compiling in OS X including tdm_update and tdmlauncher (all universal builds), but they haven't been fully tested yet. The game is running, but there are some glitches when trying to install FMs. Also, tdmlauncher has difficulties finding the correct path to the Doom 3 application (which I got told could be anywhere on the system).

Link to comment
Share on other sites

  • 3 weeks later...

Here is a test binary for you to test. First off you'll need to put the tdm_game03.pk4 into your darkmod folder (which should be at 1.04 level). The tdm_game03.pk4 contains the universal game binary. Next, grab the tdmlauncher.macosx from the links below and put it in darkmod too.

 

For this test it's important that your darkmod folder is in ~/Library/Application Support/Doom 3, e.g. /Users/greebo/Library/Application Support/Doom 3/darkmod.

 

The hard part is to launch the game, you'll need to do that from the console as tdmlauncher.macosx is not yet capable of locating your Doom 3 application. Use something like this (grayman might be able to give more insight on that as he managed to launch one of these builds in January):

 

Change folders to your Doom 3 folder, e.g. /Users/greebo/Desktop/Doom 3

 

./"Doom 3" +set fs_game darkmod

 

Hopefully this will bring up TDM for you. Let me know how it works. The game is placing the DarkMod.log file in /Users//Library/Logs/DarkMod.log now (although I couldn't test this)

 

The links:

http://www.dramtheth.../tdm_game03.pk4

http://www.dramtheth...launcher.macosx

Link to comment
Share on other sites

Thanks for the files, unfortunately I've not managed to get this to work yet. I've copied my "Doom 3" folder to /Users/<username>/Library/Application Support/ and can run Doom3 by double clicking the "Doom 3.app" container. I can then choose TDM as a mod and this starts to load (displays the very first loading graphic) but quits unexpectedly. No log file was created in Logs/ (I've changed permissions so there shouldn't be any problem with this).

 

I also tried using the console to run the "Doom 3" executable directly from "Doom 3.app/Contents/MacOS/Doom 3" with +set fs_game darkmod and this has the same result. On the plus side I then get errors printed to the console (see attached).

 

I've tried running tdmlauncher.macosx from the console, but this seems to be hardcoded to use /usr/local/games/ and when I copied the game folder to that location it wouldn't run due to permissions errors. I'll have another go at using this in case it's something simple (though the permissions looked okay when I tried this earlier).

initerror.txt

Edited by Midnight
Link to comment
Share on other sites

@Midnight:

 

ERROR: Error: file tdm_base01.pk4/script/tdm_events.script, line 1120: Unknown event 'knockout'

 

I think you might have a v1.05 build but are trying to run it with a v1.04 PK4 files. (Or vice versa?)

"The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore, all progress depends on the unreasonable man." -- George Bernard Shaw (1856 - 1950)

 

"Remember: If the game lets you do it, it's not cheating." -- Xarax

Link to comment
Share on other sites

Thanks. Progress... I think. wink.gif

 

Now getting the following error at the end of initialisation:

 

Initializing scripts
WARNING: Non-portable: path contains uppercase characters: darkmod/Users/scott/Library/Application Support/Doom 3/darkmod/script/script
WARNING: Non-portable: path contains uppercase characters: base/Users/scott/Library/Application Support/Doom 3/darkmod/script/script
WARNING: Non-portable: path contains uppercase characters: darkmod/Users/scott/Library/Application Support/Doom 3/darkmod/script/script
WARNING: Non-portable: path contains uppercase characters: base/Users/scott/Library/Application Support/Doom 3/darkmod/script/script
WARNING: Non-portable: path contains uppercase characters: darkmod/Users/scott/Library/Application Support/Doom 3/darkmod/script/script
WARNING: Non-portable: path contains uppercase characters: base/Users/scott/Library/Application Support/Doom 3/darkmod/script/script
TODO: Sys_SetClipboardData
--------- Game Map Shutdown ------------------------------------------------********************
ERROR: Error: file tdm_base01.pk4/script/doom_events.script, line 1006: Unknown event 'moveToCoverFrom'
********************
Sys_Error: Error during initialization

Edited by Midnight
Link to comment
Share on other sites

Can I see the whole log? That event is definitely there in 1.04, maybe the DLL failed to load?

 

I should have paid attention to the error log, it was picking up the DLL from the Doom3 base folder (see attached). I think the new pk4 is corrupt as I tried renaming it to Zip and couldn't open it (unlike the earlier pk4 which I could extract the contents from). Tried re-downloading using a different browser and same thing, so it's probably the copy on the server that's corrupt.

initerror.txt

Link to comment
Share on other sites

Brilliant, this is working and TDM plays flawlessly! I did have to change permissions to get this to work as I was getting an error when installing FMs (check for permissions and disk space), and the missions.tdminfo file was created in "darkmod ls/fms/" rather than "darkmod/fms" so I copied this to the expected folder as well (not sure if this made a difference).

 

I'll continue testing and add bugs to the bugtracker if I find any, but so far everything looks good.

Link to comment
Share on other sites

Good to hear that. :) What I would be particularly interested in is the DarkMod.log file when installing FMs and restarting TDM. Could you try the following: Go to darkmod/ and edit the darkmod.ini file to switch on the LogClass_MAINMENU as well as the LogTypes DEBUG, ERROR, INFO and WARNING. Then start TDM, select an FM, click "Install Mission", but instead of clicking on "OK" to restart automatically just close TDM. Then copy the DarkMod.log file somewhere safe and send it to me - it would be overwritten if you restart TDM immediately after install that's why you need to intercept that and close TDM when the restart popup is displayed. The tdmlauncher.log would also be interesting.

 

Also, would you care to test an OSX version of tdm_update? I have a mac build of that as well.

Link to comment
Share on other sites

Sorry for the lack of update. The Darkmod.log file doesn't seem to be getting written to, I've located it in /Doom 3.app/Contents/Resources/ (where it gets created from scratch when installing an FM) but it's 0 bytes. [Edit - I checked this without clicking OK after installing a mission, i.e. used the console to exit before proceeding]

 

The tdmlauncher log (which is also in the Resources folder) contains the following:

 

MacBookPro:Resources scott$ Path to tdmlauncher is /Users/scott/Library/Application Support/Doom 3/darkmod/tdmlauncher.macosx
Darkmod directory is /Users/scott/Library/Application Support/Doom 3/darkmod/
Trying default value for engine executable is /Users/scott/Library/Application Support/Doom 3/Doom 3
Trying default Linux location for engine executable /usr/local/games/doom3/Doom 3
Could not find engine executable at default locations, will be searching command line arguments for a path to doom3 executable.
Reading engine executable from command line arguments: /Users/scott/Library/Application Support/Doom 3/Doom 3.app/Contents/MacOS/./Doom 3
Current FM is: rift
Full argument string is: +set fs_game_base darkmod  +set fs_game rift
Closing logfile.

 

 

I tried creating a symbolic link from "/Doom 3.app/Contents/MacOS/Doom 3" to "/Application Support/Doom 3/Doom 3" but this gave the following error when running tdmlauncher:

 

MacBookPro:darkmod scott$ ./tdmlauncher.macosx 
Path to tdmlauncher is /Users/scott/Library/Application Support/Doom 3/darkmod/./tdmlauncher.macosx
Darkmod directory is /Users/scott/Library/Application Support/Doom 3/darkmod/./
Trying default value for engine executable is /Users/scott/Library/Application Support/Doom 3/darkmod/Doom 3
Found engine executable in /Users/scott/Library/Application Support/Doom 3/darkmod/Doom 3
Current FM is: rift
Cannot find Mod folder for FM: rift
Current FM reset to empty again.
Full argument string is: +set fs_game darkmod
Trying to launch /Users/scott/Library/Application Support/Doom 3/darkmod/Doom 3 +set fs_game darkmod
MacBookPro:darkmod scott$ 2011-03-07 18:18:21.615 Doom 3[7937:903] No Info.plist file in application bundle or no NSPrincipalClass in the Info.plist file, exiting

 

I assume that the "Doom 3" binary is complaining that the Info.plist (which exists within Doom 3.app/Contents/) is not in ../ since tdmlauncher is being executed from the darkmod folder? [Edit - Nope. I don't know how it's looking for this plist file, I created a sym link to Doom3 in a folder alongside the MacOS folder, but still get the same error]

Edited by Midnight
Link to comment
Share on other sites

Hm. I think I'll go back writing the logfile to /tmp for the moment being.

 

As for tdmlauncher, this is looking wrong:

 

Darkmod directory is /Users/scott/Library/Application Support/Doom 3/darkmod/./

Trying default value for engine executable is /Users/scott/Library/Application Support/Doom 3/darkmod/Doom 3

 

The engine path value should not contain "darkmod", so tdmlauncher's guess is wrong. I can't see why tdmlauncher reports that the engine executable is found at that location, there isn't a "Doom 3" file in darkmod, is there?

 

When the game is restarting the correct path is sent to tdmlauncher by TDM:

/Users/scott/Library/Application Support/Doom 3/Doom 3.app/Contents/MacOS/./Doom 3

 

Can you try setting up a shortcut to tdmlauncher using this path as argument? It should be able to start the game then.

Link to comment
Share on other sites

The engine path value should not contain "darkmod", so tdmlauncher's guess is wrong. I can't see why tdmlauncher reports that the engine executable is found at that location, there isn't a "Doom 3" file in darkmod, is there?

Oops, I had created a sym link to the D3 binary in the darkmod folder while testing this. Originally (and now that I've removed the link) I received the following:

 

 

MacBookPro:darkmod scott$ ./tdmlauncher.macosx 
Path to tdmlauncher is /Users/scott/Library/Application Support/Doom 3/darkmod/./tdmlauncher.macosx
Darkmod directory is /Users/scott/Library/Application Support/Doom 3/darkmod/./
Trying default value for engine executable is /Users/scott/Library/Application Support/Doom 3/darkmod/Doom 3
Trying default Linux location for engine executable /usr/local/games/doom3/Doom 3
Could not find engine executable at default locations, will be searching command line arguments for a path to doom3 executable.
Current FM is: patently_dangerous
Cannot find Mod folder for FM: patently_dangerous
Current FM reset to empty again.
Full argument string is: +set fs_game darkmod
Trying to launch /usr/local/games/doom3/Doom 3 +set fs_game darkmod
Error while launching D3 executable: MacBookPro:darkmod scott$ No such file or directory

 

 

Can you try setting up a shortcut to tdmlauncher using this path as argument? It should be able to start the game then.

Yes, this works when running launcher directly on the command line with path as parameter, not sure what kind of shortcut you're suggesting (Alias doesn't support parameters AFAIK).

 

Link to comment
Share on other sites

Oops, I had created a sym link to the D3 binary in the darkmod folder while testing this. Originally (and now that I've removed the link) I received the following:

Ah, ok, that explains things.

 

Yes, this works when running launcher directly on the command line with path as parameter, not sure what kind of shortcut you're suggesting (Alias doesn't support parameters AFAIK).

Good to hear that's working - this might be the recommended way for Mac users in the end, as I've been told there is no standard application folder where Doom 3 can be expected by tdmlauncher.

 

There are no shortcuts in MacOSX? :blink: Maybe linking to a shell script is possible?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recent Status Updates

    • nbohr1more

      Was checking out old translation packs and decided to fire up TDM 1.07. Rightful Property with sub-20 FPS areas yay! ( same areas run at 180FPS with cranked eye candy on 2.12 )
      · 1 reply
    • taffernicus

      i am so euphoric to see new FMs keep coming out and I am keen to try it out in my leisure time, then suddenly my PC is spouting a couple of S.M.A.R.T errors...
      tbf i cannot afford myself to miss my network emulator image file&progress, important ebooks, hyper-v checkpoint & hyper-v export and the precious thief & TDM gamesaves. Don't fall yourself into & lay your hands on crappy SSD
       
      · 3 replies
    • OrbWeaver

      Does anyone actually use the Normalise button in the Surface inspector? Even after looking at the code I'm not quite sure what it's for.
      · 7 replies
    • Ansome

      Turns out my 15th anniversary mission idea has already been done once or twice before! I've been beaten to the punch once again, but I suppose that's to be expected when there's over 170 FMs out there, eh? I'm not complaining though, I love learning new tricks and taking inspiration from past FMs. Best of luck on your own fan missions!
      · 4 replies
×
×
  • Create New...