Ticket #35106 (closed defect: fixed)
clang-3.1 @3.1_1 +analyzer Scripts use /opt/local/bin/perl5, but dependency is missing/wrong
|Reported by:||naesten@…||Owned by:||jeremyhu@…|
In particular, we have:
iMac:clang user$ port contents clang-3.1 | tail -n +2 | xargs grep '#!.*perl' Binary file /opt/local/libexec/llvm-3.1/bin/clang matches Binary file /opt/local/libexec/llvm-3.1/bin/clang++ matches /opt/local/libexec/llvm-3.1/bin/scan-build:#!/opt/local/bin/perl5 /opt/local/libexec/llvm-3.1/libexec/scan-build/c++-analyzer:#!/opt/local/bin/perl5 /opt/local/libexec/llvm-3.1/libexec/scan-build/ccc-analyzer:#!/opt/local/bin/perl5 /opt/local/libexec/llvm-3.1/libexec/scan-build/scan-build:#!/opt/local/bin/perl5
iMac:clang user$ port info --depends clang-3.1 depends_build: depends_run: port:clang_select, port:ld64, bin:python:python26, bin:perl:perl5 depends_fetch: depends_lib: port:llvm-3.1, port:libffi depends_extract:
Which, on my system, results in the likes of this:
iMac:clang user$ /opt/local/libexec/llvm-3.1/bin/scan-build /opt/local/libexec/llvm-3.1/bin/scan-build: /opt/local/bin/perl5: bad interpreter: No such file or directory
Since bin: dependencies refer to files anywhere along the a search path, they are not a terribly good fit for shabang lines that refer to binaries using absolute paths (rather than using /usr/bin/env to find them).
Hopefully, these scripts are simple enough that they could simply have their shabang lines changed to #!/usr/bin/perl; it would be a bit of a pain to have to install perl from macports just for them...