-
Notifications
You must be signed in to change notification settings - Fork 4.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
OS X: Nonexistant shared library search path when linking in a Bazel-generated shared object #3450
Comments
hlopko
added
category: rules > C++
P3
We're not considering working on this, but happy to review a PR. (No assignee)
type: bug
labels
Aug 1, 2017
This will likely start blocking TF's effort to build more modularly, and if so, will quickly become a priority for us. For now, since it appears to only affect Macs, we can continue working. |
I have a fix in the oven, will try to submit this week. |
And finally submitting. |
Great! |
The fix was too late for 0.5.4 so the one after that. |
bazel-io
pushed a commit
that referenced
this issue
Oct 11, 2017
In f426544 I updated osx_cc_wrapper to work correctly in case both precompiled .so and cc_library-made .so are linked into a single binary. This cl makes osx_cc_wrapper work also when a precompiled .dylib is provided. Fixes #3450 again for dylibs Fixes #407 One step closer to finishing #1576 RELNOTES: None. PiperOrigin-RevId: 171683650
bazel-io
pushed a commit
that referenced
this issue
Oct 11, 2017
*** Reason for rollback *** I broke http://ci.bazel.io/view/Dashboard/job/bazel-tests/1079/testReport/junit/(root)/(empty)/test_osx_cc_wrapper_rpaths_handling/ *** Original change description *** Fix osx_cc_wrapper to also update dylibs In f426544 I updated osx_cc_wrapper to work correctly in case both precompiled .so and cc_library-made .so are linked into a single binary. This cl makes osx_cc_wrapper work also when a precompiled .dylib is provided. Fixes #3450 again for dylibs Fixes #407 One step closer to finishing #1576 RELNOTES: None. PiperOrigin-RevId: 171806769
bazel-io
pushed a commit
that referenced
this issue
Oct 13, 2017
In f426544 I updated osx_cc_wrapper to work correctly in case both precompiled .so and cc_library-made .so are linked into a single binary. This cl makes osx_cc_wrapper work also when a precompiled .dylib is provided. This is roll-forward of 0257c29. Fixes #3450 again for dylibs Fixes #407 One step closer to finishing #1576 RELNOTES: None. PiperOrigin-RevId: 171969333
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description of the problem / feature request / question:
(Largely irrelevant background) I'm attempting to split out a shared object from TensorFlow that extensions (custom user ops) can rely on. This means TensorFlow itself will need to rely on the same shared object (so it can access the list of ops registered by custom op libraries), which looks like it will involve cc_binary rule with
linkshared=1
which gets re-used within TensorFlow (e.g. our Python extension _pywrap_tensorflow.so will depend on this cc_binary rule).I have a prototype which is working, although I've run into an OS X linking issue which means tests on that platform need to be built with
linkstatic=1
.If possible, provide a minimal example to reproduce the problem:
At https://github.com/allenlavoie/bazelrepro
The important bit (the source files are ~trivial):
This gets me output like:
Running
otool -L
on the binary:bazel-bin/_solib_darwin_x86_64/liblibregular_Udep.so
does exist, but the path above does not. Removing":libsome.so"
from thesrcs
of thelink_repro
means the test passes, andotool -L
on the binary returns:Which is the correct location for the
regular_dep
shared object, although the double slash is a bit suspicious.Environment info
macOS Sierra 10.12.5
bazel info release
):release 0.5.2
Have you found anything relevant by searching the web?
This may be the same underlying problem as #507 (similar symptoms, although the cause sounds different). Feel free to close as a duplicate if you think they're the same.
The text was updated successfully, but these errors were encountered: