zkmkarlsruhe / ofxTensorFlow2

TensorFlow 2 AI/ML library wrapper for openFrameworks
Other
113 stars 17 forks source link

error: Library not loaded #36

Closed stephanschulz closed 1 year ago

stephanschulz commented 1 year ago

I am on macOS 12.6.3 with OF of_v20220530_osx_release on an M1.

I cloned the repo. Had trouble with the submodules so downloaded the cpp stuff manually. Then ran these scripts ./scripts/download_tensorflow.sh ./scripts/download_example_models.sh which placed things where they belong.

Then used PG on example_yolo_v4 Closed Xcode project. Ran scripts/configure_xcode.sh example_yolo_v4 And then get the below error.

Would anyone know why? Thx a bunch.

dyld[66435]: Library not loaded: '@rpath/libtensorflow_framework.2.dylib'
  Referenced from: '/Applications/of_v20220530_osx_release/addons/ofxTensorFlow2/example_yolo_v4/bin/example_yolo_v4.app/Contents/MacOS/example_yolo_v4'

  Reason: tried: '/Applications/of_v20220530_osx_release/addons/ofxTensorFlow2/example_yolo_v4/bin/libtensorflow_framework.2.dylib' (no such file), 
  '/usr/lib/system/introspection/libtensorflow_framework.2.dylib' (no such file), 
  '/usr/local/lib/libtensorflow_framework.2.dylib' (no such file), 
  '/usr/lib/libtensorflow_framework.2.dylib' (no such file)

Screen Shot 2023-02-23 at 4 50 41 PM

danomatika commented 1 year ago

Double check that the copy libs script is being called in the second Run Script build phase. I fixed an issue with the configure_xcode.sh script this morning, so make sure you are using the latest master.

enohp ym morf tnes

Dan Wilcox danomatika.com robotcowboy.com

On Feb 23, 2023, at 10:56 PM, Stephan Schulz @.***> wrote:

 I am on macOS 12.6.3 with OF of_v20220530_osx_release on an M1.

I cloned the repo. Had trouble with the submodules so downloaded the cpp stuff manually. Then ran these scripts ./scripts/download_tensorflow.sh ./scripts/download_example_models.sh which placed things where they belong.

Then used PG on example_yolo_v4 Closed Xcode project. Ran scripts/configure_xcode.sh example_yolo_v4 And then get the below error.

Would anyone know why? Thx a bunch.

dyld[66435]: Library not loaded: @.***/libtensorflow_framework.2.dylib' Referenced from: '/Applications/of_v20220530_osx_release/addons/ofxTensorFlow2/example_yolo_v4/bin/example_yolo_v4.app/Contents/MacOS/example_yolo_v4' Reason: tried: '/Applications/of_v20220530_osx_release/addons/ofxTensorFlow2/example_yolo_v4/bin/libtensorflow_framework.2.dylib' (no such file), '/usr/lib/system/introspection/libtensorflow_framework.2.dylib' (no such file), '/usr/local/lib/libtensorflow_framework.2.dylib' (no such file), '/usr/lib/libtensorflow_framework.2.dylib' (no such file)

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you are subscribed to this thread.

stephanschulz commented 1 year ago

in the version of the nightly build OF the second run script looks different than in OF 11.2 which does have the "final echo" while my version does not. Not sure if that matters. ![Screen Shot 2023-02-23 at 6 41 27 PM](https://user-images.githubusercontent.com/1054816/221056698-2193f7a9-1519-4de7-b42a-9dd861

Seems like the lib stuff did get copied in to the apps Contents folder

Screen Shot 2023-02-23 at 6 45 44 PM 5aefcd.jpg)

danomatika commented 1 year ago

That should work. Note: we don't test with OF nightly builds, only the current release.

stephanschulz commented 1 year ago

a clean and then build did the trip. thanks for all you do.

danomatika commented 1 year ago

Ah yes, I forgot to suggest doing a clean and (re)build. Xcode tries to avoid re-copying files when it thinks they haven't changed, so sometimes it will miss something, ie. when you change a resource file, etc.