Solarus Forum

Solarus => Bugs & Feature requests => Topic started by: Zappa on June 28, 2017, 04:10:06 pm

Title: Building on Mac OS Sierra
Post by: Zappa on June 28, 2017, 04:10:06 pm
Hi!

I'm new here and to using Solarus in general.  It is a really cool project!  I'm doing a PhD on generative music for games and the combination of open source C++ and lua scripting makes it ideal for testing my algorithms in a real game environment.

I'm having problems building Solarus on my mac though.  I've followed the instructions to build it and get a compile without errors, however whenever I try to run solarus-run it crashes with a seg fault 11 error.  I've tried g++ and clang and uninstalled and reinstalled all dependancies to make sure everything is up to date.

I'm wondering if other people are having troubles getting a clean build to run on Sierra, or if it is just something I have set up incorrectly.  Any help would be greatly appreciated.

I'm happy to share any generative-soundtrack experiments on here too once I get things going - it might be something other quest makers are interested in using.
Title: Re: Building on Mac OS Sierra
Post by: Neovyse on June 28, 2017, 08:28:24 pm
vlag  (http://forum.solarus-games.org/index.php?action=profile;u=64)is the person you need  :)
Title: Re: Building on Mac OS Sierra
Post by: Zappa on July 03, 2017, 07:34:32 am
Just an update that may be of some help to others:

Making a debug build results in the following errors:
"shifting a negative signed value is undefined" in SPC_CPU.h and SNES_SPC.cpp

These errors are ignored in release builds.

I've tried building 1.5.2, 1.5.3 and the dev 1.6 branches using LUAJIT and vanilla Lua 5.1 and all have the same result:
Release builds are making just fine but trying to open any quest with solarus-run results in a seg fault crash after the solarus logo appears.

I'll update if I ever get a fresh build of solarus to run on a mac.
Title: Re: Building on Mac OS Sierra
Post by: Zappa on July 03, 2017, 11:24:48 am
OK I got it working.

In Video.cpp, changing line 131 from:
pixel_format = SDL_AllocFormat(renderer_info.texture_formats);
to:
pixel_format = SDL_AllocFormat(SDL_PIXELFORMAT_ABGR8888);

I've only checked with 1.5.3 using Lua 5.1 so far.  Hope this helps others trying to build on Mac.