-
-
Notifications
You must be signed in to change notification settings - Fork 220
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
Compiling with -install_path
and -rpath
flags containing @
macros fails
#135
Comments
For your reference, the flag is added by Ruby's Although the Sorbet's custom build does the same process, integrating it with Bazel. Here is where configure is invoked and install_name is set and the build fails immediately after when compiling (because In respect to your concerns, I'll need to do more research to be of more help. But I can confirm that changing the for i in "$@"; do
parse_option "$i"
done |
Whoops my bad, I wasn't expecting you to try to find the answers to those questions; just thinking out loud.
Got it, thanks. |
Note I believe this case should be fixed once bazelbuild/bazel#13148 lands |
Thank you. And thanks for bumping that PR/writing bazelbuild/bazel#14650. |
I think the referenced bazel fixes are in bazel 6.0.0 but I'm still seeing failures when using @rrbutani's test case from the gist. And I stumbled upon this because I saw failures in a real part of my build, not that test case. Any idea what's needed? |
This may be resolved now with the new wrapper scripts. Can someone please try it and close this issue? |
Closing now, but can reopen if someone says something. |
Please reopen. Just tried 1.2.0, still having this issue with |
H/t to @vinistock for finding this issue.
The below is mostly copied from #88; the issue is essentially that we're parsing
-install_path @executable_path/...
and similar flags as param files, incorrectly.Extending the logic in the macOS wrapper to skip processing args starting with
@
(like@execution_path/...
,@executable_path/...
,@load_path/..
,@rpath/...
, etc.) when the preceeding arg is-install_name
or-rpath
is the obvious fix, I think.I have a few concerns though:
-install_name
and-rpath
the only args that accept@
macro form args? might be worth checking theclang
arg parsing source to be sure@
macros that are acceptable; passing in@some_random_thing
will compile successfully. grepping throughdyld
source and peering through thedyld
man pages does indicate that it's really just@rpath
,@executable_path
, and@loader_path
though. (@execution_path
seems to be just a typo that a few people independently made over the years)-install_name
and-rpath
?-install_name
but what about-rpath
? Don't we have the same issues as with-Wl,-rpath
?-rpath
certainly does seem to just expand out into-rpath
to the linker, experimentally. Are we just banking on users always using the not-macOS-specific-Wl
form?-rpath @loader_path/...
to$RPATHS
too; this misses-Xlinker -rpath -Xlinker @loader_path/...
but I think that's okay for now.@loader_path
?dylib
being loaded was found at at link time it makes sense that this doesn't match up with the runtime search path, for Bazel. if you don't think about it too hard.The text was updated successfully, but these errors were encountered: