[MacPorts] #33003: clang++ 2.9, 3.0 and 3.1 fail to link properly

MacPorts noreply at macports.org
Tue Jan 24 01:45:20 PST 2012


#33003: clang++ 2.9, 3.0 and 3.1 fail to link properly
----------------------------------+-----------------------------------------
 Reporter:  roland@…              |       Owner:  macports-tickets@…                   
     Type:  defect                |      Status:  new                                  
 Priority:  Normal                |   Milestone:                                       
Component:  ports                 |     Version:  2.0.3                                
 Keywords:                        |        Port:  clang-2.9, clang-3.0, clang-3.1      
----------------------------------+-----------------------------------------
 The `clang++` C++ front ends from ports `clang-2.9`, `clang-3.0` and
 `clang-3.1` fail to link code properly:

 {{{
 % cat a.cc
 #include <iostream>

 int
 main ()
 {
   std::cout << "Hello World!" << std::endl;
 }
 % clang++-mp-2.9 a.cc
 ld: unknown option: -demangle
 clang: error: linker command failed with exit code 1 (use -v to see
 invocation)
 % clang++-mp-3.0 a.cc
 ld: unknown option: -demangle
 clang: error: linker command failed with exit code 1 (use -v to see
 invocation)
 % clang++-mp-3.1 a.cc
 ld: unknown option: -demangle
 clang: error: linker command failed with exit code 1 (use -v to see
 invocation)
 }}}

 Using directly the `clang++` binary from the
 `/opt/local/libexec/llvm-x.y/bin/` directory produces the same error:

 {{{
 % /opt/local/libexec/llvm-2.9/bin/clang++ a.cc
 ld: unknown option: -demangle
 clang: error: linker command failed with exit code 1 (use -v to see
 invocation)
 % /opt/local/libexec/llvm-3.0/bin/clang++ a.cc
 ld: unknown option: -demangle
 clang: error: linker command failed with exit code 1 (use -v to see
 invocation)
 % /opt/local/libexec/llvm-3.1/bin/clang++ a.cc
 ld: unknown option: -demangle
 clang: error: linker command failed with exit code 1 (use -v to see
 invocation)
 }}}

 Here is the output of `clang++-mp-2.9` with the `-v` option:

 {{{
 % clang++-mp-2.9 -v a.cc
 clang version 2.9 (tags/RELEASE_29/final)
 Target: x86_64-apple-darwin10
 Thread model: posix
  "/opt/local/libexec/llvm-2.9/bin/clang" -cc1 -triple x86_64-apple-
 darwin10.0.0 -emit-obj -mrelax-all -disable-free -main-file-name a.cc
 -pic-level 1 -mdisable-fp-elim -masm-verbose -munwind-tables -target-cpu
 core2 -target-linker-version 127.2 -v -resource-dir
 /opt/local/libexec/llvm-2.9/bin/../lib/clang/2.9 -ferror-limit 19
 -fmessage-length 80 -stack-protector 1 -fblocks -fcxx-exceptions
 -fexceptions -fdiagnostics-show-option -fcolor-diagnostics -o
 /var/folders/TT/TTWwnJg92RaMtk+BYog6aU+++TI/-Tmp-/cc-CZUJ1t.o -x c++ a.cc
 clang -cc1 version 2.9 based upon llvm 2.9 hosted on x86_64-apple-darwin10
 #include "..." search starts here:
 #include <...> search starts here:
  /usr/include/c++/4.2.1
  /usr/include/c++/4.2.1/i686-apple-darwin10/x86_64
  /usr/include/c++/4.2.1/backward
  /usr/include/c++/4.0.0
  /usr/include/c++/4.0.0/i686-apple-darwin8
  /usr/include/c++/4.0.0/backward
  /usr/local/include
  /opt/local/libexec/llvm-2.9/bin/../lib/clang/2.9/include
  /usr/include
  /System/Library/Frameworks (framework directory)
  /Library/Frameworks (framework directory)
 End of search list.
  "/usr/libexec/gcc/i686-apple-darwin10/4.2.1/ld" -demangle -dynamic -arch
 x86_64 -macosx_version_min 10.6.0 -o a.out -lcrt1.10.6.o
 /var/folders/TT/TTWwnJg92RaMtk+BYog6aU+++TI/-Tmp-/cc-CZUJ1t.o
 /usr/lib/libstdc++.6.dylib -lSystem
 ld: unknown option: -demangle
 clang: error: linker command failed with exit code 1 (use -v to see
 invocation)
 }}}

 (`clang++-mp-3.0` and `clang++-mp-3.1` show similar error messages.)

-- 
Ticket URL: <https://trac.macports.org/ticket/33003>
MacPorts <http://www.macports.org/>
Ports system for Mac OS


More information about the macports-tickets mailing list