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

[macOS Beta] Build: Fails to build with openMP error #702

Closed
shinra-electric opened this issue Jul 30, 2024 · 9 comments
Closed

[macOS Beta] Build: Fails to build with openMP error #702

shinra-electric opened this issue Jul 30, 2024 · 9 comments

Comments

@shinra-electric
Copy link
Contributor

I tried to compile Stratagus today, and encountered a build error:

c++: error: unknown argument: '-Xclang -fopenmp'

I should note that I'm on the macOS 15 public beta and Xcode 16 beta 4, as it may be relevant.
However the last time I successfully built was on the 14th of July (on a previous beta) so it may not be the issue.

Here is the full log:

Terminal Saved Output.txt

@Jarod42
Copy link
Member

Jarod42 commented Jul 31, 2024

Turning CMake option WITH_OPENMP OFF would help (cmake -DWITH_OPENMP=OFF [..])
Not sure if it is sufficient.
Tried to create macos CI , but it currently fails (libpng issue :/ ) before your issue :-/
I don't have MacOS, so using CI for experiment is not ideal.
If you can share the list of your pre-installed dependencies

@shinra-electric
Copy link
Contributor Author

shinra-electric commented Jul 31, 2024

Turning CMake option WITH_OPENMP OFF would help (cmake -DWITH_OPENMP=OFF [..]) Not sure if it is sufficient.

That helps the build to complete, however it fails to launch with an error message about missing data. My data folders are in ~/Library/Application Support/stratagus and my build of War1gus from a few weeks ago still opens so it's not a data issue (unless extraction has changed recently).

Tried to create macos CI , but it currently fails (libpng issue :/ ) before your issue :-/ I don't have MacOS, so using CI for experiment is not ideal. If you can share the list of your pre-installed dependencies

My installed homebrew libraries are:
cmake dylibbundler sdl2 sdl2_mixer sdl2_image lua libpng ffmpeg meson ninja
I don't see OpenMP on homebrew...

I you want to have a look at my build script, I have it here.

Edit: My script gives the user an option to build all three games, that's why ninja etc are there

@Jarod42
Copy link
Member

Jarod42 commented Jul 31, 2024

Does stratagus --help work?
Which flags do you provide to stratagus (-d datadir)? Which is the output of log (possibly stderr.txt stdout.txt)?

data by itself didn't change, script might (I don't think there was a change since several weeks for war1gus though)

@shinra-electric
Copy link
Contributor Author

Which flags do you provide to stratagus (-d datadir)?

I didn't provide any datadir flags. On macOS it automatically looks in Application Support (see #435). (I build an application bundle, so I usually don't run from Terminal).

Which is the output of log (possibly stderr.txt stdout.txt)?

A log wasn't saved, but here is the terminal output:
Terminal Saved Output.txt
I noted that it's referencing files in the stratagus source folder. However, the source folder is deleted by my script after the app bundle is created.
(This seems to be the same behaviour as issue 438, where wartool references the source folders).
I tried leaving the stratagus source folder intact, but it still crashed the same way.

Here is a terminal log from my previous working build for your reference:
Terminal Saved Output(working).txt

Here are the error dialogs:

Screenshot 2024-07-31 at 17 36 22 Screenshot 2024-07-31 at 17 36 53

@Jarod42
Copy link
Member

Jarod42 commented Jul 31, 2024

"Unsupported key: Iterations" That is indeed a recent change :-)
Overwrite script directory ("data.War1gus\scripts") with a recent one (or do a full extraction).
Error message is confusing when error is due to version mismatch :-/

@shinra-electric
Copy link
Contributor Author

"Unsupported key: Iterations" That is indeed a recent change :-)
Overwrite script directory ("data.War1gus\scripts") with a recent one (or do a full extraction).

I tried building again and re-extracted the game data.

Here is the terminal output:
Terminal Saved Output.txt

Again, it's referencing files in the source folder that no longer exists.

@Jarod42
Copy link
Member

Jarod42 commented Jul 31, 2024

LoadMusic: Can't load the music 'music/23.mid'
GetFileContent: Can't open file 'campaigns/orc/01_prerun.lua': No such file or directory

Not critical
(and maybe some of them are "normal")

double free for ptr 0x1483b8000

Critical, and probably my fault with my recent changes in the engine.
Investigating.

@Jarod42
Copy link
Member

Jarod42 commented Aug 1, 2024

#705 should fix the crashing issue (I didn't use the DYNAMIC_LOADING option, so I miss it)

@shinra-electric
Copy link
Contributor Author

Both Wargus and War1gus are working again now, thanks.

I still get a crash on exit with War1gus, but I think that's a different issue so I'll close this one.

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

No branches or pull requests

2 participants