FreeOrion

Forums for the FreeOrion project
It is currently Thu Nov 23, 2017 5:22 am

All times are UTC




Post new topic Reply to topic  [ 4 posts ] 
Author Message
PostPosted: Tue May 23, 2017 3:20 am 
Offline
Dyson Forest
User avatar

Joined: Sun Jun 08, 2014 1:18 am
Posts: 214
This is for people (like me) who are running the game on a Mac.

I am suggesting that we switch the SDK and FO from the current 32-bit builds (i386) to 64 bits (x86_64).
I've been tinkering around with both github repositories (for other reasons), and am willing to make the necessary pull requests for this transition, if people agree with it.

EDIT: I should have mentioned... The libraries have to be rebuilt anways, to make the compiler flag visibility=hidden consistent for all the software. As long as the recompile needs to be done, this is an opportunity to also deal with anything else we'd like to change for the Mac OSX build libraries.

With the latest release, the project is supporting from OSX 10.9 onwards, which is well after the transition to 64 bit machines and OS. We might want to keep a copy of the current (i386) Mac SDK around, in case of emergency. But otherwise, have the SDK build x86 libraries, and then use those libraries for the game build.

Assuming I've done things correctly, I haven't noticed any problems with my test build, which started with the Github SDK source code. The game seems normal through 100 turns so far.

The limitations right now (at least on the Mac side) are that universal 32 & 64 bit builds won't work.
(There is some discussion here https://github.com/freeorion/freeorion-sdk/pull/21 )
The major culprit is libpng. After spending time getting the internal CMake files to handle 2 architectures, the compiler complains: clang: error: cannot use 'cpp-output' output with multiple -arch options
And python is giving me headaches too.
It will be a Pain In The Ass to get everything working for a universal build.
Much simpler to stick with one architecture (but make that arch x86_64).


Top
 Profile  
 
PostPosted: Tue May 23, 2017 5:05 pm 
Offline
Release Manager, Design
User avatar

Joined: Wed Nov 16, 2011 12:56 pm
Posts: 4243
Location: Sol III
I'm very much for doing this change, as OSX has been 64bit since 10.6. The only reason why I didn't do it myself already was because I failed to build all dependencies for 64bit (IIRC Python being the biggest pain here), and then Marcel mentioned the issues with libpng. As I found myself out of my depth solving these issues, I more or less have been waiting for someone more knowledgeable to deal with this.

So if you want to give it a try, by all means, be my guest.

Wrt to universal binaries, I don't see a point in trying to support the i386 architecture. What for? We deprecated support for OSX versions prior to 10.9, so supporting x86_64 only should be sufficient. No point in making things needlessly complicated.


Top
 Profile  
 
PostPosted: Tue May 23, 2017 6:16 pm 
Offline
Dyson Forest
User avatar

Joined: Sun Jun 08, 2014 1:18 am
Posts: 214
What is holding me up currently is using "-fvisibility=hidden" for the SDK.
When I use those built libraries for the FO clients, I get linking errors all over the place from missing Boost symbols.
(It might be a problem with how the FO code uses Boost, if it is calling now-hidden functions, but I need to investigate more.)

I'm trying to figure out exactly what set of compile/linking options we want for both builds.
(There are some in the SDK that should probably be used with the FO build but aren't, and vice versa.)
If anyone has confidence in their answers, I'd be glad for the suggestions.

For example (all specific for the Mac build):
- Do we want "-fvisibility-inlines-hidden", since that normally goes with "-fvisibility=hidden"?
- There was an error/typo with CMake using BOOST_ALL_NO_LINK (doesn't exist) when it should have been BOOST_ALL_NO_LIB. Do we want any other Boost config-options?
- Is the only reason for "-undefined dynamic_lookup" so that the compiler doesn't look for other Frameworks installed on the system? (There might be another way to solve that.) Should we also use BOOST_ALL_STATIC_LINK?


Top
 Profile  
 
PostPosted: Thu May 25, 2017 9:27 pm 
Offline
Dyson Forest
User avatar

Joined: Sun Jun 08, 2014 1:18 am
Posts: 214
The PR for the Mac SDK has been submitted.
https://github.com/freeorion/freeorion-sdk/pull/29

The PR for the FO has also been submitted, but that will need to be synchronized with the SDK commit.
https://github.com/freeorion/freeorion/pull/1585

At least on my home machine, I was able to successfully make the FO game with the new 64-bit libraries, and it appears to run normally.
I used CMake for the SDK, and Xcode for the FO build.
(Getting the Boost libraries straightened out for the SDK also resulted in fewer "warnings" for the FO build.)


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group