Never-ending story: Mac and mobile
Dirk Hohndel
dirk at hohndel.org
Wed Dec 9 12:27:34 PST 2015
On Wed, Dec 09, 2015 at 12:16:58PM +0100, Robert Helling wrote:
> Hi,
>
> I wanted to report my experiences trying to build subsurface (-mobile) on my new Mac. Yesterday, I got this new Macbook Pro fresh from Apple and I had hoped that not carrying around old versions of stuff, I might be able to finally build the mobile version (as Dirk does without problems). Spoiler alert: I did not.
>
> So, before installing anything else, I got Xcode, cloned latest master, installed home-brew as in the INSTALL instructions, downloaded the latest Qt (takes forever). And then ran the build.sh script. I ran into the following problems:
>
> 1) It complained that it couldn’t find libssh2 (so I installed it from home-brew, maybe that should be listed in the install instructions as well).
>
> 2) When building marble, it complained about not being able to find some Qt components. So I had to set some path variables to ~/Qt/5.5/clang_64/lib/cmake/XXX (XXX being various stuff, too bad I closed that shell so cannot see the details anymore) But then it built.
>
> 3) The resulting binary complains
>
> dhcp-10-181-1-30:build Helling$ Subsurface.app/Contents/MacOS/Subsurface
> dyld: Library not loaded: @executable_path/lib/libssrfmarblewidget.21.dylib
> Referenced from: /Users/Helling/src/subsurface/build/Subsurface.app/Contents/MacOS/Subsurface
> Reason: image not found
> Trace/BPT trap: 5
>
> I have no idea what to do about this. But when I disable marble using ccmake, I get a binary that works (but of course does not show a map).
There are still some oddities when building on Mac.
You can see how I hack around them in packaging/macosx/make-package.sh
Tomaz appears to have power again, so I hope we'll get his cmake overhaul,
soon. Once we have that I'll break down and make sure that we have a fool
proof script that builds on both Mac and Linux. And that we have scripts
to cross build for Android and iOS.
Getting these scripts right is a major pain - but it is worth it in the
long run. I'm so glad that I got as far as I did with build.sh, frankly.
> 4) That was the desktop. But the real goal is the mobile version. So I turn it on in ccmake and… I can build a binary but it gives me the same error messages as on my other Macs:
>
> …
>
> And now comes the real surprise: I got the same error before. But to compose this mail, I switched back to desktop and then to mobile and built again. And now it works. I have the mobile version running! Yippee! But I have no idea what changed to before. Heisenbug.
And that's the most annoying part... if I knew what caused things to go
wrong I could try to fix them. But with Heisenbugs like this... I have no
idea what to do.
/D
More information about the subsurface
mailing list