sccn / liblsl

C++ lsl library for multi-modal time-synched data transmission over the local network
Other
115 stars 67 forks source link

Fix MacOS Qt deployment #61

Closed tstenner closed 4 years ago

tstenner commented 4 years ago

Calculate the MacOS bundle path only once, copy liblsl for Qt-apps, fix the macdeployqt call and show the output in case of an error.

cboulay commented 4 years ago

Without -DLSL_BUILD_EXAMPLES=ON then configure, make, and install all complete successfully.

I used -DLSL_BUILD_STATIC=ON -DLSL_UNITTESTS=ON -DLSL_UNIXFOLDERS=ON. lslver fails but the other tests work. See the failure below.

After make install,

build $cd install
install $cd bin
bin $ls
lsl_test_exported   lsl_test_internal   lslver
bin $./lsl_test_internal
liblsl version: git:1.13.0-52-g1075f5b4/branch:tstenner-macdeploy/build:/compiler:AppleClang-10.0.1.10010046/boost:
2020-02-27 10:14:26.377 (   0.413s) [          16DF8F]   stream_info_impl.cpp:239   WARN| Query error: Incorrect query
===============================================================================
All tests passed (25 assertions in 6 test cases)

bin $./lsl_test_exported
liblsl version: git:1.13.0-52-g1075f5b4/branch:tstenner-macdeploy/build:/compiler:AppleClang-10.0.1.10010046/boost:
2020-02-27 10:14:47.446 (   5.708s) [main thread     ]   inlet_connection.cpp:54    WARN| The stream named 'timesync' can't be recovered automatically if its provider crashes because it doesn't have a unique source ID
2020-02-27 10:14:54.860 (  13.122s) [main thread     ]   inlet_connection.cpp:54    WARN| The stream named 'movetest' can't be recovered automatically if its provider crashes because it doesn't have a unique source ID
2020-02-27 10:14:57.883 (  16.145s) [main thread     ]   inlet_connection.cpp:54    WARN| The stream named 'TypeConversion' can't be recovered automatically if its provider crashes because it doesn't have a unique source ID
===============================================================================
All tests passed (294 assertions in 14 test cases)

bin $./lslver
dyld: Library not loaded: @rpath/liblsl.1.14.0.dylib
  Referenced from: /Volumes/STORE/Tools/Neurophys/labstreaminglayer/LSL/liblsl/build/install/bin/./lslver
  Reason: image not found
Abort trap: 6
tstenner commented 4 years ago

I've put the rpath handling into installLSLApp and changed the main CMakeLists to install lslver via installLSLApp, so now it works (at least for me)