Napkin fails to launch due to missing .dylib


#1

Heya,

I get the following startup issue when trying to launch Napkin.

Platform: OSX Mojave
Nap: 2.0 (from Stijn’s branch)

Console log:

Last login: Tue Jan 29 20:51:23 on ttys001
/Users/thecat/4dsound2/projects/aura/bin/Clang-x86_64-Debug/napkin ; exit;
thecat@MacBookProMarcel ~ $ /Users/thecat/4dsound2/projects/aura/bin/Clang-x86_64-Debug/napkin ; exit;
dyld: Library not loaded: @rpath/QtOpenGL.framework/Versions/5/QtOpenGL
Referenced from: /Users/thecat/4dsound2/projects/aura/bin/Clang-x86_64-Debug/napkin
Reason: image not found
Abort trap: 6
logout
Saving session…
…copying shared history…
…saving history…truncating history files…
…completed.

[Proces voltooid]


#2

Hey,

I can’t comment on anything that’s happening on someone else’s branch. Discuss this internally and lmk if the issue is there regarding the current package 0.2.2


#3

@stijnvanbeek Would be nice to resolve this. Is this specific to the version of Nap we use at 4D you think?


#4

Hey guys,
I just tested this by downloading the NAP release 0.2.2 from the website and building a few demos. I ran into the same problem with OSX High Sierra. So it seems there is something wrong with the napkin build for OSX that ships with the current NAP release. @chris do you have any ideas on this?


#5

Thanks for verifying this @stijnvanbeek. From what I know nothing changed regarding napkin for the newer versions of NAP, including the QT build that ships in thirdparty. @chris, if you find the time, can you take a look at this?


#6

OK yep, can do, will look into it


#7

Chris to the rescue!


#8

Note specifically it’s looking for “QtOpenGL.framework”.

If I had to guess… the new curve editor requires OpenGL to draw its graphics, OpenGL support (which is optional in Qt) got enabled, a new dependency got introduced, which isn’t included… et voila, Napkin fails to open on OSX.


#9

Exactly! (… or very close to it)


#10

@chris just resolved a lot of the problems regarding packaging on macOS mentioned before.

Problem: New projects are broken on all platforms (shows as missing includes)

  • Cause: Project template not updated after napapp restructure

Fix: Added to script that populates module list into template (commit be12ba3232421811bec83aabdc13c1d909e57c19)

Prevention: Test creating (and building/running) new projects against platform release (on 3x platforms) after build system changes

Problem: Missing QtOpenGL framework on macOS

  • Cause: QtOpenGL was added as a dependency to napkin via napqt (in qt/CMakeLists.txt) but wasn’t added to the rest of the packaging system

Fix: Added to the places you can see in commit (da5114fba439db2ad9d6304e2caedb29468cfc7c)

Prevention: Test napkin in packaged platform release and packaged apps (on 3x platforms) after changing Qt module requirements

So in this case the Qt version wasn’t the culprit. However I’m now using Qt v5.11.3 for everything this end.

Problem: FreeImage dylib not being found in some corner cases on macOS

  • Cause: Related to NAP-225 and combination of modules in use, likely napapp restructure was involved

Fix: Added fix to napcameracontrol/CMakeLists.txt ala other places (commit 15cb3daeeeb19d604458366adcdcfd189cd56702)

A new package including the fixes can be downloaded here: http://napframework.com/NAP-0.2.3-macOS.zip

Let me know how it works out.

Thanks @chris for the fixes!


#11

Thanks for the fixes. Do the prevention measures mean there’s now automated tests to run the apps to see if they run before pushing a new release? Or is it a manual procedure?

I tried adding QtOpenGL to 3rdparty/Qt/lib/ in our branch to see if that fixed the issue. It doesn’t; is there something else I should do? Perhaps replace the Napkin binary as well? I’m sort of stuck with the release we have in our Git repo right now until Stijn sees time to update it, so I’m hoping that with a few small changes I can make it work.


#12

We’re working on the automated test process, but as you know these validation systems aren’t made 123.

I can’t comment on anything regarding someone else’s branch. Try the package above, see if it fixes your issue. We only support Naivi build packages. Stijn has access to source, he can merge the changes.


#13

I just merged the PR that includes all the fixes into our master branch.


#14

Hrmm yeah unsure about an ad hoc solution like you’re after. Like Coen said, a new build incorporating the fixes is definitely the easiest way.

If you grab napkin, thirdparty/Qt and cmake/install_napkin_with_project.cmake from the new 0.2.3 package linked above and dump it into your framework build that might work.


#15

Thanks @chris, got it to work! :slight_smile: Also needed the fix to do find_package(freetype) once, but after that it worked.


#16

awesome! glad this is solved


#17

I agree it’s best just to update the whole deal, but Stijn is still busy with his multicore work and probably won’t get around to updating Nap until after I’m done setting structure for a new project. So something which can be realized short term was needed. :slight_smile:


#18

I completely understand @marcel, but we have to protect ourselves a little bit here. We want to make sure that NAP functions for the people using the package, but can’t guarantee fixes concerning other people’s branches. Having said that: of course we want to help, and I’m glad the problems mentioned above are resolved.

This entire Mojave bump has created more loose ends than expected, hopefully most are resolved now. We’re working on a package testing process, that helps guarantee that at least the demos and napkin start / stop correctly after a fresh build. I’m also looking into a daily build system, where successful builds are uploaded every time a validation scheme succeeds.


#19

Hi all,

I downloaded the latest v0.2.3 version but still encounter this problem on my computer (mac os Sierra v10.12.6).

If I open napkin in for example the HelloWorld app, I get the error:

dyld: Library not loaded: @rpath/libfreetype.6.dylib
Referenced from: /Users/casimirgeelhoed/Downloads/NAP-0.2.3-macOS/demos/helloworld/bin/Clang-x86_64-Debug/napkin
Reason: image not found


#20

Thanks for reporting this @casi,

@stijnvanbeek is currently looking into this together with @chris. Should be resolved soon.