Opened 7 months ago

Last modified 7 months ago

#69825 new defect

clang-16 on 10.8 tries to link against libstdc++ of gcc13

Reported by: barracuda156 Owned by:
Priority: Normal Milestone:
Component: ports Version: 2.9.3
Keywords: mountainlion Cc: catap (Kirill A. Korinsky), kencu (Ken), MarcusCalhoun-Lopez (Marcus Calhoun-Lopez)
Port: clang-16

Description

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,@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....

Attachments (1)

clang-16_build_10.8_universal.txt.zip (349.0 KB) - added by barracuda156 7 months ago.

Download all attachments as: .zip

Change History (2)

Changed 7 months ago by barracuda156

comment:1 Changed 7 months ago by MarcusCalhoun-Lopez (Marcus Calhoun-Lopez)

Cc: MarcusCalhoun-Lopez added
Note: See TracTickets for help on using tickets.