Compiling ToME under Mac OSX

Everything about ToME 4.x.x. No spoilers, please

Moderator: Moderator

Message
Author
kazak
Thalore
Posts: 174
Joined: Fri Mar 04, 2005 8:04 pm
Location: colorado

Re: Compiling ToME under Mac OSX

#46 Post by kazak »

Downloaded b21 using the instructions in the first post, but I get one linking error on compile on osx 10.5:

Undefined symbols:
"_luaopen_zlib", referenced from:
_boot_lua in main.o
ld: symbol(s) not found
collect2: ld returned 1 exit status


I've successfully compiled 5 previous versions, but this one is new to me. Any suggestions?

Ping
Posts: 2
Joined: Tue Sep 06, 2005 3:55 pm

Re: Compiling ToME under Mac OSX

#47 Post by Ping »

I have the same linking problem but with osx 10.6. Thanks for looking into this!

Ping
Posts: 2
Joined: Tue Sep 06, 2005 3:55 pm

Re: Compiling ToME under Mac OSX

#48 Post by Ping »

Ok, the file src/lzlib/lzlib.c has to be added to the xcode project. As explained earlier, this can be done by opening the Xcode project, right-clicking on the Sources folder under T-Engine in the Groups & Files window and select Add -> Existing Files. Then browse to t-engine4/src/lzlib directory and select the lzlib.c file. Seem to work fine now!

yufra
Perspiring Physicist
Posts: 1332
Joined: Tue Jul 13, 2010 2:53 pm

Re: Compiling ToME under Mac OSX

#49 Post by yufra »

Sorry for the slow response, but you figured it so all is well. The X-code project in SVN needs to updated.
<DarkGod> lets say it's intended

kazak 2
Higher
Posts: 71
Joined: Sat Mar 05, 2011 6:43 pm

Re: Compiling ToME under Mac OSX

#50 Post by kazak 2 »

Thanks! Build succeeded after adding that file. Only...I'm getting some bizarre lua errors now. For instance, if I try to pick up the Rod of Recall, I get this: http://img27.imageshack.us/i/luaerror.jpg/

I also get errors when picking up a parchment, selling an artifact (selling non-artifacts works fine), and when using the yeek's identify talent (though the identify works on the second attempt). I've been sending in the in-game error reports when they pop up.

Are any other mac users having similar issues? Any ideas for an easy fix?


***Fixed , I think***

I think my problem had to do with not being on the official release revision. I missed the second part of the instructions in the first post and didn't know how to navigate to the t-engine4 directory in terminal. Those instructions could be a bit more explicit (for those of us new to this sort of thing) by adding in the "cd t-engine4" command before running the "svn update" bit.

ShadowReine
Posts: 2
Joined: Mon Mar 14, 2011 12:27 am

Re: Compiling ToME under Mac OSX

#51 Post by ShadowReine »

Okay. I have not compiled anything in absolutely years.

I would very much like to get ToME running on my partner's machine, which is a PPC running 10.5.6. But I haven't compiled anything in, oh, easily a decade. The walkthrough in this forum appears to be for 10.6? Does anyone have a good walkthrough to get it running under 10.5 and pre-Intel? I don't really have hours and hours to mess with it given either he's here or I'm working.

yufra
Perspiring Physicist
Posts: 1332
Joined: Tue Jul 13, 2010 2:53 pm

Re: Compiling ToME under Mac OSX

#52 Post by yufra »

The SVN is undergoing some really big changes that amongst other things have broken the "easy" way of compiling for Mac, 10.6 or otherwise. Better to wait a bit for things to settle down. :)
<DarkGod> lets say it's intended

ShadowReine
Posts: 2
Joined: Mon Mar 14, 2011 12:27 am

Re: Compiling ToME under Mac OSX

#53 Post by ShadowReine »

Well, that depends on how hard the hard way is...it's mostly time I'm concerned about. But I also don't want him to have to wait a long time to play.

yufra
Perspiring Physicist
Posts: 1332
Joined: Tue Jul 13, 2010 2:53 pm

Re: Compiling ToME under Mac OSX

#54 Post by yufra »

I am working on updating the premake mechanism for building on Mac and have had fairly good progress. Hopefully I will be able to tackle the last few bugs tomorrow and get that into the SVN for everyone to use.
<DarkGod> lets say it's intended

asthmatic_thematic
Higher
Posts: 79
Joined: Tue Aug 19, 2008 7:15 pm

Re: Compiling ToME under Mac OSX

#55 Post by asthmatic_thematic »

current errors in xcode compile:

TE4CORE_VERSION undefined (3 places)

when i cheat and comment out/dummy out those lines, i get:

_luaopen_bit
_luaopen_diamond_square
_luaopen_physfs
_tengine_main

all undefined from _boot_lua in main.o (the last actually is from SDLMain.o).

[No worries, yufra, re below. Just good to keep all the compiling issues in one place... Thanks!]
Last edited by asthmatic_thematic on Thu Mar 24, 2011 11:42 am, edited 1 time in total.

yufra
Perspiring Physicist
Posts: 1332
Joined: Tue Jul 13, 2010 2:53 pm

Re: Compiling ToME under Mac OSX

#56 Post by yufra »

There are quite a few problems right now. The official Mac maintainer is pretty busy right now and hasn't gotten around to updating the Xcode project. As I said above I have tried tinkering with the premake scripts, but haven't gotten them working and don't have a lot of experience compiling for Macs so I don't know if I will be able to. :(
<DarkGod> lets say it's intended

Encyclopath
Yeek
Posts: 13
Joined: Thu Jul 01, 2010 7:36 am

Re: Compiling ToME under Mac OSX

#57 Post by Encyclopath »

I've been able to compile without errors, but it crashes when I run it. In the meantime, I've been able to build and play without errors for the most part with the following commands. The recent store changes after r3052 cause problems that I haven't fixed yet. Some of these reverts to 2987 may be unnecessary, I'm still trying to eliminate those.

svn co -r3052 --username guest --password guestor http://svn.net-core.org/repos/t-engine4 .

svn update -r2987 premake4.lua

svn update -r2987 src/
svn update -r2987 bootstrap/
svn update -r2987 build/

svn update -r2987 game/engines/default/engine/utils.lua
svn update -r2987 game/engines/default/engine/Game.lua
svn update -r2987 game/engines/default/engine/Module.lua
svn update -r2987 game/engines/default/engine/version.lua

svn update -r2987 game/modules/tome/class/interface/Combat.lua
svn update -r2987 game/modules/tome/class/interface/TooltipsData.lua
svn update -r2987 game/modules/tome/class/interface/PlayerDumpJSON.lua

svn update -r2987 game/modules/tome/dialogs/UseTalents.lua
svn update -r2987 game/modules/tome/dialogs/UseItemDialog.lua

yufra
Perspiring Physicist
Posts: 1332
Joined: Tue Jul 13, 2010 2:53 pm

Re: Compiling ToME under Mac OSX

#58 Post by yufra »

Until better minds than mine work out how to handle the core loading/compilation on Mac OSX I am going to post a small patch that moves back to the old, single core executable instead of the runner + multiple core strategy. I have tested this patch against SVN3105, and don't worry if you get a hunk fail for later revision because I had to add the "luabitop" project to the premake files since I think DG forgot to commit those changes to the repository. Enough blabbing... instruction time!
  1. Download the patch to your local repository clone.
  2. Patch the repository with this command:

    Code: Select all

    patch -p0 <single_core.txt
    
  3. Set up the premake files with this command:

    Code: Select all

    premake4 gmake
    
  4. Compile the executable with this command:

    Code: Select all

    make
    
With a bit of luck the above instructions will drop a bundled app at "bin/Debug/t-engine.app". If you are not lucky, well my first guess would be that the SDL frameworks are not in the right location but it could be any number of things. Oh, and I think you will need to install premake (website). If you prefer to use X-code then you will probably have to add the luabitop stuff to the project yourself and then compile there.
Attachments
single_core.txt
(12.59 KiB) Downloaded 203 times
<DarkGod> lets say it's intended

Flare
Higher
Posts: 53
Joined: Thu Mar 17, 2011 10:47 pm

Re: Compiling ToME under Mac OSX

#59 Post by Flare »

I downloaded the b24 source and added the frameworks SDL_image.framework, SDL_mixer.framework, SDL_ttf.framework, and SDL.framework. Now I'm down to four errors. All of them are of the form "pbxcp: SDL.framework: No such file or directory". How can I help Xcode find the framework directories? All of them are in Library/Frameworks.

kazak 2
Higher
Posts: 71
Joined: Sat Mar 05, 2011 6:43 pm

Re: Compiling ToME under Mac OSX

#60 Post by kazak 2 »

The only thing I added was the "Headers" folder under SDL.framework. Built successfully, albeit with something like 56 warnings.

Post Reply