memo / ofxMSATensorFlow

C++ openframeworks addon and examples integrating Google's TensorFlow numerical computation and machine learning library
Apache License 2.0
456 stars 87 forks source link

macOS libtensorflow_cc.so has bad id #14

Closed bangnoise closed 7 years ago

bangnoise commented 7 years ago

The macOS libtensorflow 1.0 you provide has a machine-specific id

$ otool -L libs/tensorflow/lib/osx/libtensorflow_cc.so
libs/tensorflow/lib/osx/libtensorflow_cc.so:
    bazel-out/local-opt/bin/tensorflow/libtensorflow_cc.so (compatibility version 0.0.0, current version 0.0.0)

is cured by

install_name_tool -id libtensorflow_cc.so libs/tensorflow/lib/osx/libtensorflow_cc.so
memo commented 7 years ago

oh I didn't know that, thanks! I'm not near a mac today. Do you have a URL to a cleaned lib? I can add it to the releases straight away.

bangnoise commented 7 years ago

libtensorflow_cc.so.zip

This has the id libtensorflow_cc.so - you could also set it to @rpath/libtensorflow_cc.so and then have addon_config.mk do

osx:
    ADDON_LDFLAGS = -rpath @loader_path/../../../../../../../addons/ofxMSATensorFlow/libs/tensorflow/lib/osx

to locate it when applications are run from their usual positions (works in OF/addons and OF/apps)

memo commented 7 years ago

thanks. I've added the zip to the releases.

That's a lot of ../.. ! :) Send a pull request with it if you want.