Opened 6 years ago
Closed 5 years ago
#57152 closed defect (fixed)
clang: asan does not work
Reported by: | akimd (Akim Demaille) | Owned by: | jeremyhu (Jeremy Huddleston Sequoia) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.5.3 |
Keywords: | Cc: | larryv (Lawrence Velázquez), mouse07410 (Mouse) | |
Port: | clang-devel clang-6.0 clang-7.0 clang-8.0 |
Description
Hi!
$ cat foo.cc int main() { return 0; } $ clang++-mp-devel foo.cc $ ./a.out $ clang++-mp-devel foo.cc -fsanitize=address $ ./a.out dyld: Library not loaded: /opt/local/libexec/llvm-devel/lib/libclang_rt.asan_osx_dynamic.dylib Referenced from: /private/tmp/./a.out Reason: image not found zsh: abort ./a.out
I don't remember when asan worked properly in MacPorts, I think I've always had to add symlinks to work around this. Unfortunately, only one compiler can be fixed at a time this way.
Cheers!
Change History (13)
comment:1 Changed 6 years ago by mf2k (Frank Schima)
Cc: | jeremyhu removed |
---|---|
Owner: | set to jeremyhu |
Status: | new → assigned |
comment:2 Changed 6 years ago by kencu (Ken)
comment:4 Changed 5 years ago by kencu (Ken)
Port: | clang-8.0 added |
---|
comment:5 Changed 5 years ago by kencu (Ken)
Cc: | mouse07410 added |
---|
comment:6 Changed 5 years ago by mouse07410 (Mouse)
Yes it is the same problem as in #58813. Either clang does not set rpath properly at linking, or Macports misplaces the libraries during installation.
Since it's been 10 months since this problem was discovered (and it's likely that a simple fix exists), when could we expect any progress?
comment:8 Changed 5 years ago by mouse07410 (Mouse)
Thanks! But, Ken, in that ticket you seemed to have found a solution? Is it applicable to here and now?
comment:9 Changed 5 years ago by kencu (Ken)
yes, I fixed this once before....presumably the re-fix will be similar...
comment:10 Changed 5 years ago by kencu (Ken)
OK. fixed again. just setting up all the different clangs that need the fix...
comment:11 Changed 5 years ago by kencu (Ken)
this commit changed things just enough to break the previous fix. Readjusting...
comment:12 Changed 5 years ago by kencu (Ken)
For anyone impatient to fix this, you can try out this PR which I believe is going to be the final fix for this, in the end.
comment:13 Changed 5 years ago by ken-cunningham-webuse
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
We have adjusted the rpaths for an issue like this before. Clearly still needs some tweaking. Thanks.
It's looking here:
But the library is really here:
Here's full output from the build/link line: