[MacPorts] #69825: clang-16 on 10.8 tries to link against libstdc++ of gcc13

MacPorts noreply at macports.org
Thu Apr 25 18:17:06 UTC 2024


#69825: clang-16 on 10.8 tries to link against libstdc++ of gcc13
--------------------------+----------------------
 Reporter:  barracuda156  |      Owner:  (none)
     Type:  defect        |     Status:  new
 Priority:  Normal        |  Milestone:
Component:  ports         |    Version:  2.9.3
 Keywords:  mountainlion  |       Port:  clang-16
--------------------------+----------------------
 I got a very weird error when building clang-16 +universal on 10.8:
 {{{
 [ 87%] Building CXX object
 tools/clang/tools/diagtool/CMakeFiles/diagtool.dir/ListWarnings.cpp.o
 cd
 /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_llvm-16/clang-16/work/build/tools/clang/tools/diagtool
 && /opt/local/bin/clang++-mp-14 -D__STDC_CONSTANT_MACROS
 -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS
 -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_llvm-16/clang-16/work/build/tools/clang/tools/diagtool
 -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_llvm-16/clang-16/work
 /llvm-project-16.0.6.src/clang/tools/diagtool
 -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_llvm-16/clang-16/work
 /llvm-project-16.0.6.src/clang/include
 -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_llvm-16/clang-16/work/build/tools/clang/include
 -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_llvm-16/clang-16/work/build/include
 -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_llvm-16/clang-16/work
 /llvm-project-16.0.6.src/llvm/include -pipe -Os -DNDEBUG
 -D__DISABLE_MP_LEGACY_SUPPORT_SYSCONF_WRAP__=1
 -D__DISABLE_MP_LEGACY_SUPPORT_REALPATH_WRAP__=1
 -isystem/opt/local/include/LegacySupport -I/opt/local/include
 -stdlib=libc++ -isysroot/ -fPIC -fvisibility-inlines-hidden -Werror=date-
 time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-
 parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers
 -pedantic -Wno-long-long -Wc++98-compat-extra-semi -Wimplicit-fallthrough
 -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-
 non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wmisleading-
 indentation -Wctad-maybe-unsupported -fno-common -Woverloaded-virtual
 -Wno-nested-anon-types -O3 -DNDEBUG -std=c++17 -arch x86_64 -arch i386
 -mmacosx-version-min=10.8  -fno-exceptions -MD -MT
 tools/clang/tools/diagtool/CMakeFiles/diagtool.dir/ListWarnings.cpp.o -MF
 CMakeFiles/diagtool.dir/ListWarnings.cpp.o.d -o
 CMakeFiles/diagtool.dir/ListWarnings.cpp.o -c
 /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_llvm-16/clang-16/work
 /llvm-project-16.0.6.src/clang/tools/diagtool/ListWarnings.cpp
 [ 87%] Linking CXX shared module
 ../../../../../../lib/SampleAnalyzerPlugin.dylib
 cd
 /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_llvm-16/clang-16/work/build/tools/clang/lib/Analysis/plugins/SampleAnalyzer
 && /opt/local/bin/cmake -E cmake_link_script
 CMakeFiles/SampleAnalyzerPlugin.dir/link.txt --verbose=ON
 /opt/local/bin/clang++-mp-14 -pipe -Os -DNDEBUG
 -D__DISABLE_MP_LEGACY_SUPPORT_SYSCONF_WRAP__=1
 -D__DISABLE_MP_LEGACY_SUPPORT_REALPATH_WRAP__=1
 -isystem/opt/local/include/LegacySupport -I/opt/local/include
 -stdlib=libc++ -isysroot/ -fPIC -fvisibility-inlines-hidden -Werror=date-
 time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-
 parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers
 -pedantic -Wno-long-long -Wc++98-compat-extra-semi -Wimplicit-fallthrough
 -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-
 non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wmisleading-
 indentation -Wctad-maybe-unsupported -fno-common -Woverloaded-virtual
 -Wno-nested-anon-types -O3 -DNDEBUG -arch x86_64 -arch i386 -mmacosx-
 version-min=10.8 -bundle -Wl,-headerpad_max_install_names  -Wl,-dead_strip
 -Wl,-exported_symbols_list,"/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_llvm-16/clang-16/work/build/tools/clang/lib/Analysis/plugins/SampleAnalyzer/SampleAnalyzerPlugin.exports"
 -L/opt/local/lib -Wl,-headerpad_max_install_names
 /opt/local/lib/libMacportsLegacySupport.a -Wl,-syslibroot,/
 -Wl,-flat_namespace -Wl,-undefined -Wl,suppress -o
 ../../../../../../lib/SampleAnalyzerPlugin.dylib
 CMakeFiles/SampleAnalyzerPlugin.dir/MainCallChecker.cpp.o
 -Wl,-rpath, at loader_path/../lib ../../../../../../lib/libclang-cpp.dylib
 ../../../../../../lib/libLLVM.dylib
 ld: in '/opt/local/lib/libstdc++.6.dylib', file was built for x86_64 which
 is not the architecture being linked (i386):
 /opt/local/lib/libstdc++.6.dylib for architecture i386
 clang: error: linker command failed with exit code 1 (use -v to see
 invocation)
 make[2]: *** [lib/SampleAnalyzerPlugin.dylib] Error 1
 make[2]: Leaving directory
 `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_llvm-16/clang-16/work/build'
 make[1]: ***
 [tools/clang/lib/Analysis/plugins/SampleAnalyzer/CMakeFiles/SampleAnalyzerPlugin.dir/all]
 Error 2
 make[1]: *** Waiting for unfinished jobs....
 }}}

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


More information about the macports-tickets mailing list