Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Meshlabserver on MacOS won't work

Tags:

meshlab

I'm trying to use Meshlab to batch process OBJ files (quadric edge decimation, save out a smaller file). But every time I try to launch Meshlabserver through Terminal I get an error:

dyld: Library not loaded: @path/QtOpenGL.framework/Versions/5/QtOpenGL Referenced from: /Applications/meshlab.app/Contents/MacOS/meshlabserver Reason: image not found Trace/BPT trap: 5

I did some research, and it looks like a couple of years ago (2012/2013) there was a bug in Meshlab where it was compiled to look for Qt libraries in the wrong location. However, I am on the newest version of Meshlab (2016.12), and I'm still getting this error.

Can anybody help? Full disclosure: I am an extremely amateur coder. Thanks in advance!

like image 742
Val Avatar asked Feb 24 '17 13:02

Val


2 Answers

This seems to be a bug in meshlab, which is already tracked in their bug tracker. In this thread they also propose a temporary work-around. Running the following commands should get meshlab to work:

cd /Applications/meshlab.app/Contents/MacOS
install_name_tool -add_rpath "@executable_path/../Frameworks" meshlabserver

As far as I understand, this command needs to be run once, after which starting meshlabserver works without problems.

like image 159
David Zwicker Avatar answered Sep 20 '22 18:09

David Zwicker


This works for me on OsX 10.12.6 with meshlabserver v2016.10 (and the same error)

$ cd /Applications/meshlab.app/Contents/MacOS;
$ export DYLD_FRAMEWORK_PATH=../Frameworks;
$ ./meshlabserver
like image 44
Markus Maresch Avatar answered Sep 24 '22 18:09

Markus Maresch