bazel-out
is a symlink within a relative path -> need abspath. Current workaround:
'libraries': [
#HACK
"<!(python -c 'import os,sys; print os.path.realpath(sys.argv[1])' ../../../../tensorflow/bazel-bin/tensorflow/libtensorflow.so)"
],
Need to link in a way that dlopen can resolve, but dyld_library_path
is removed with SIP on El Capitan, so no way to have "sub open's" know about the path to the library.
Traceback:
Error: dlopen(/Users/peterbraden/repos/tensorflow/tensorflow/contrib/nodejs/build/Release/tensorflow.node, 1): Library not loaded: bazel-out/local_darwin-fastbuild/bin/tensorflow/libtensorflow.so
Referenced from: /Users/peterbraden/repos/tensorflow/tensorflow/contrib/nodejs/build/Release/tensorflow.node
Reason: image not found
Reference:
> otool -L ../../../bazel-bin/tensorflow/libtensorflow.so
../../../bazel-bin/tensorflow/libtensorflow.so:
bazel-out/local_darwin-fastbuild/bin/tensorflow/libtensorflow.so (compatibility version 0.0.0, current version 0.0.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1225.1.1)
/usr/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.5)
/usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 120.1.0)
SOLVED: Need to use bazel to build, which expects BUILD
filename, but node-gyp already squats on build
BUILD
filename, but node-gyp already squats on build
- See nodejs/node-gyp#263 (comment)
- Solved with PR: nodejs/node-gyp#919 - waiting on merge.