[MacPorts] #63304: clang 3.4 @3.4.2_15: Build fails (incompatible cpu-subtype) on a G3

MacPorts noreply at macports.org
Tue Jul 27 11:54:33 UTC 2021


#63304: clang 3.4 @3.4.2_15: Build fails (incompatible cpu-subtype) on a G3
------------------------+-----------------------
 Reporter:  evanmiller  |      Owner:  jeremyhu
     Type:  defect      |     Status:  assigned
 Priority:  Normal      |  Milestone:
Component:  ports       |    Version:  2.7.1
 Keywords:  ppc         |       Port:  clang-3.4
------------------------+-----------------------
 Log excerpt:

 {{{
 :info:build make/platform/clang_linux.mk:16: *** "unable to infer compiler
 target triple for
 /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_llvm-3.4/clang-3.4/work/build/Release/bin/clang".
 Stop.
 :info:build gmake[4]: Leaving directory
 '/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_llvm-3.4/clang-3.4/work/llvm-3.4.2.src/projects
 /compiler-rt'
 :info:build gmake[3]: *** [Makefile:162: BuildRuntimeLibraries] Error 2
 :info:build gmake[3]: Leaving directory
 '/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_llvm-3.4/clang-3.4/work/build/tools/clang/runtime
 /compiler-rt'
 :info:build gmake[2]: ***
 [/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_llvm-3.4/clang-3.4/work/llvm-3.4.2.src/Makefile.rules:911:
 compiler-rt/.makeall] Error 2
 :info:build gmake[2]: Leaving directory
 '/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_llvm-3.4/clang-3.4/work/build/tools/clang/runtime'
 :info:build gmake[1]: ***
 [/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_llvm-3.4/clang-3.4/work/llvm-3.4.2.src/Makefile.rules:852:
 all] Error 1
 :info:build gmake[1]: Leaving directory
 '/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_llvm-3.4/clang-3.4/work/build/tools/clang'
 :info:build gmake: ***
 [/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_llvm-3.4/clang-3.4/work/llvm-3.4.2.src/Makefile.rules:852:
 all] Error 1
 :info:build gmake: Leaving directory
 '/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_llvm-3.4/clang-3.4/work/build'
 :info:build Command failed:  cd
 "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_llvm-3.4/clang-3.4/work/build"
 && /opt/local/bin/gmake -j1 -w clang-only
 :info:build Exit code: 2
 :error:build Failed to build clang-3.4: command execution failed
 :debug:build Error code: CHILDSTATUS 9327 2
 :debug:build Backtrace: command execution failed
 :debug:build     while executing
 :debug:build "system {*}$notty {*}$callback {*}$nice $fullcmdstring"
 :debug:build     invoked from within
 :debug:build "command_exec -callback
 portprogress::target_progress_callback build"
 :debug:build     (procedure "portbuild::build_main" line 8)
 :debug:build     invoked from within
 :debug:build "$procedure $targetname"
 :error:build See
 /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_llvm-3.4/clang-3.4/main.log
 for details.
 }}}

 Excerpt from the offending makefile:

 {{{
 Description := Static runtime libraries for clang/Linux.

 ###

 CC := clang
 Arch := unknown
 Configs :=

 # We don't currently have any general purpose way to target architectures
 other
 # than the compiler defaults (because there is no generalized way to
 invoke
 # cross compilers). For now, we just find the target architecture of the
 # compiler and only define configurations we know that compiler can
 generate.
 CompilerTargetTriple := $(shell \
     $(CC) -v 2>&1 | grep 'Target:' | cut -d' ' -f2)
 ifeq ($(CompilerTargetTriple),)
 $(error "unable to infer compiler target triple for $(CC)")
 endif
 }}}

 Running the {{{clang -v}}} explicitly:

 {{{
 $ ./clang-3.4/work/build/Release/bin/clang -v
 dyld: incompatible cpu-subtype
 }}}

 Checking it with lipo:

 {{{
 $ lipo -info ./clang-3.4/work/build/Release/bin/clang
 Non-fat file:
 /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_llvm-3.4/clang-3.4/work/build/Release/bin/clang
 is architecture: ppc7400
 }}}

 It looks like GCC is emitting {{{ppc7400}}} on an unsupported G3 machine,
 similar to #63259. I don't expect the maintainers to take up this issue,
 but wanted to document my findings for later.

 System information:

 {{{
 :debug:sysinfo Mac OS X 10.4.11 (darwin/8.11.0) arch powerpc
 :debug:sysinfo MacPorts 2.7.1
 :debug:sysinfo Xcode 2.5
 :debug:sysinfo SDK 10.4
 :debug:sysinfo MACOSX_DEPLOYMENT_TARGET: 10.4
 }}}

-- 
Ticket URL: <https://trac.macports.org/ticket/63304>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list