Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Mac builds #318

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

Fix Mac builds #318

wants to merge 4 commits into from

Conversation

JensAyton
Copy link
Member

These are the changes required to build with Xcode 10, which will bring back nightly builds. It also updates various project files, breaking compatibility with older versions of Xcode.

Done as a PR because merging this will drop support for Mac OS X 10.6 (the 2009–2010 version).

@KonstantinosSykas
Copy link
Contributor

KonstantinosSykas commented Jan 14, 2019

Merging this PR will most probably leave macOS out of future releases, until another maintainer with Xcode10 enabled environment joins the team.
EDIT 2019-01-15 11:50 EET (GMT +02:00): Xcode 10 requires a Mac running macOS 10.13.6 or later.

For the time being, Travis CI compiling AI.m and OOTrumble.m fails, complaining about OOViewID.tbl file not found.
Could it be the version of Xcode used by Travis CI?

Our .travis.yml file tells Travis CI to use Xcode 7.3 and my understanding is that this PR's changes break compatibility with Xcode versions less than 10.

language: objective-c
osx_image: xcode7.3

xcode_project: Oolite.xcodeproj
xcode_scheme: 'Oolite - Test Release'

Could you update this PR with a .travis.yml having a compatible (with the changes committed) osx_image value?
For the list of valid osx_image values you may check the relevant Travis CI reference page here.

@phkb
Copy link
Contributor

phkb commented Jan 20, 2019

Not sure why the HeadUpDisplay.m and OOConstToJSString.m files have been included in this PR. They seem to be removing things that are unrelated to any Mac-specific code. Accidental, perhaps?

@KonstantinosSykas
Copy link
Contributor

@phkb
Both fixes deal with compilation warnings on Mac. In Linux and Windows, these warnings did not appear due to different compiler options used.

@phkb
Copy link
Contributor

phkb commented Jan 21, 2019

Ah, got it. It's still a little confusing, though, because there doesn't appear to be any difference between the lines being removed and similar ones around them. For instance, why would the Mac have a problem with lines 119-123 of OOConstToJSString.m, when they're almost identical to lines 114-117? Why do those lines compile, but lines 119-123 don't?

It's also probably worth noting that, by applying the changes to OOConstToJSString.m, commit 835770b would probably need to be reverted as that change relies on the new table.

@maikschulz
Copy link

maikschulz commented Aug 20, 2022

These are the changes required to build with Xcode 10, which will bring back nightly builds. It also updates various project files, breaking compatibility with older versions of Xcode.

Done as a PR because merging this will drop support for Mac OS X 10.6 (the 2009–2010 version).

I just tried on a freshly setup Xcode 13.4.1 on MacOS 12.5.1 on a MacBook Air with M1:

the libstdc++ errors are fixed, but now the libpng build fails with the messages "error: Build input file cannot be found: '/Users/maikschulz/Documents/projects/oolite/deps/libpng/pngwutil.c' (in target 'libpng' from project 'libpng')", and "error: Build input file cannot be found: '/Users/maikschulz/Documents/projects/oolite/deps/libpng/pngwtran.c' (in target 'libpng' from project 'libpng')"

Not sure why Xcode complains about those files, both are there...

Edit: fixed, the errors disappeared after I made this change: HEADER_SEARCH_PATHS_QUOTED_1 in the "user-defined" section of the Build Settings for the libpng project should read "$(SRCROOT)" without the additional path behind it

Now it is trying to run "PhaseScriptExecution" for libjs which looks for the python command which does not exist anymore... I do have python3 available.

Edit: fixed, I installed the final Python 2 release for MaxOS 64 bit from https://www.python.org/downloads/macos/ even though it is not supported anymore...

Next it complained about the "volatile" keyword after "asm" in libs/js/methodjit/MethodJIT.c in a number of places. I removed it to go on, but I do not know if that will cause trouble.

Compilation finished with these changes, now I am getting an error during linking which I have no idea what to do about it: "ld: malformed universal file: slice content is not mach-o or a static library file '/Users/maikschulz/Documents/projects/oolite/deps/Cocoa-deps/Sparkle/Sparkle.framework/Sparkle'"

Edit: first tried to work with Sparkle 1.7 (instead of the included Sparkle 1.5b6), no luck or my poor understanding of what I am doing. Then I kicked out Sparkle from Oolite, this allowed to compile and link. Running it gets me as far as the splash screen, then it errors out, see the Trunk nightly builds thread on the Oolite BB here with others' descriptions of the same result but no one able to resolve since January 2022...

From the sound of it a larger effort is needed, or deeper understanding. Would be lovely if you could take a look :)

Thank you, kind regards
-Maik

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants