Opened 9 years ago

Closed 9 years ago

#47729 closed defect (fixed)

clang-3.7 @3.7-r235803_0: build failed asan_iossim_dynamic/x86_64/libcompiler_rt.dylib when xcode-4.x

Reported by: h.rayflood@… Owned by: jeremyhu (Jeremy Huddleston Sequoia)
Priority: Normal Milestone:
Component: ports Version: 2.3.3
Keywords: haspatch Cc:
Port: clang-3.7

Description

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.

Attachments (7)

osx-10.7_xcode-4.1_main.log.gz (504.8 KB) - added by h.rayflood@… 9 years ago.
osx-10.7_xcode-4.2_main.log.gz (515.2 KB) - added by h.rayflood@… 9 years ago.
osx-10.7_xcode-4.3_main.log.gz (515.3 KB) - added by h.rayflood@… 9 years ago.
osx-10.8_xcode-4.4_main.log.gz (515.3 KB) - added by h.rayflood@… 9 years ago.
osx-10.8_xcode-4.5_main.log.gz (515.6 KB) - added by h.rayflood@… 9 years ago.
osx-10.8_xcode-4.6_main.log.gz (515.9 KB) - added by h.rayflood@… 9 years ago.
clang-3.7-xcode4.diff (1.0 KB) - added by h.rayflood@… 9 years ago.

Change History (11)

Changed 9 years ago by h.rayflood@…

Changed 9 years ago by h.rayflood@…

Changed 9 years ago by h.rayflood@…

Changed 9 years ago by h.rayflood@…

Changed 9 years ago by h.rayflood@…

Changed 9 years ago by h.rayflood@…

comment:1 Changed 9 years ago by h.rayflood@…

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"

Changed 9 years ago by h.rayflood@…

Attachment: clang-3.7-xcode4.diff added

comment:2 Changed 9 years ago by h.rayflood@…

comment:3 Changed 9 years ago by ryandesign (Ryan Carsten Schmidt)

Keywords: haspatch added; xcode-4.x removed
Owner: changed from macports-tickets@… to jeremyhu@…
Port: clang-3.7 added

comment:8 Changed 9 years ago by jeremyhu (Jeremy Huddleston Sequoia)

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.