I tried to build clang-3.7 with xcode-4.1.
build failed and I got following error.
:info:build ld: library not found for -lc++
:info:build clang: error: linker command failed with exit code 1 (use -v to see invocation)
:info:build make[4]: *** [/s/macports_build/osx-10.7_xcode-4.1/_opt_gcc-mp_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_llvm-3.7/clang-3.7/work/trunk/tools/clang/runtime/compiler-rt/clang_darwin/asan_iossim_dynamic/i386/libcompiler_rt.dylib] Error 1
:info:build make[4]: *** Waiting for unfinished jobs....
:info:build ld: library not found for -lc++
:info:build clang: error: linker command failed with exit code 1 (use -v to see invocation)
:info:build make[4]: *** [/s/macports_build/osx-10.7_xcode-4.1/_opt_gcc-mp_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_llvm-3.7/clang-3.7/work/trunk/tools/clang/runtime/compiler-rt/clang_darwin/asan_iossim_dynamic/x86_64/libcompiler_rt.dylib] Error 1
:info:build Undefined symbols for architecture x86_64:
:info:build "typeinfo for __cxxabiv1::__class_type_info", referenced from:
:info:build __ubsan::checkDynamicType(void*, void*, unsigned long) in ubsan_type_hash.o
:info:build __ZL21isDerivedFromAtOffsetPKN10__cxxabiv117__class_type_infoES2_l in ubsan_type_hash.o
:info:build __ZL16findBaseAtOffsetPKN10__cxxabiv117__class_type_infoEl in ubsan_type_hash.o
:info:build "typeinfo for __cxxabiv1::__si_class_type_info", referenced from:
:info:build Undefined symbols for architecture x86_64h:
:info:build "typeinfo for __cxxabiv1::__class_type_info", referenced from:
:info:build Undefined symbols for architecture i386:
:info:build "typeinfo for __cxxabiv1::__class_type_info", referenced from:
:info:build __ZL21isDerivedFromAtOffsetPKN10__cxxabiv117__class_type_infoES2_l in ubsan_type_hash.o
:info:build __ZL16findBaseAtOffsetPKN10__cxxabiv117__class_type_infoEl in ubsan_type_hash.o
:info:build __ubsan::checkDynamicType(void*, void*, unsigned long) in ubsan_type_hash.o
:info:build __ZL21isDerivedFromAtOffsetPKN10__cxxabiv117__class_type_infoES2_l in ubsan_type_hash.o
:info:build __ZL16findBaseAtOffsetPKN10__cxxabiv117__class_type_infoEl in ubsan_type_hash.o
:info:build "typeinfo for __cxxabiv1::__vmi_class_type_info", referenced from:
:info:build "typeinfo for __cxxabiv1::__si_class_type_info", referenced from:
:info:build __ZL21isDerivedFromAtOffsetPKN10__cxxabiv117__class_type_infoES2_l in ubsan_type_hash.o
:info:build __ZL16findBaseAtOffsetPKN10__cxxabiv117__class_type_infoEl in ubsan_type_hash.o
:info:build __ZL21isDerivedFromAtOffsetPKN10__cxxabiv117__class_type_infoES2_l in ubsan_type_hash.o
:info:build __ZL16findBaseAtOffsetPKN10__cxxabiv117__class_type_infoEl in ubsan_type_hash.o
:info:build __ubsan::checkDynamicType(void*, void*, unsigned long) in ubsan_type_hash.o
:info:build __ZL21isDerivedFromAtOffsetPKN10__cxxabiv117__class_type_infoES2_l in ubsan_type_hash.o
:info:build __ZL16findBaseAtOffsetPKN10__cxxabiv117__class_type_infoEl in ubsan_type_hash.o
:info:build "typeinfo for std::type_info", referenced from:
:info:build "typeinfo for __cxxabiv1::__vmi_class_type_info", referenced from:
:info:build __ubsan::checkDynamicType(void*, void*, unsigned long) in ubsan_type_hash.o
:info:build "typeinfo for __cxxabiv1::__si_class_type_info", referenced from:
:info:build __ZL21isDerivedFromAtOffsetPKN10__cxxabiv117__class_type_infoES2_l in ubsan_type_hash.o
:info:build __ZL16findBaseAtOffsetPKN10__cxxabiv117__class_type_infoEl in ubsan_type_hash.o
:info:build "typeinfo for std::type_info", referenced from:
:info:build __ubsan::checkDynamicType(void*, void*, unsigned long) in ubsan_type_hash.o
:info:build __ZL21isDerivedFromAtOffsetPKN10__cxxabiv117__class_type_infoES2_l in ubsan_type_hash.o
:info:build __ZL16findBaseAtOffsetPKN10__cxxabiv117__class_type_infoEl in ubsan_type_hash.o
:info:build ld: symbol(s) not found for architecture x86_64
:info:build "typeinfo for __cxxabiv1::__vmi_class_type_info", referenced from:
:info:build ld: symbol(s) not found for architecture x86_64h
:info:build __ZL21isDerivedFromAtOffsetPKN10__cxxabiv117__class_type_infoES2_l in ubsan_type_hash.o
:info:build __ZL16findBaseAtOffsetPKN10__cxxabiv117__class_type_infoEl in ubsan_type_hash.o
:info:build "typeinfo for std::type_info", referenced from:
:info:build __ubsan::checkDynamicType(void*, void*, unsigned long) in ubsan_type_hash.o
:info:build clang: error: linker command failed with exit code 1 (use -v to see invocation)
:info:build clang: error: linker command failed with exit code 1 (use -v to see invocation)
:info:build ld: symbol(s) not found for architecture i386
:info:build make[4]: *** [/s/macports_build/osx-10.7_xcode-4.1/_opt_gcc-mp_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_llvm-3.7/clang-3.7/work/trunk/tools/clang/runtime/compiler-rt/clang_darwin/asan_osx_dynamic/x86_64/libcompiler_rt.dylib] Error 1
:info:build make[4]: *** [/s/macports_build/osx-10.7_xcode-4.1/_opt_gcc-mp_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_llvm-3.7/clang-3.7/work/trunk/tools/clang/runtime/compiler-rt/clang_darwin/asan_osx_dynamic/x86_64h/libcompiler_rt.dylib] Error 1
:info:build clang: error: linker command failed with exit code 1 (use -v to see invocation)
:info:build make[4]: *** [/s/macports_build/osx-10.7_xcode-4.1/_opt_gcc-mp_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_llvm-3.7/clang-3.7/work/trunk/tools/clang/runtime/compiler-rt/clang_darwin/asan_osx_dynamic/i386/libcompiler_rt.dylib] Error 1
:info:build make[4]: Leaving directory `/s/macports_build/osx-10.7_xcode-4.1/_opt_gcc-mp_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_llvm-3.7/clang-3.7/work/trunk/projects/compiler-rt'
:info:build make[3]: *** [BuildRuntimeLibraries] Error 2
I got similar error with xcode-4.2.1, 4.3.3, 4.4.1, 4.5.2, 4.6.3. xcode-5.0.1 build succeeded.
asan_iossim_dynamic/x86_64/libcompiler_rt.dylib is built for x86_64.
but xcode-4.* don't have x86_64 libc++.
on leopard, asan compiler_rt is disabled by leopard-no-asan.patch.
so, leopard-no-asan.patch is needed with xcode-4.* too.
and, leopard-no-asan.patch is pretty bad.
asan_iossim_dynamic and ubsan_iossim_dynamic is removed from Configs.
but not removed from RuntimeLibrary.darwin.Configs.
I think this misstake causes #47241 "cp: asan_iossim_dynamic/libcompiler_rt.dylib: No such file or directory"