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
cmd/go: working dir for link changed between Go 1.0.3 and Go 1.1 #5319
Labels
Milestone
Comments
I actually missed the cd commands but the symptom is similar. A self-contained bash-script to demonstrate the problem is attached. Attachments:
|
the problem is that we never supported put a relative path reference to an object file in CGO_LDFLAGS. Because when the package is actually used, the relative path is guaranteed to be incorrect. if you change p.go to actually invoke C.F() and p_test.go to actually invoke F(), you will see go 1.0.3 couldn't handle this either. |
I understand but my example was a bit contrived. I my real case I link to a shared library. An updated version of the script attached. Note that it's written for osx. In order to run it on linux "gcc -dynamiclib" must be replaced with "gcc -shared" and "export DYLD_LIBRARY_PATH=..." with "export LD_LIBRARY_PATH=..." Is relative library paths supported in go 1.x? Attachments:
|
Status changed to Duplicate. Merged into issue #5428. |
This issue was closed.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
by cgmurray:
The text was updated successfully, but these errors were encountered: