[MacPorts] #51754: Clang 3.9 can't link a C++ program
#51754: Clang 3.9 can't link a C++ program --------------------------------+-------------------------------- Reporter: noloader@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.4 Keywords: "clang-3.9" "link" | Port: --------------------------------+-------------------------------- {{{ $ cat test.cxx #include <iostream> #include <algorithm> int main(int argc, char* argv[]) { std::for_each(argv, argv+argc, [](char* str) {std::cout << str << std::endl;}); return 0; } }}} And {{{ $ /opt/local/bin/clang-mp-3.9 -std=c++11 test.cxx -o test.exe dyld: Library not loaded: @rpath/libLLVM.dylib Referenced from: /opt/local/libexec/llvm-3.9/lib/libLTO.dylib Reason: image not found clang: error: unable to execute command: Trace/BPT trap: 5 clang: error: linker command failed due to signal (use -v to see invocation) }}} This appears to be related: https://trac.macports.org/ticket/50853 -- Ticket URL: <https://trac.macports.org/ticket/51754> MacPorts <https://www.macports.org/> Ports system for OS X
#51754: Clang 3.9 can't link a C++ program -------------------------+-------------------------------- Reporter: noloader@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.4 Resolution: | Keywords: "clang-3.9" "link" Port: | -------------------------+-------------------------------- Comment (by kenneth.f.cunningham@…): This issue seems similar to the one I reported last month <https://trac.macports.org/ticket/51542> and so you might try the solution I found: {{{ sudo install_name_tool -add_rpath @loader_path/ /opt/local/libexec/llvm-3.9/bin/../lib/libLTO.dylib }}} Whether this was needed seemed to depend on the exact version of MacOSX used; I needed it for Snow Leopard, but not for El Cap. I didn't try the OS versions between those two. There is more info in that previous bug report that you might find helpful. -- Ticket URL: <https://trac.macports.org/ticket/51754#comment:1> MacPorts <https://www.macports.org/> Ports system for OS X
#51754: clang-3.9: dyld: Library not loaded: @rpath/libLLVM.dylib -------------------------+------------------------ Reporter: noloader@… | Owner: jeremyhu@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.4 Resolution: | Keywords: Port: clang-3.9 | -------------------------+------------------------ Changes (by ryandesign@…): * keywords: "clang-3.9" "link" => * owner: macports-tickets@… => jeremyhu@… * port: => clang-3.9 Old description:
{{{ $ cat test.cxx #include <iostream> #include <algorithm>
int main(int argc, char* argv[]) { std::for_each(argv, argv+argc, [](char* str) {std::cout << str << std::endl;});
return 0; } }}}
And
{{{ $ /opt/local/bin/clang-mp-3.9 -std=c++11 test.cxx -o test.exe dyld: Library not loaded: @rpath/libLLVM.dylib Referenced from: /opt/local/libexec/llvm-3.9/lib/libLTO.dylib Reason: image not found clang: error: unable to execute command: Trace/BPT trap: 5 clang: error: linker command failed due to signal (use -v to see invocation) }}}
This appears to be related: https://trac.macports.org/ticket/50853
New description: {{{ $ cat test.cxx #include <iostream> #include <algorithm> int main(int argc, char* argv[]) { std::for_each(argv, argv+argc, [](char* str) {std::cout << str << std::endl;}); return 0; } }}} And {{{ $ /opt/local/bin/clang-mp-3.9 -std=c++11 test.cxx -o test.exe dyld: Library not loaded: @rpath/libLLVM.dylib Referenced from: /opt/local/libexec/llvm-3.9/lib/libLTO.dylib Reason: image not found clang: error: unable to execute command: Trace/BPT trap: 5 clang: error: linker command failed due to signal (use -v to see invocation) }}} This appears to be related: #50853 -- Comment: Jeffrey, are you also running Snow Leopard? If so, I would call this a duplicate of #51542. -- Ticket URL: <https://trac.macports.org/ticket/51754#comment:2> MacPorts <https://www.macports.org/> Ports system for OS X
#51754: clang-3.9: dyld: Library not loaded: @rpath/libLLVM.dylib -------------------------+------------------------ Reporter: noloader@… | Owner: jeremyhu@… Type: defect | Status: closed Priority: Normal | Milestone: Component: ports | Version: 2.3.4 Resolution: duplicate | Keywords: Port: clang-3.9 | -------------------------+------------------------ Changes (by jeremyhu@…): * status: new => closed * resolution: => duplicate -- Ticket URL: <https://trac.macports.org/ticket/51754#comment:3> MacPorts <https://www.macports.org/> Ports system for OS X
participants (1)
-
MacPorts