7

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!

Peyman Mohamadpour
  • 17,954
  • 24
  • 89
  • 100
Val
  • 71
  • 2

3 Answers3

4

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.

David Zwicker
  • 23,581
  • 6
  • 62
  • 77
2

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
1

This workaround based on Markus's answer worked for me on MeshLab v2016.12 on MacOS 10.13.3 (otherwise I got the error, ./meshlabserver: No such file or directory):

export DYLD_FRAMEWORK_PATH=/Applications/meshlab.app/Contents/Frameworks
/Applications/meshlab.app/Contents/MacOS/meshlabserver -i ...

I used absolute paths so that I could run this from any location and supply relative paths for input/output files.

yodavid
  • 184
  • 2
  • 7