[MacPorts] #49764: babl @0.1.14 falls back to clang-3.4 which is not functional on PPC platforms

MacPorts noreply at macports.org
Sun Oct 23 04:04:00 CEST 2016


#49764: babl @0.1.14 falls back to clang-3.4 which is not functional on PPC
platforms
--------------------------+----------------------
  Reporter:  braumann@…   |      Owner:  dbevans
      Type:  enhancement  |     Status:  assigned
  Priority:  Normal       |  Milestone:
 Component:  ports        |    Version:
Resolution:               |   Keywords:  powerpc
      Port:  clang34      |
--------------------------+----------------------

Comment (by ken-cunningham-webuse):

 I should also mention that libunwind has been installed on this 10.5 PPC
 system
 {{{
 $ port -v installed libunwind
 The following ports are currently installed:
   libunwind @3.9.0_0 (active) platform='darwin 9' archs='ppc'
 }}}

 Now we'll try the problem.
 {{{
 $ cat test_throw.cxx
 #include <stdio.h>

 int main(int argc, char **argv) {
     try {
         const char *message = "This is a test";
         throw message;
         return 0;
     } catch(const char* result) {
         printf("caught: %s\n", result);
         return 1;
     }
 }
 }}}

 give us
 {{{

 $ clang++ -arch ppc -m32 test_throw.cxx -o test_throw.ppc
 ld: absolute address to symbol typeinfo for char const*in a different
 linkage unit not supported in _main from /var/tmp/test_throw-ca2a9c.o
 collect2: ld returned 1 exit status
 clang: error: linker (via gcc) command failed with exit code 1 (use -v to
 see invocation)
 }}}

 or in more detail
 {{{

 $ clang++ -v -arch ppc -m32 test_throw.cxx -o test_throw.ppc
 clang version 3.4.2 (tags/RELEASE_34/dot2-final)
 Target: powerpc-apple-darwin9.8.0
 Thread model: posix
 Selected GCC installation:
  "/opt/local/libexec/llvm-3.4/bin/clang" -cc1 -triple powerpc-apple-
 darwin9.8.0 -S -disable-free -disable-llvm-verifier -main-file-name
 test_throw.cxx -mrelocation-model static -mdisable-fp-elim -fmath-errno
 -target-linker-version 127.2 -v -resource-dir
 /opt/local/libexec/llvm-3.4/bin/../lib/clang/3.4.2 -fdeprecated-macro
 -fno-dwarf2-cfi-asm -fno-dwarf-directory-asm -fno-autolink -fdebug-
 compilation-dir /users/shared/libunwind_test -ferror-limit 19 -fmessage-
 length 123 -mstackrealign -fobjc-runtime=gcc -fcxx-exceptions -fexceptions
 -fdiagnostics-show-option -fcolor-diagnostics -vectorize-slp -o /var/tmp
 /test_throw-ec05cb.s -x c++ test_throw.cxx
 clang -cc1 version 3.4.2 based upon LLVM 3.4.2 default target powerpc-
 apple-darwin9.8.0
 ignoring nonexistent directory "/usr/include/c++/4.2.1"
 ignoring nonexistent directory "/usr/include/c++/4.2.1/powerpc-apple-
 darwin10/"
 ignoring nonexistent directory "/usr/include/c++/4.2.1/backward"
 ignoring nonexistent directory "/usr/include/c++/4.0.0/powerpc-apple-
 darwin10/"
 ignoring nonexistent directory "/usr/local/include"
 #include "..." search starts here:
 #include <...> search starts here:
  /usr/include/c++/4.0.0
  /usr/include/c++/4.0.0/backward
  /opt/local/libexec/llvm-3.4/bin/../lib/clang/3.4.2/include
  /usr/include
  /System/Library/Frameworks (framework directory)
  /Library/Frameworks (framework directory)
 End of search list.
  "/opt/local/bin/g++" -v -c -arch ppc -m32 -o /var/tmp/test_throw-bee4af.o
 -x assembler /var/tmp/test_throw-ec05cb.s
 Using built-in specs.
 Target: powerpc-apple-darwin9
 Configured with: /var/tmp/gcc_42/gcc_42-5577~1/src/configure --disable-
 checking --prefix=/usr --mandir=/usr/share/man --enable-
 languages=c,objc,c++,obj-c++ --program-transform-
 name=/^[cg][^.-]*$/s/$/-4.2/ --with-slibdir=/usr/lib --build=i686-apple-
 darwin9 --with-gxx-include-dir=/usr/include/c++/4.0.0 --program-prefix=
 --host=powerpc-apple-darwin9 --target=powerpc-apple-darwin9
 Thread model: posix
 gcc version 4.2.1 (Apple Inc. build 5577)
  /usr/libexec/gcc/powerpc-apple-darwin9/4.2.1/as -arch ppc -o /var/tmp
 /test_throw-bee4af.o /var/tmp/test_throw-ec05cb.s
  "/opt/local/bin/g++" -v -arch ppc -m32 -o test_throw.ppc /var/tmp
 /test_throw-bee4af.o
 Using built-in specs.
 Target: powerpc-apple-darwin9
 Configured with: /var/tmp/gcc_42/gcc_42-5577~1/src/configure --disable-
 checking --prefix=/usr --mandir=/usr/share/man --enable-
 languages=c,objc,c++,obj-c++ --program-transform-
 name=/^[cg][^.-]*$/s/$/-4.2/ --with-slibdir=/usr/lib --build=i686-apple-
 darwin9 --with-gxx-include-dir=/usr/include/c++/4.0.0 --program-prefix=
 --host=powerpc-apple-darwin9 --target=powerpc-apple-darwin9
 Thread model: posix
 gcc version 4.2.1 (Apple Inc. build 5577)
  /usr/libexec/gcc/powerpc-apple-darwin9/4.2.1/collect2 -dynamic -arch ppc
 -macosx_version_min 10.5.8 -weak_reference_mismatches non-weak -o
 test_throw.ppc -lcrt1.10.5.o -L/usr/lib/powerpc-apple-darwin9/4.2.1
 -L/usr/lib/gcc/powerpc-apple-darwin9/4.2.1 -L/usr/lib/gcc/powerpc-apple-
 darwin9/4.2.1 -L/usr/lib/gcc/powerpc-apple-darwin9/4.2.1/../../../powerpc-
 apple-darwin9/4.2.1 -L/usr/lib/gcc/powerpc-apple-darwin9/4.2.1/../../..
 /var/tmp/test_throw-bee4af.o -lstdc++ -lgcc_s.10.5 -lgcc -lSystemStubs
 -lSystem
 ld: absolute address to symbol typeinfo for char const*in a different
 linkage unit not supported in _main from /var/tmp/test_throw-bee4af.o
 collect2: ld returned 1 exit status
 clang: error: linker (via gcc) command failed with exit code 1 (use -v to
 see invocation)
 }}}

 I don't really understand why it says 'char const* in a different linkage
 unit', but it seems to be missing a standard library of some kind. but
 'lstdc++' is in the link libraries above ... hmmm.

 trying g++
 {{{
 $ g++ -v -arch ppc -m32 test_throw.cxx -o test_throw.ppc
 Using built-in specs.
 Target: powerpc-apple-darwin9
 Configured with: /var/tmp/gcc_42/gcc_42-5577~1/src/configure --disable-
 checking --prefix=/usr --mandir=/usr/share/man --enable-
 languages=c,objc,c++,obj-c++ --program-transform-
 name=/^[cg][^.-]*$/s/$/-4.2/ --with-slibdir=/usr/lib --build=i686-apple-
 darwin9 --with-gxx-include-dir=/usr/include/c++/4.0.0 --program-prefix=
 --host=powerpc-apple-darwin9 --target=powerpc-apple-darwin9
 Thread model: posix
 gcc version 4.2.1 (Apple Inc. build 5577)
  /usr/libexec/gcc/powerpc-apple-darwin9/4.2.1/cc1plus -quiet -v
 -D__DYNAMIC__ test_throw.cxx -fPIC -quiet -dumpbase test_throw.cxx
 -mmacosx-version-min=10.5.8 -m32 -auxbase test_throw -version
 -D__private_extern__=extern -o /var/tmp//cctSwycN.s
 ignoring nonexistent directory "/usr/local/include"
 ignoring nonexistent directory "/usr/lib/gcc/powerpc-apple-darwin9/4.2.1
 /../../../../powerpc-apple-darwin9/include"
 #include "..." search starts here:
 #include <...> search starts here:
  /usr/include/c++/4.0.0
  /usr/include/c++/4.0.0/powerpc-apple-darwin9
  /usr/include/c++/4.0.0/backward
  /usr/lib/gcc/powerpc-apple-darwin9/4.2.1/include
  /usr/include
  /System/Library/Frameworks (framework directory)
  /Library/Frameworks (framework directory)
 End of search list.
 GNU C++ version 4.2.1 (Apple Inc. build 5577) (powerpc-apple-darwin9)
         compiled by GNU C version 4.2.1 (Apple Inc. build 5577).
 GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
 Compiler executable checksum: a531a339ffc716e1aa139cbb61673b62
  /usr/libexec/gcc/powerpc-apple-darwin9/4.2.1/as -arch ppc -o
 /var/tmp//ccZuaFob.o /var/tmp//cctSwycN.s
  /usr/libexec/gcc/powerpc-apple-darwin9/4.2.1/collect2 -dynamic -arch ppc
 -macosx_version_min 10.5.8 -weak_reference_mismatches non-weak -o
 test_throw.ppc -lcrt1.10.5.o -L/usr/lib/powerpc-apple-darwin9/4.2.1
 -L/usr/lib/gcc/powerpc-apple-darwin9/4.2.1 -L/usr/lib/gcc/powerpc-apple-
 darwin9/4.2.1 -L/usr/lib/gcc/powerpc-apple-darwin9/4.2.1/../../../powerpc-
 apple-darwin9/4.2.1 -L/usr/lib/gcc/powerpc-apple-darwin9/4.2.1/../../..
 /var/tmp//ccZuaFob.o -lstdc++ -lgcc_s.10.5 -lgcc -lSystemStubs -lSystem

 }}}
 works just perfectly, which hurts a bit
 {{{
 $ ./test_throw.ppc
 caught: This is a test
 }}}

 So now if we can just get clang to compile it like that instead of g++,
 we'll be laughing.

--
Ticket URL: <https://trac.macports.org/ticket/49764#comment:25>
MacPorts <https://www.macports.org/>
Ports system for OS X



More information about the macports-tickets mailing list