[MacPorts] #50845: libunwind: fails to find 'bits/c++config.h' on 10.5/PPC

MacPorts noreply at macports.org
Sun Dec 11 23:00:41 CET 2016


#50845: libunwind: fails to find 'bits/c++config.h' on 10.5/PPC
------------------------+----------------------
  Reporter:  mojca      |      Owner:  jeremyhu
      Type:  defect     |     Status:  closed
  Priority:  Normal     |  Milestone:
 Component:  ports      |    Version:
Resolution:  fixed      |   Keywords:  leopard
      Port:  libunwind  |
------------------------+----------------------

Comment (by kencu):

 Jeremy, all works as you've outlined, through to the end of that
 LibcxxOnOlderSystems document. Only thing I would add that might not be
 clear is that the Leopard instructions for Leopard(ppc) only work on
 Leopard Intel at present.

 clang-3.7 will install on Leopard intel and generate ppc code that runs,
 but on Leopard PPC clang-3.4 is as far as you go and doesn't work on PPC
 as it does on Intel to complete the compiles of the libraries (or
 clang-3.7).

 Leopard PPC with clang-3.4 did build libunwind for me, but not universally
 -- only for PPC. It did build libmacho universally. It would not build
 libcxxabi just now on PPC, however.

 {{{
   libunwind @3.9.0_0 platform='darwin 9' archs='ppc'
   libunwind @3.9.0_3 (active) platform='darwin 9' archs='ppc'
   libunwind-headers @3.9.0_0 (active) platform='darwin 9' archs='noarch'
   libmacho @886_0+universal (active) platform='darwin 9' archs='i386 ppc'
   libmacho-headers @886_0 (active) platform='darwin 9' archs='noarch'
 }}}

 attempt to build libcxxabi:
 {{{
 sudo port -v install libcxxabi
 --->  Computing dependencies for libcxxabi.
 --->  Building libcxxabi
 + for FILE in '../src/*.cpp'
 + /opt/local/bin/clang++-mp-3.4 -I/opt/local/include -c -g -O3 -arch ppc
 -std=c++11 -stdlib=libc++ -fstrict-aliasing -Wstrict-aliasing=2 -Wsign-
 conversion -Wshadow -Wconversion -Wunused-variable -Wmissing-field-
 initializers -Wchar-subscripts -Wmismatched-tags -Wmissing-braces
 -Wshorten-64-to-32 -Wsign-compare -Wstrict-aliasing=2 -Wstrict-overflow=4
 -Wunused-parameter -Wnewline-eof -I../include ../src/abort_message.cpp
 /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_libcxxabi/libcxxabi/work/.tmp
 /abort_message-a08a1d.s:22:Missing string
 /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_libcxxabi/libcxxabi/work/.tmp
 /abort_message-a08a1d.s:22:Rest of line ignored. 1st junk character valued
 49 (1).
 /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_libcxxabi/libcxxabi/work/.tmp
 /abort_message-a08a1d.s:30:Unknown pseudo-op: .loc
 /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_libcxxabi/libcxxabi/work/.tmp
 /abort_message-a08a1d.s:30:Rest of line ignored. 1st junk character valued
 49 (1).
 /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_libcxxabi/libcxxabi/work/.tmp
 /abort_message-a08a1d.s:43:Unknown pseudo-op: .loc
 /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_libcxxabi/libcxxabi/work/.tmp
 /abort_message-a08a1d.s:43:Rest of line ignored. 1st junk character valued
 49 (1).
 /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_libcxxabi/libcxxabi/work/.tmp
 /abort_message-a08a1d.s:60:Unknown pseudo-op: .loc
 /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_libcxxabi/libcxxabi/work/.tmp
 /abort_message-a08a1d.s:60:Rest of line ignored. 1st junk character valued
 49 (1).
 /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_libcxxabi/libcxxabi/work/.tmp
 /abort_message-a08a1d.s:65:Unknown pseudo-op: .loc
 /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_libcxxabi/libcxxabi/work/.tmp
 /abort_message-a08a1d.s:65:Rest of line ignored. 1st junk character valued
 49 (1).
 /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_libcxxabi/libcxxabi/work/.tmp
 /abort_message-a08a1d.s:67:Unknown pseudo-op: .loc
 /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_libcxxabi/libcxxabi/work/.tmp
 /abort_message-a08a1d.s:67:Rest of line ignored. 1st junk character valued
 49 (1).
 /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_libcxxabi/libcxxabi/work/.tmp
 /abort_message-a08a1d.s:69:Unknown pseudo-op: .loc
 /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_libcxxabi/libcxxabi/work/.tmp
 /abort_message-a08a1d.s:69:Rest of line ignored. 1st junk character valued
 49 (1).
 /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_libcxxabi/libcxxabi/work/.tmp
 /abort_message-a08a1d.s:75:Unknown pseudo-op: .loc
 /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_libcxxabi/libcxxabi/work/.tmp
 /abort_message-a08a1d.s:75:Rest of line ignored. 1st junk character valued
 49 (1).
 clang: error: assembler (via gcc) command failed with exit code 1 (use -v
 to see invocation)
 Command failed:  cd
 "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_libcxxabi/libcxxabi/work/libcxxabi-3.9.0.src/lib"
 && ./buildit all
 Exit code: 1
 Error: org.macports.build for port libcxxabi returned: command execution
 failed
 }}}

 Next immediate step for bootstrapping a clang-libcxx plan for leopard PPC
 would appear to be to
 1. get the runtimes (libcxx, libcxxabi, libmacho, libunwind) onto Leopard
 PPC by building them with clang-3.7 on Leopard Intel (done) and getting
 them over as binaries. That's reasonably easy.
 2. build a few simple cxx11 ports on Leopard Intel with PPC slices, and
 get them onto the Leopard PPC machine as binary installs and see what
 happens.

 I tried building a simple cxx11 port, aria2, on Leopard Intel with a ppc
 slice and it died early with various errors - libtool being the first --
 so this might take some thinking.

 {{{
 sudo port -v install aria2 +universal universal_archs="x86_64 i386 ppc"
 configure.compiler=macports-clang-3.7
 Password:
 Error: Cannot install aria2 for the arch(s) 'i386 ppc x86_64' because
 Error: its dependency libtool is only installed for the arch 'i386'
 Error: and the configured universal_archs 'i386 ppc' are not sufficient.
 Error: Unable to execute port: architecture mismatch
 }}}

 {{{
 sudo port -v -n upgrade --force libtool +universal universal_archs="x86_64
 i386 ppc" configure.compiler=macports-clang-3.7

 fails with

 libtool: compile:  /opt/local/bin/clang-mp-3.7 -DHAVE_CONFIG_H -I.
 -DLTDLOPEN=libltdl "-DLT_CONFIG_H=<config.h>" -DLTDL -I. -I. -Ilibltdl
 -I./libltdl -Ilibltdl/libltdl -I./libltdl/libltdl -I/opt/local/include
 -pipe -Os -arch x86_64 -arch i386 -arch ppc -c libltdl/ltdl.c -o libltdl
 /libltdl_libltdl_la-ltdl.o >/dev/null 2>&1
 /bin/sh ./libtool  --tag=CC   --mode=link /opt/local/bin/clang-mp-3.7
 -pipe -Os -arch x86_64 -arch i386 -arch ppc -no-undefined -version-info
 10:1:3 -dlpreopen libltdl/dlopen.la  -L/opt/local/lib
 -Wl,-headerpad_max_install_names -arch x86_64 -arch i386 -arch ppc -o
 libltdl/libltdl.la -rpath /opt/local/lib libltdl/loaders
 /libltdl_libltdl_la-preopen.lo libltdl/libltdl_libltdl_la-lt__alloc.lo
 libltdl/libltdl_libltdl_la-lt_dlloader.lo libltdl/libltdl_libltdl_la-
 lt_error.lo libltdl/libltdl_libltdl_la-ltdl.lo libltdl/libltdl_libltdl_la-
 slist.lo libltdl/lt__argz.lo
 libtool:   error: not configured to extract global symbols from
 dlpreopened files
 libtool: link: (cd
 /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_devel_libtool/libtool/work/libtool-2.4.6/libltdl/.libs/libltdl.lax/dlopen.a/unfat-13206/dlopen.a-x86_64
 && ar x "dlopen.a")
 libtool: link: (cd
 /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_devel_libtool/libtool/work/libtool-2.4.6/libltdl/.libs/libltdl.lax/dlopen.a/unfat-13206/dlopen.a-i386
 && ar x "dlopen.a")
 libtool: link: (cd
 /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_devel_libtool/libtool/work/libtool-2.4.6/libltdl/.libs/libltdl.lax/dlopen.a/unfat-13206/dlopen.a-ppc
 && ar x "dlopen.a")
 libtool: link: /opt/local/bin/clang-mp-3.7 -dynamiclib  -o
 libltdl/.libs/libltdl.7.dylib  libltdl/loaders/.libs/libltdl_libltdl_la-
 preopen.o libltdl/.libs/libltdl_libltdl_la-lt__alloc.o libltdl/.libs
 /libltdl_libltdl_la-lt_dlloader.o libltdl/.libs/libltdl_libltdl_la-
 lt_error.o libltdl/.libs/libltdl_libltdl_la-ltdl.o libltdl/.libs
 /libltdl_libltdl_la-slist.o libltdl/.libs/lt__argz.o
 libltdl/.libs/libltdl.lax/dlopen.a/dlopen.o   -L/opt/local/lib  -Os -arch
 x86_64 -arch i386 -arch ppc -Wl,-headerpad_max_install_names -arch x86_64
 -arch i386 -arch ppc   -install_name  /opt/local/lib/libltdl.7.dylib
 -compatibility_version 11 -current_version 11.1 -Wl,-single_module
 Undefined symbols for architecture x86_64:
   "_lt_libltdl_LTX_preloaded_symbols", referenced from:
       _lt_dlinit in libltdl_libltdl_la-ltdl.o
 ld: symbol(s) not found for architecture x86_64

 }}}






 Perhaps I'll invent a simple 'hello world' port and see if I can get the
 process at least started with this.

 But this sounds like a new ticket, rather than adding it here where it
 doesn't belong...

--
Ticket URL: <https://trac.macports.org/ticket/50845#comment:13>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list