Opened 3 years ago

Closed 3 years ago

Last modified 9 months ago

#63085 closed defect (fixed)

clang-12: compiler-rt build sometimes fails parallel building

Reported by: blair (Blair Zajac) Owned by: kencu (Ken)
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc: jeremyhu (Jeremy Huddleston Sequoia)
Port: clang-12

Description

I'm unable to get clang-12 to build from source on an Intel Big Sur 11.4 machine.

[ 15%] Building ASM object projects/compiler-rt/lib/builtins/CMakeFiles/clang_rt.builtins_arm64e_osx.dir/outline_atomic_helpers.dir/outline_atomic_ldset1_2.S.o
[ 15%] Building ASM object projects/compiler-rt/lib/builtins/CMakeFiles/clang_rt.builtins_arm64e_osx.dir/outline_atomic_helpers.dir/outline_atomic_ldclr4_4.S.o
cd /opt/local/var/macports/build/_Users_blairzajac_Code_MacPorts_macports-ports.git_lang_llvm-12/clang-12/work/build/projects/compiler-rt/lib/builtins && /Library/Developer/CommandLineTools/usr/bin/clang -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -DL_ldclr -DMODEL=4 -DSIZE=4 -I/opt/local/var/macports/build/_Users_blairzajac_Code_MacPorts_macports-ports.git_lang_llvm-12/clang-12/work/llvm-project-12.0.0.src/compiler-rt/lib/builtins -I/opt/local/var/macports/build/_Users_blairzajac_Code_MacPorts_macports-ports.git_lang_llvm-12/clang-12/work/build/projects/compiler-rt/lib/builtins -I/opt/local/var/macports/build/_Users_blairzajac_Code_MacPorts_macports-ports.git_lang_llvm-12/clang-12/work/llvm-project-12.0.0.src/compiler-rt/lib/builtins -I/opt/local/var/macports/build/_Users_blairzajac_Code_MacPorts_macports-ports.git_lang_llvm-12/clang-12/work/build/include -I/opt/local/var/macports/build/_Users_blairzajac_Code_MacPorts_macports-ports.git_lang_llvm-12/clang-12/work/llvm-project-12.0.0.src/llvm/include -O3 -DNDEBUG -arch arm64e -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk  -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -mmacosx-version-min=10.5 -fPIC -O3 -fvisibility=hidden -DVISIBILITY_HIDDEN -Wall -fomit-frame-pointer -arch arm64e -o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/outline_atomic_helpers.dir/outline_atomic_ldclr4_4.S.o -c /opt/local/var/macports/build/_Users_blairzajac_Code_MacPorts_macports-ports.git_lang_llvm-12/clang-12/work/build/projects/compiler-rt/lib/builtins/outline_atomic_helpers.dir/outline_atomic_ldclr4_4.S
cd /opt/local/var/macports/build/_Users_blairzajac_Code_MacPorts_macports-ports.git_lang_llvm-12/clang-12/work/build/projects/compiler-rt/lib/builtins && /Library/Developer/CommandLineTools/usr/bin/clang -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -DL_ldset -DMODEL=2 -DSIZE=1 -I/opt/local/var/macports/build/_Users_blairzajac_Code_MacPorts_macports-ports.git_lang_llvm-12/clang-12/work/llvm-project-12.0.0.src/compiler-rt/lib/builtins -I/opt/local/var/macports/build/_Users_blairzajac_Code_MacPorts_macports-ports.git_lang_llvm-12/clang-12/work/build/projects/compiler-rt/lib/builtins -I/opt/local/var/macports/build/_Users_blairzajac_Code_MacPorts_macports-ports.git_lang_llvm-12/clang-12/work/llvm-project-12.0.0.src/compiler-rt/lib/builtins -I/opt/local/var/macports/build/_Users_blairzajac_Code_MacPorts_macports-ports.git_lang_llvm-12/clang-12/work/build/include -I/opt/local/var/macports/build/_Users_blairzajac_Code_MacPorts_macports-ports.git_lang_llvm-12/clang-12/work/llvm-project-12.0.0.src/llvm/include -O3 -DNDEBUG -arch arm64e -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk  -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -mmacosx-version-min=10.5 -fPIC -O3 -fvisibility=hidden -DVISIBILITY_HIDDEN -Wall -fomit-frame-pointer -arch arm64e -o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/outline_atomic_helpers.dir/outline_atomic_ldset1_2.S.o -c /opt/local/var/macports/build/_Users_blairzajac_Code_MacPorts_macports-ports.git_lang_llvm-12/clang-12/work/build/projects/compiler-rt/lib/builtins/outline_atomic_helpers.dir/outline_atomic_ldset1_2.S
[ 15%] Linking C static library ../../../../lib/libclang_rt.builtins_arm64e_osx.a
cd /opt/local/var/macports/build/_Users_blairzajac_Code_MacPorts_macports-ports.git_lang_llvm-12/clang-12/work/build/projects/compiler-rt/lib/builtins && /opt/local/bin/cmake -P CMakeFiles/clang_rt.builtins_arm64e_osx.dir/cmake_clean_target.cmake
cd /opt/local/var/macports/build/_Users_blairzajac_Code_MacPorts_macports-ports.git_lang_llvm-12/clang-12/work/build/projects/compiler-rt/lib/builtins && /opt/local/bin/cmake -E cmake_link_script CMakeFiles/clang_rt.builtins_arm64e_osx.dir/link.txt --verbose=ON
"/Library/Developer/CommandLineTools/usr/bin/libtool" -static -no_warning_for_no_symbols -o ../../../../lib/libclang_rt.builtins_arm64e_osx.a CMakeFiles/clang_rt.builtins_arm64e_osx.dir/comparetf2.c.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/divtc3.c.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/extenddftf2.c.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/extendhftf2.c.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/extendsftf2.c.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/fixtfdi.c.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/fixtfsi.c.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/fixtfti.c.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/fixunstfdi.c.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/fixunstfsi.c.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/fixunstfti.c.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/floatditf.c.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/floatsitf.c.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/floattitf.c.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/floatunditf.c.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/floatunsitf.c.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/floatuntitf.c.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/multc3.c.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/trunctfdf2.c.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/trunctfhf2.c.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/trunctfsf2.c.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/absvdi2.c.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/absvsi2.c.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/absvti2.c.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/adddf3.c.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/addsf3.c.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/addvdi3.c.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/addvsi3.c.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/addvti3.c.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/ashldi3.c.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/ashlti3.c.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/ashrdi3.c.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/ashrti3.c.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/bswapdi2.c.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/bswapsi2.c.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/clzdi2.c.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/clzsi2.c.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/clzti2.c.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/cmpdi2.c.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/cmpti2.c.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/comparedf2.c.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/comparesf2.c.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/ctzdi2.c.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/ctzsi2.c.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/ctzti2.c.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/divdc3.c.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/divdf3.c.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/divdi3.c.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/divmoddi4.c.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/divmodsi4.c.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/divmodti4.c.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/divsc3.c.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/divsf3.c.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/divsi3.c.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/divti3.c.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/extendsfdf2.c.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/extendhfsf2.c.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/ffsdi2.c.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/ffssi2.c.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/ffsti2.c.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/fixdfdi.c.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/fixdfsi.c.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/fixdfti.c.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/fixsfdi.c.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/fixsfsi.c.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/fixsfti.c.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/fixunsdfdi.c.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/fixunsdfsi.c.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/fixunsdfti.c.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/fixunssfdi.c.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/fixunssfsi.c.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/fixunssfti.c.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/floatdidf.c.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/floatdisf.c.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/floatsidf.c.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/floatsisf.c.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/floattidf.c.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/floattisf.c.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/floatundidf.c.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/floatundisf.c.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/floatunsidf.c.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/floatunsisf.c.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/floatuntidf.c.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/floatuntisf.c.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/int_util.c.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/lshrdi3.c.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/lshrti3.c.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/moddi3.c.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/modsi3.c.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/modti3.c.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/muldc3.c.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/muldf3.c.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/muldi3.c.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/mulodi4.c.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/mulosi4.c.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/muloti4.c.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/mulsc3.c.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/mulsf3.c.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/multi3.c.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/mulvdi3.c.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/mulvsi3.c.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/mulvti3.c.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/negdf2.c.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/negdi2.c.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/negsf2.c.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/negti2.c.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/negvdi2.c.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/negvsi2.c.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/negvti2.c.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/os_version_check.c.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/paritydi2.c.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/paritysi2.c.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/parityti2.c.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/popcountdi2.c.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/popcountsi2.c.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/popcountti2.c.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/powidf2.c.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/powisf2.c.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/subdf3.c.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/subsf3.c.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/subvdi3.c.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/subvsi3.c.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/subvti3.c.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/truncdfhf2.c.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/truncdfsf2.c.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/truncsfhf2.c.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/ucmpdi2.c.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/ucmpti2.c.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/udivdi3.c.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/udivmoddi4.c.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/udivmodsi4.c.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/udivmodti4.c.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/udivsi3.c.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/udivti3.c.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/umoddi3.c.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/umodsi3.c.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/umodti3.c.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/emutls.c.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/enable_execute_stack.c.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/eprintf.c.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/atomic_flag_clear.c.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/atomic_flag_clear_explicit.c.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/atomic_flag_test_and_set.c.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/atomic_flag_test_and_set_explicit.c.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/atomic_signal_fence.c.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/atomic_thread_fence.c.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/gcc_personality_v0.c.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/clear_cache.c.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/cpu_model.c.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/aarch64/fp_mode.c.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/outline_atomic_helpers.dir/outline_atomic_cas1_1.S.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/outline_atomic_helpers.dir/outline_atomic_cas1_2.S.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/outline_atomic_helpers.dir/outline_atomic_cas1_3.S.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/outline_atomic_helpers.dir/outline_atomic_cas1_4.S.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/outline_atomic_helpers.dir/outline_atomic_cas2_1.S.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/outline_atomic_helpers.dir/outline_atomic_cas2_2.S.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/outline_atomic_helpers.dir/outline_atomic_cas2_3.S.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/outline_atomic_helpers.dir/outline_atomic_cas2_4.S.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/outline_atomic_helpers.dir/outline_atomic_cas4_1.S.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/outline_atomic_helpers.dir/outline_atomic_cas4_2.S.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/outline_atomic_helpers.dir/outline_atomic_cas4_3.S.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/outline_atomic_helpers.dir/outline_atomic_cas4_4.S.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/outline_atomic_helpers.dir/outline_atomic_cas8_1.S.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/outline_atomic_helpers.dir/outline_atomic_cas8_2.S.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/outline_atomic_helpers.dir/outline_atomic_cas8_3.S.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/outline_atomic_helpers.dir/outline_atomic_cas8_4.S.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/outline_atomic_helpers.dir/outline_atomic_cas16_1.S.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/outline_atomic_helpers.dir/outline_atomic_cas16_2.S.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/outline_atomic_helpers.dir/outline_atomic_cas16_3.S.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/outline_atomic_helpers.dir/outline_atomic_cas16_4.S.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/outline_atomic_helpers.dir/outline_atomic_swp1_1.S.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/outline_atomic_helpers.dir/outline_atomic_swp1_2.S.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/outline_atomic_helpers.dir/outline_atomic_swp1_3.S.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/outline_atomic_helpers.dir/outline_atomic_swp1_4.S.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/outline_atomic_helpers.dir/outline_atomic_swp2_1.S.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/outline_atomic_helpers.dir/outline_atomic_swp2_2.S.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/outline_atomic_helpers.dir/outline_atomic_swp2_3.S.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/outline_atomic_helpers.dir/outline_atomic_swp2_4.S.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/outline_atomic_helpers.dir/outline_atomic_swp4_1.S.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/outline_atomic_helpers.dir/outline_atomic_swp4_2.S.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/outline_atomic_helpers.dir/outline_atomic_swp4_3.S.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/outline_atomic_helpers.dir/outline_atomic_swp4_4.S.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/outline_atomic_helpers.dir/outline_atomic_swp8_1.S.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/outline_atomic_helpers.dir/outline_atomic_swp8_2.S.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/outline_atomic_helpers.dir/outline_atomic_swp8_3.S.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/outline_atomic_helpers.dir/outline_atomic_swp8_4.S.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/outline_atomic_helpers.dir/outline_atomic_ldadd1_1.S.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/outline_atomic_helpers.dir/outline_atomic_ldadd1_2.S.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/outline_atomic_helpers.dir/outline_atomic_ldadd1_3.S.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/outline_atomic_helpers.dir/outline_atomic_ldadd1_4.S.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/outline_atomic_helpers.dir/outline_atomic_ldadd2_1.S.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/outline_atomic_helpers.dir/outline_atomic_ldadd2_2.S.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/outline_atomic_helpers.dir/outline_atomic_ldadd2_3.S.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/outline_atomic_helpers.dir/outline_atomic_ldadd2_4.S.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/outline_atomic_helpers.dir/outline_atomic_ldadd4_1.S.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/outline_atomic_helpers.dir/outline_atomic_ldadd4_2.S.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/outline_atomic_helpers.dir/outline_atomic_ldadd4_3.S.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/outline_atomic_helpers.dir/outline_atomic_ldadd4_4.S.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/outline_atomic_helpers.dir/outline_atomic_ldadd8_1.S.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/outline_atomic_helpers.dir/outline_atomic_ldadd8_2.S.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/outline_atomic_helpers.dir/outline_atomic_ldadd8_3.S.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/outline_atomic_helpers.dir/outline_atomic_ldadd8_4.S.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/outline_atomic_helpers.dir/outline_atomic_ldclr1_1.S.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/outline_atomic_helpers.dir/outline_atomic_ldclr1_2.S.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/outline_atomic_helpers.dir/outline_atomic_ldclr1_3.S.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/outline_atomic_helpers.dir/outline_atomic_ldclr1_4.S.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/outline_atomic_helpers.dir/outline_atomic_ldclr2_1.S.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/outline_atomic_helpers.dir/outline_atomic_ldclr2_2.S.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/outline_atomic_helpers.dir/outline_atomic_ldclr2_3.S.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/outline_atomic_helpers.dir/outline_atomic_ldclr2_4.S.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/outline_atomic_helpers.dir/outline_atomic_ldclr4_1.S.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/outline_atomic_helpers.dir/outline_atomic_ldclr4_2.S.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/outline_atomic_helpers.dir/outline_atomic_ldclr4_3.S.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/outline_atomic_helpers.dir/outline_atomic_ldclr4_4.S.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/outline_atomic_helpers.dir/outline_atomic_ldclr8_1.S.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/outline_atomic_helpers.dir/outline_atomic_ldclr8_2.S.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/outline_atomic_helpers.dir/outline_atomic_ldclr8_3.S.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/outline_atomic_helpers.dir/outline_atomic_ldclr8_4.S.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/outline_atomic_helpers.dir/outline_atomic_ldeor1_1.S.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/outline_atomic_helpers.dir/outline_atomic_ldeor1_2.S.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/outline_atomic_helpers.dir/outline_atomic_ldeor1_3.S.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/outline_atomic_helpers.dir/outline_atomic_ldeor1_4.S.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/outline_atomic_helpers.dir/outline_atomic_ldeor2_1.S.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/outline_atomic_helpers.dir/outline_atomic_ldeor2_2.S.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/outline_atomic_helpers.dir/outline_atomic_ldeor2_3.S.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/outline_atomic_helpers.dir/outline_atomic_ldeor2_4.S.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/outline_atomic_helpers.dir/outline_atomic_ldeor4_1.S.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/outline_atomic_helpers.dir/outline_atomic_ldeor4_2.S.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/outline_atomic_helpers.dir/outline_atomic_ldeor4_3.S.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/outline_atomic_helpers.dir/outline_atomic_ldeor4_4.S.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/outline_atomic_helpers.dir/outline_atomic_ldeor8_1.S.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/outline_atomic_helpers.dir/outline_atomic_ldeor8_2.S.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/outline_atomic_helpers.dir/outline_atomic_ldeor8_3.S.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/outline_atomic_helpers.dir/outline_atomic_ldeor8_4.S.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/outline_atomic_helpers.dir/outline_atomic_ldset1_1.S.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/outline_atomic_helpers.dir/outline_atomic_ldset1_2.S.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/outline_atomic_helpers.dir/outline_atomic_ldset1_3.S.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/outline_atomic_helpers.dir/outline_atomic_ldset1_4.S.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/outline_atomic_helpers.dir/outline_atomic_ldset2_1.S.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/outline_atomic_helpers.dir/outline_atomic_ldset2_2.S.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/outline_atomic_helpers.dir/outline_atomic_ldset2_3.S.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/outline_atomic_helpers.dir/outline_atomic_ldset2_4.S.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/outline_atomic_helpers.dir/outline_atomic_ldset4_1.S.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/outline_atomic_helpers.dir/outline_atomic_ldset4_2.S.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/outline_atomic_helpers.dir/outline_atomic_ldset4_3.S.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/outline_atomic_helpers.dir/outline_atomic_ldset4_4.S.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/outline_atomic_helpers.dir/outline_atomic_ldset8_1.S.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/outline_atomic_helpers.dir/outline_atomic_ldset8_2.S.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/outline_atomic_helpers.dir/outline_atomic_ldset8_3.S.o CMakeFiles/clang_rt.builtins_arm64e_osx.dir/outline_atomic_helpers.dir/outline_atomic_ldset8_4.S.o
make[2]: Leaving directory `/opt/local/var/macports/build/_Users_blairzajac_Code_MacPorts_macports-ports.git_lang_llvm-12/clang-12/work/build'
[ 16%] Built target clang_rt.builtins_arm64e_osx
make[2]: Leaving directory `/opt/local/var/macports/build/_Users_blairzajac_Code_MacPorts_macports-ports.git_lang_llvm-12/clang-12/work/build'
[ 16%] Built target obj.llvm-tblgen
make[1]: Leaving directory `/opt/local/var/macports/build/_Users_blairzajac_Code_MacPorts_macports-ports.git_lang_llvm-12/clang-12/work/build'
make: *** [all] Error 2
make: Leaving directory `/opt/local/var/macports/build/_Users_blairzajac_Code_MacPorts_macports-ports.git_lang_llvm-12/clang-12/work/build'
Command failed:  cd "/opt/local/var/macports/build/_Users_blairzajac_Code_MacPorts_macports-ports.git_lang_llvm-12/clang-12/work/build" && /usr/bin/make -j16 -w all VERBOSE=ON 
Exit code: 2
Error: Failed to build clang-12: command execution failed
Error: See /opt/local/var/macports/logs/_Users_blairzajac_Code_MacPorts_macports-ports.git_lang_llvm-12/clang-12/main.log for details.
Error: Follow https://guide.macports.org/#project.tickets if you believe there is a bug.
Error: Processing of port clang-12 failed

If it matters, these are my variants:

-openldap
-prebuilt
+ares
+bash_completion
+clang12
+doc
+graphviz
+hdri
+icu
+jbig
+jpeg2
+ld64_xcode
+llvm12
+native
+nls
+openssl
+optimizations
+pango
+pear
+perl5_30
+pcre
+postgresql13
+python39
+readline
+rsvg
+svn
+ssl
+tools
+ucs4
+xcode

Change History (32)

comment:1 Changed 3 years ago by kencu (Ken)

hey blair, your log bit does not show what "error 1" is, but I'm sure I know what it is.

try use_parallel_build no, which fixes the build of compiler-rt on some systems.

for context as to why I don't want to put this into the portfile for everyone at present, see

https://trac.macports.org/ticket/63038

and in particular

https://trac.macports.org/ticket/63038#comment:23

comment:2 Changed 3 years ago by jmroot (Joshua Root)

Cc: jeremyhu added
Owner: set to kencu
Status: newassigned

comment:3 Changed 3 years ago by blair (Blair Zajac)

Looking through my entire log, I found this line 33% through the build:

make[1]: *** [projects/compiler-rt/lib/builtins/CMakeFiles/clang_rt.cc_kext_arm64e_osx.dir/all] Error 2

I can upload the entire file, it's 3 MB, I'm avoiding doing to not waste server space.

Thanks, adding use_parallel_build no got the build to work fine.

comment:4 Changed 3 years ago by kencu (Ken)

Summary: clang-12: build from source fails on 11.4clang-12: compiler-rt build sometimes fails parallel building

comment:5 Changed 3 years ago by kencu (Ken)

In a log like that, I search for "error 1".

The real error is usually just above that point in the log, depending on how many parallel processes were running.

Sometimes, the process that caused the error will be way before "error 1" shows up in the log, however -- it depends on how make has parallelized the jobs, and how long the others are until they are finished.

comment:6 Changed 3 years ago by blair (Blair Zajac)

Here's all the strings with Error:

$ grep Error clang-12
CMake Error: failed to create symbolic link '/opt/local/var/macports/build/_Users_blairzajac_Code_MacPorts_macports-ports.git_lang_llvm-12/clang-12/work/build/projects/compiler-rt/lib/builtins/outline_atomic_helpers.dir/outline_atomic_ldclr4_4.S': file already exists
make[2]: *** [projects/compiler-rt/lib/builtins/outline_atomic_helpers.dir/outline_atomic_ldclr4_4.S] Error 1
make[1]: *** [projects/compiler-rt/lib/builtins/CMakeFiles/clang_rt.cc_kext_arm64_osx.dir/all] Error 2
CMake Error: failed to create symbolic link '/opt/local/var/macports/build/_Users_blairzajac_Code_MacPorts_macports-ports.git_lang_llvm-12/clang-12/work/build/projects/compiler-rt/lib/builtins/outline_atomic_helpers.dir/outline_atomic_ldset1_2.S': file already exists
make[2]: *** [projects/compiler-rt/lib/builtins/outline_atomic_helpers.dir/outline_atomic_ldset1_2.S] Error 1
make[1]: *** [projects/compiler-rt/lib/builtins/CMakeFiles/clang_rt.cc_kext_arm64e_osx.dir/all] Error 2
make: *** [all] Error 2
Error: Failed to build clang-12: command execution failed
Error: See /opt/local/var/macports/logs/_Users_blairzajac_Code_MacPorts_macports-ports.git_lang_llvm-12/clang-12/main.log for details.
Error: Follow https://guide.macports.org/#project.tickets if you believe there is a bug.
Error: Processing of port clang-12 failed

comment:7 Changed 3 years ago by kencu (Ken)

Thanks. This is the key one, that suggested the error is the parallel building (which you proved by disabling it):

CMake Error: failed to create symbolic link '/opt/local/var/macports/build/_Users_blairzajac_Code_MacPorts_macports-ports.git_lang_llvm-12/clang-12/work/build/projects/compiler-rt/lib/builtins/outline_atomic_helpers.dir/outline_atomic_ldset1_2.S': file already exists

Last edited 3 years ago by kencu (Ken) (previous) (diff)

comment:8 Changed 3 years ago by kencu (Ken)

well now I am a bit confused, as all the Makefiles already have parallel building disabled, it appears:

# Allow only one "make -f Makefile2" at a time, but pass parallelism.
.NOTPARALLEL:

At this moment, I don't understand exactly what "but pass parallelism" exactly means here.

comment:9 Changed 3 years ago by kencu (Ken)

It looks like this error is not actually in make, but in cmake itself. cmake is symlinking files using a custom command to do it, and it seems like sometimes these trip over each other:

https://github.com/llvm/llvm-project/blob/4c92e31dd0f1bd152eda883af20ff7fbcaa14945/compiler-rt/lib/builtins/CMakeLists.txt#L534

how many cmake processes do we run? I thought only one, so I'm not sure as yet how this is colliding with itself.

comment:10 Changed 3 years ago by kencu (Ken)

It appears that when running a custom_command, cmake does not use dependency tracking and collisions can happen.

"Do not list the output in more than one independent target that may build in parallel or the two instances of the rule may conflict (instead use the add_custom_target() command to drive the command and make the other targets depend on that one)."

https://cmake.org/cmake/help/v3.19/command/add_custom_command.html

The workaround is to add_custom_target a dependency on the output of the custom command.

https://gist.github.com/socantre/7ee63133a0a3a08f3990

comment:11 Changed 3 years ago by kencu (Ken)

It seems I have enough now to report this upstream and see what comes back.

<https://lists.llvm.org/pipermail/llvm-dev/2021-July/151665.html>

comment:12 Changed 3 years ago by Ken <21211439+kencu@…>

Resolution: fixed
Status: assignedclosed

In c46123f200f0c300dfcec42c3b7bc83d6b8bd5fb/macports-ports (master):

clang-12: disable parallel building

I had hoped to be able to work through this until upstream fixes the race condition in compiler_rt, but the build fails for a fairly a small % of users on a consistent basis, and is failing on our 11.x builders.

closes: #63085

comment:13 Changed 3 years ago by mouse07410 (Mouse)

Ken, can you present this add_custom_target() in a patch form? (Especially since you probably keep the source tree?)

If so, there's a decent chance it would be reviewed and (hopefully!) committed upstream.

Thanks!

comment:14 Changed 3 years ago by mouse07410 (Mouse)

Ken, here's what I got on the llvm-dev mailing list:

I am not sure how that add_custom_target can help. Let's try run it during configuration time. Patch here: https://reviews.llvm.org/D106305

I don't know enough of the llvm dev environment to figure whether this change will run on their systems, or it's a suggestion for us to test. But would you be able to give it a try, so I can report there whether it addresses the problem or not? Thanks!

Last edited 3 years ago by mouse07410 (Mouse) (previous) (diff)

comment:15 Changed 3 years ago by kencu (Ken)

I don't seem to have any systems that show this parallel build error...

comment:16 Changed 3 years ago by kencu (Ken)

add_custom_target is the right fix I believe, but not the only fix.

comment:17 Changed 3 years ago by mouse07410 (Mouse)

I don't seem to have any systems that show this parallel build error...

What about Big Sur build-bots? If they successfully create clang-12 binaries - why am I unable to just download pre-built (which would be my preference)?

Would you be able to at least try what they suggested and see if it does not make things worse?

add_custom_target() is the right fix I believe, but not the only fix.

Understood. My goal is to make this fixed, somehow. If the upstream maintainers are at least willing to consider some fix, it would be great if the Macports team could validate it.

comment:18 Changed 3 years ago by kencu (Ken)

Mouse, all the buildbots have built clang-12.

https://packages.macports.org/clang-12/

I am not going to start throwing things at the buildbot and forcing everyone to try to build a possibly broken clang, as I'm sure you can appreciate.

As you are one of the only 2 people (with Blair) that reported errors, perhaps you might try it and tell upstream if it works.

comment:19 Changed 3 years ago by mouse07410 (Mouse)

Mouse, all the buildbots have built clang-12

Could you help then to figure out why "port install clang-12" does not download the pre-built package, but tries to re-build it locally from the source...?

comment:20 Changed 3 years ago by kencu (Ken)

sure, I'd be happy to help you with that. First, let's see if there is a problem.

The buildbot is only useful if you are using MacPorts' defaults, so that means your prefix is /opt/local and you have not made any modifications to variants.conf or macports.conf.

Then uninstall all copies of clang-12 that you have installed:

sudo port -f uninstall clang-12

if a list of installed clang-12 versions comes up, select all. When you are finished, this should show nothing installed:

port -v installed | grep clang-12

Then, force an installation of clang-12 from the buildbot. Don't force any variants, or you might not match the defaults:

sudo port -v -b install clang-12

and then, if you do not download and install a pre-built clang-12, please show us the error.

comment:21 Changed 3 years ago by mouse07410 (Mouse)

The buildbot is only useful if you are using MacPorts' defaults, so that means your prefix is /opt/local and you have not made any modifications to variants.conf or macports.conf.

Default location was not changed. variants.conf stays default.

macports.conf:

  • Added proxy configuration (being behind a corporate firewall);
  • After the LLVM-dev suggestion, disabled "universal" build, aka
    universal_archs
    

Once I reverted universal_archs to the default, port appeared to download the binary (yay!):

$ sudo port -f uninstall clang-12
--->  Deactivating clang-12 @12.0.1_0+analyzer+libstdcxx
--->  Cleaning clang-12
--->  Uninstalling clang-12 @12.0.1_0+analyzer+libstdcxx
--->  Cleaning clang-12
$ port -v installed | grep clang-12
$ sudo port -v -b install clang-12
--->  Computing dependencies for clang-12.
--->  Fetching archive for clang-12
--->  clang-12-12.0.1_0+analyzer+libstdcxx.darwin_20.x86_64.tbz2 doesn't seem to exist in /opt/local/var/macports/incoming/verified
--->  Attempting to fetch clang-12-12.0.1_0+analyzer+libstdcxx.darwin_20.x86_64.tbz2 from https://packages.macports.org/clang-12
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  109M  100  109M    0     0   787k      0  0:02:22  0:02:22 --:--:--  630k
--->  Attempting to fetch clang-12-12.0.1_0+analyzer+libstdcxx.darwin_20.x86_64.tbz2.rmd160 from https://packages.macports.org/clang-12
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   512  100   512    0     0   1471      0 --:--:-- --:--:-- --:--:--  1471
--->  Installing clang-12 @12.0.1_0+analyzer+libstdcxx
--->  Activating clang-12 @12.0.1_0+analyzer+libstdcxx
x ./
x ./+PORTFILE
x ./+CONTENTS
x ./+DESC
x ./+STATE
x ./opt/
x ./+COMMENT
x ./opt/local/
x ./opt/local/bin/
x ./opt/local/libexec/
x ./opt/local/etc/
x ./opt/local/etc/select/
.  .  .  .  .
x ./opt/local/bin/clang-check-mp-12
x ./opt/local/bin/clang-extdef-mapping-mp-12
x ./opt/local/bin/clang-change-namespace-mp-12
x ./opt/local/bin/scan-build-mp-12
--->  Cleaning clang-12
--->  Removing work directory for clang-12
--->  Scanning binaries for linking errors
--->  No broken files found.                             
--->  No broken ports found.
$ 

Thank you!!

I wonder if -b flag is necessary...

comment:22 Changed 3 years ago by kencu (Ken)

I have no idea what you mean by saying you "disabled universal_archs".

can you elaborate? What were you trying to do before?

(compiler_rt always builds universal on macOS no matter what you try to do yourself -- the people on the llvm mailing list might not have realized this).

comment:23 Changed 3 years ago by kencu (Ken)

Actually, perhaps it's better if we just drop it at this point and stop digging here. You got it working, and that is really all we care about :>.

comment:24 Changed 3 years ago by kencu (Ken)

Oh, I think I know what you meant. You disabled universal_archs in macports.conf.

Whatever MacPorts univeral_archs setting might be, compiler_rt in clang-12 has built universal anyway, I can guarantee it.

Last edited 3 years ago by kencu (Ken) (previous) (diff)

comment:25 Changed 3 years ago by mouse07410 (Mouse)

Oh, I think I know what you meant. You disabled universal_archs in macports.conf.

Yes. This is the relevant part of the modified macports.conf (that forced clang-12 re-build from sources):

# Space-delimited list of CPU architectures to target when building
# universal. Defaults to "i386 ppc" on Mac OS X 10.5 and earlier,
# "x86_64 i386" on Mac OS X 10.6 through macOS 10.13, "x86_64" on
# macOS 10.14 and 10.15 (these SDKs are not universal), and
# "arm64 x86_64" on macOS 11 and later. Set an empty value to disable
# universal building.
#universal_archs         arm64 x86_64
universal_archs

Whatever MacPorts univeral_archs setting might be, compiler_rt in clang-12 has built universal anyway, I can guarantee it.

Good to know, thanks!

comment:26 Changed 3 years ago by kencu (Ken)

You can put macports.conf back to the default.

Those universal_archs that are set in macports.conf had nothing whatsoever to do with you building clang-12 from source, which still has no explanation other than timing (ie you tried to install clang-12 before the buildbot was finished building it).

If you don't believe me, set the universal_archs back to the default, uninstall clang-12 again, and then reinstall it, with or without the -b.

(The -b just prevents MacPorts from building from source if the buildbot binary is not found).

Last edited 3 years ago by kencu (Ken) (previous) (diff)

comment:27 Changed 3 years ago by mouse07410 (Mouse)

You can put macports.conf back to the default.

I did. I suspect that's why it pulled the binaries OK now.

Those universal_archs that are set in macports.conf had nothing whatsoever to do with you building clang-12 from source, which still has no explanation other than timing (ie you tried to install clang-12 before the buildbot was finished building it).

Maybe it was the timing... I don't know.

Let's see if upstream applies that patch, and if it fixes the problem.

Also, they suggested that Macports consider moving Clang build from CMake to ninja. What do you think...?

Thanks!

comment:28 Changed 3 years ago by kencu (Ken)

We have considered switching to ninja. It is rather trivial to do, and in fact, I have the code in the clang-12 Portfile already, disabled:

# We can't use Ninja with our custom destrooting plan for llvm
#cmake.generator         Ninja

The problem is a lack of targets available during the build to use.

For ancient reasons, MacPorts installs llvm-12 as a separate port (to support cctools and ld64 and other ports that only want llvm without a full installation of everything in the llvm tree). We install lldb-12 separately (as most people don't want it, and many systems can't build it). And finally we install a clang-12 port, which is, for all intents and purposes, "everything else" -- clang, flang, flang supporting parts, compiler_rt, and now libc++/libc++abi that I added a while back, and maybe eventually libunwind, libc, and the rest of it too.

There are no targets to let me install "everything else" that can be found. So we have to use the Makefile build to allow us to control what gets installed by clang-12 by the custom destrooting phase you no doubt have looked at in the clang-12 Portfile (recently rewritten from scratch).

Our options to use Ninja are: stop doing our llvm-12/lldb-12/clang-12 ports the way we do them, or somehow install everything into the destroot with the clang-12 port, and then delete (through some mechanism) everything already installed by llvm-12.

It is possible there is some way we might find to do that latter thing, if we have no other choice available. Chris and I talked about this idea a few months ago. But every time you change anything, things can be a bit different and unexpected issues arise.

Look at what happened just by disabling the +analyzer, for example!

Last edited 3 years ago by kencu (Ken) (previous) (diff)

comment:29 Changed 3 years ago by mouse07410 (Mouse)

Oy... Did not realize that it would open such a Pandora box... Yes, I completely understand the concerns you expressed. Wish I knew what the best course would be... Thanks for explaining!

comment:30 Changed 3 years ago by kencu (Ken)

upstream has committed a proper fix for this:

https://github.com/llvm/llvm-project/commit/b31080c596246bc26d2493cfd5e07f053cf9541c#diff-41075bacada9ef13d442a98a6ab34ffd268a8d194be81a9263ce3772bfad8324

I can backport that into our clang-12 patches and then presumably re-enable parallel building.

comment:31 Changed 3 years ago by kencu (Ken)

In 21b7fa2221f34a0e96d35a3675f5ad93caf08c38/macports-ports (master):

clang-12: use upstream patch to reenable parallel building

see: #63085

comment:32 Changed 9 months ago by Chris Jones <jonesc@…>

In db162dd0110de0d9197d75dfc74a4388f5d1ae72/macports-ports (master):

LLVM 18: Switch to Ninja builds

Ninja is the build system upstream tests on Darwin,
so switching to it should reduce the likelihood of us
running into issues not seen upstream because of this.
See e.g. #63085
which reared its ugly head again with clang-18

Note: See TracTickets for help on using tickets.