historic_bruno Posted November 2, 2012 Report Share Posted November 2, 2012 I just got a bunch of system info when I ran lsof but nothing about pyrogenesis. I also ran lsof -a -d cwd -c pyrogenesis but didn't produce any results.The game has to be running when you use that command. For me it shows:COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAMEpyrogenes 207 Ben cwd DIR 14,2 3672 324263 /Users/Ben/0ad/binaries/systemso dlopen should be finding libAtlasUI and libCollada, and indeed it works without any @executable_path hack. Maybe for you and wraitii it's something different? Quote Link to comment Share on other sites More sharing options...
wraitii Posted November 2, 2012 Report Share Posted November 2, 2012 I believe it's because it's DLLLoader.cpp that loads it. It explicitly calls a path, which OSX may consider as an absolute path. Quote Link to comment Share on other sites More sharing options...
historic_bruno Posted November 2, 2012 Report Share Posted November 2, 2012 I believe it's because it's DLLLoader.cpp that loads it. It explicitly calls a path, which OSX may consider as an absolute path.Hmm but that still doesn't explain why it works for me and not you. I've made some local changes for OS X building, but I'm pretty sure the path for loading libraries is untouched for non-bundles: DllLoader.cpp (I'm testing by running a loose binary, not a bundle). I'd really like to get to the bottom of this annoying problem Quote Link to comment Share on other sites More sharing options...
MishFTW Posted November 3, 2012 Author Report Share Posted November 3, 2012 Okay this is what I got:Last login: Fri Nov 2 22:05:48 on ttys001iMac:~ Geek$ lsof -a -d cwd -c pyrogenesisCOMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAMEpyrogenes 2323 Geek cwd DIR 14,2 2210 381296 /Users/Geek Quote Link to comment Share on other sites More sharing options...
wraitii Posted November 3, 2012 Report Share Posted November 3, 2012 Output is basically the same for me. Quote Link to comment Share on other sites More sharing options...
historic_bruno Posted November 3, 2012 Report Share Posted November 3, 2012 Ah thanks! So the cwd isn't always binaries/system! I did some testing and noticed that if I open the game from Finder, the cwd is /Users/Ben, so indeed Atlas and Collada loading are broken (this problem doesn't occur on the official bundles because it uses an absolute path with the bundle's framework directory). 99.99% of the time I use terminal to run the game, and in that case the cwd is binaries/system, so it just happens to work by relying on dlopen's cwd path searching Wraitii's solution looks like it may be the least evil (another option would be setting the current directory), so I'll test it some more and commit to SVN, then merge it into my github osx-build branch. Quote Link to comment Share on other sites More sharing options...
wraitii Posted November 3, 2012 Report Share Posted November 3, 2012 Well, you should just assure that my fix won't break the bundled version. Quote Link to comment Share on other sites More sharing options...
historic_bruno Posted November 8, 2012 Report Share Posted November 8, 2012 It worked perfectly, so I committed a variation of your patch (r12834) Please test and see how it goes Quote Link to comment Share on other sites More sharing options...
MishFTW Posted November 8, 2012 Author Report Share Posted November 8, 2012 It worked perfectly, so I committed a variation of your patch (r12834) Please test and see how it goes It works. Now I don't have to make the change myself each time before I compile BTW my experiments with SVN are going nicely so I'll start building packages soon. Once the entire GitHub migration thing is sorted out... Quote Link to comment Share on other sites More sharing options...
wraitii Posted November 8, 2012 Report Share Posted November 8, 2012 Your fix seems clean and it looks like it's working for me (I build strictly non-bundled, though), so I'd say this one has been sorted out. Quote Link to comment Share on other sites More sharing options...
MishFTW Posted December 9, 2012 Author Report Share Posted December 9, 2012 Do I always have to run export CC=llvm-gcc-4.2 CXX=llvm-g++-4.2 before updating? Is there a way I can make this setting permanent? Quote Link to comment Share on other sites More sharing options...
historic_bruno Posted December 9, 2012 Report Share Posted December 9, 2012 You could make a script that contains that command, updates workspaces and builds the game. I think you could also add that line to ~/.bash_profile Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.