Opened 10 years ago

Closed 10 years ago

#46355 closed defect (fixed)

clang-3.6 @3.6-r224827_0: build failure on OS X 10.9.5

Reported by: mopihopi Owned by: larryv (Lawrence Velázquez)
Priority: Normal Milestone:
Component: ports Version: 2.3.3
Keywords: Cc: jeremyhu (Jeremy Huddleston Sequoia)
Port: clang-3.6

Description

Upgrading to clang-3.6 @3.6-r224827_0 on OS X 10.9.5, a build failure is encountered:

$ sudo port upgrade clang-3.6
--->  Computing dependencies for clang-3.6
--->  Fetching archive for clang-3.6
--->  Attempting to fetch clang-3.6-3.6-r224827_0+analyzer+arm_runtime+assertions.darwin_13.x86_64.tbz2 from http://packages.macports.org/clang-3.6
--->  Attempting to fetch clang-3.6-3.6-r224827_0+analyzer+arm_runtime+assertions.darwin_13.x86_64.tbz2 from http://lil.fr.packages.macports.org/clang-3.6
--->  Attempting to fetch clang-3.6-3.6-r224827_0+analyzer+arm_runtime+assertions.darwin_13.x86_64.tbz2 from http://nue.de.packages.macports.org/macports/packages/clang-3.6
--->  Fetching distfiles for clang-3.6
--->  Verifying checksums for clang-3.6
--->  Extracting clang-3.6
--->  Applying patches to clang-3.6
--->  Configuring clang-3.6
--->  Building clang-3.6
Error: org.macports.build for port clang-3.6 returned: command execution failed
Please see the log file for port clang-3.6 for details:
    /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_llvm-3.6/clang-3.6/main.log
Error: Unable to upgrade port: 1
To report a bug, follow the instructions in the guide:
    http://guide.macports.org/#project.tickets
$ 
...
:info:build cp: /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_llvm-3.6/clang-3.6/work/trunk/tools/clang/runtime/compiler-rt/clang_darwin/eprintf/libcompiler_rt.a: No such file or directory
:info:build cp /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_llvm-3.6/clang-3.6/work/trunk/tools/clang/runtime/compiler-rt/clang_darwin/ubsan_osx/libcompiler_rt.a /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_llvm-3.6/clang-3.6/work/trunk/Release+Debug+Asserts/lib/clang/3.6.0/lib/darwin/libclang_rt.ubsan_osx.a
:info:build cp: /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_llvm-3.6/clang-3.6/work/trunk/tools/clang/runtime/compiler-rt/clang_darwin/osx/libcompiler_rt.a: No such file or directory
:info:build make[3]: *** [/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_llvm-3.6/clang-3.6/work/trunk/Release+Debug+Asserts/lib/clang/3.6.0/lib/darwin/libclang_rt.osx.a] Error 1
...

Uninstalling, cleaning, and then re-installing clang-3.6 results in the same error:

$ sudo port install clang-3.6
--->  Computing dependencies for clang-3.6
--->  Fetching archive for clang-3.6
--->  Attempting to fetch clang-3.6-3.6-r224827_0+analyzer+arm_runtime+assertions.darwin_13.x86_64.tbz2 from http://packages.macports.org/clang-3.6
--->  Attempting to fetch clang-3.6-3.6-r224827_0+analyzer+arm_runtime+assertions.darwin_13.x86_64.tbz2 from http://lil.fr.packages.macports.org/clang-3.6
--->  Attempting to fetch clang-3.6-3.6-r224827_0+analyzer+arm_runtime+assertions.darwin_13.x86_64.tbz2 from http://nue.de.packages.macports.org/macports/packages/clang-3.6
--->  Fetching distfiles for clang-3.6
--->  Verifying checksums for clang-3.6
--->  Extracting clang-3.6
--->  Applying patches to clang-3.6
--->  Configuring clang-3.6
--->  Building clang-3.6
Error: org.macports.build for port clang-3.6 returned: command execution failed
Please see the log file for port clang-3.6 for details:
    /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_llvm-3.6/clang-3.6/main.log
To report a bug, follow the instructions in the guide:
    http://guide.macports.org/#project.tickets
Error: Processing of port clang-3.6 failed
$ 

Attachments (2)

clang-3.6-upgrade.log (7.8 MB) - added by mopihopi 10 years ago.
clang-3.6 upgrade log
clang-3.6-install.log (7.9 MB) - added by mopihopi 10 years ago.
clang-3.6 install log

Change History (12)

Changed 10 years ago by mopihopi

Attachment: clang-3.6-upgrade.log added

clang-3.6 upgrade log

Changed 10 years ago by mopihopi

Attachment: clang-3.6-install.log added

clang-3.6 install log

comment:1 Changed 10 years ago by mf2k (Frank Schima)

Cc: jeremyhu@… removed
Owner: changed from macports-tickets@… to jeremyhu@…

comment:2 Changed 10 years ago by larryv (Lawrence Velázquez)

Cc: jeremyhu@… added; larryv@… removed
Owner: changed from jeremyhu@… to larryv@…
Status: newassigned

What’s the output of:

% xcrun --sdk macosx --show-sdk-path

comment:3 Changed 10 years ago by mopihopi

$ xcrun --sdk macosx --show-sdk-path
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk
$ 

comment:4 in reply to:  3 Changed 10 years ago by larryv (Lawrence Velázquez)

Try cleaning clang-3.6 and installing again. If it fails, could you post the output of this:

$ CLANG_SRC=$(port work clang-3.6)/trunk
$ $(CLANG_SRC)/Release+Debug+Asserts/bin/clang \
        -arch x86_64 -c -integrated-as \
        $(CLANG_SRC)/projects/compiler-rt/make/platform/clang_darwin_test_input.c \
        -isysroot $(xcrun --sdk macosx --show-sdk-path) -o /dev/null
$ echo $?

comment:5 Changed 10 years ago by mopihopi

Cleaning and installing again still fails. The output of the above commands (changing $(CLANG_SRC) to ${CLANG_SRC}):

$ CLANG_SRC=$(port work clang-3.6)/trunk
$ ${CLANG_SRC}/Release+Debug+Asserts/bin/clang -arch x86_64 -c -integrated-as ${CLANG_SRC}/projects/compiler-rt/make/platform/clang_darwin_test_input.c -isysroot $(xcrun --sdk macosx --show-sdk-path) -o /dev/null
clang(87405,0x7fff757c2310) malloc: *** error for object 0x7572742820302e36: pointer being freed was not allocated
*** set a breakpoint in malloc_error_break to debug
0  libLLVM-3.6svn.dylib     0x000000010a3e2386 llvm::sys::PrintStackTrace(__sFILE*) + 57
1  libLLVM-3.6svn.dylib     0x000000010a3e2873 SignalHandler(int) + 220
2  libsystem_platform.dylib 0x00007fff86ccb5aa _sigtramp + 26
3  libsystem_platform.dylib 0x00007fff57cc5128 _sigtramp + 3506412440
4  libsystem_c.dylib        0x00007fff85967b1a abort + 125
5  libsystem_malloc.dylib   0x00007fff8a70507f malloc_get_zone_name + 0
6  libLLVM-3.6svn.dylib     0x000000010a3e2fa7 llvm::SmallPtrSetImplBase::Grow(unsigned int) + 141
7  libLLVM-3.6svn.dylib     0x000000010a3e2ecd llvm::SmallPtrSetImplBase::insert_imp(void const*) + 153
8  clang                    0x0000000107fa5380 llvm::SmallPtrSetImpl<clang::DirectoryEntry const*>::insert(clang::DirectoryEntry const*) + 30
9  clang                    0x0000000107fa2f5d RemoveDuplicates(std::__1::vector<clang::DirectoryLookup, std::__1::allocator<clang::DirectoryLookup> >&, unsigned int, bool) + 338
10 clang                    0x0000000107fa13a0 clang::ApplyHeaderSearchOptions(clang::HeaderSearch&, clang::HeaderSearchOptions const&, clang::LangOptions const&, llvm::Triple const&) + 3644
11 clang                    0x0000000107f705eb clang::CompilerInstance::createPreprocessor(clang::TranslationUnitKind) + 1589
12 clang                    0x0000000107f96d41 clang::FrontendAction::BeginSourceFile(clang::CompilerInstance&, clang::FrontendInputFile const&) + 2223
13 clang                    0x0000000107f72ddd clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 535
14 clang                    0x0000000107f421a4 clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 3912
15 clang                    0x0000000107f3a73c cc1_main(llvm::ArrayRef<char const*>, char const*, void*) + 1068
16 clang                    0x0000000107f405e8 main + 8391
17 libdyld.dylib            0x00007fff925cf5fd start + 1
Stack dump:
0.	Program arguments: /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_llvm-3.6/clang-3.6/work/trunk/Release+Debug+Asserts/bin/clang -cc1 -triple x86_64-apple-macosx10.9.0 -emit-obj -mrelax-all -disable-free -main-file-name clang_darwin_test_input.c -mrelocation-model pic -pic-level 2 -mthread-model posix -mdisable-fp-elim -masm-verbose -munwind-tables -target-cpu core2 -target-linker-version 236.3 -dwarf-column-info -coverage-file /dev/null -resource-dir /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_llvm-3.6/clang-3.6/work/trunk/Release+Debug+Asserts/bin/../lib/clang/3.6.0 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk -fdebug-compilation-dir /tmp -ferror-limit 19 -fmessage-length 90 -stack-protector 1 -mstackrealign -fblocks -fobjc-runtime=macosx-10.9.0 -fencode-extended-block-signature -fmax-type-align=16 -fdiagnostics-show-option -fcolor-diagnostics -o /dev/null -x c /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_llvm-3.6/clang-3.6/work/trunk/projects/compiler-rt/make/platform/clang_darwin_test_input.c 
clang: error: unable to execute command: Abort trap: 6
clang: error: clang frontend command failed due to signal (use -v to see invocation)
clang version 3.6.0 (trunk 224827)
Target: x86_64-apple-darwin13.4.0
Thread model: posix
clang: note: diagnostic msg: PLEASE submit a bug report to http://llvm.org/bugs/ and include the crash backtrace, preprocessed source, and associated run script.
clang: error: unable to execute command: Abort trap: 6
clang: note: diagnostic msg: Error generating preprocessed source(s).
$ echo $?
254
$ 

comment:6 Changed 10 years ago by jeremyhu (Jeremy Huddleston Sequoia)

Resolution: invalid
Status: assignedclosed

Looks like heap corruption to me.

3rd party (upstream) to fix. Hopefully a newer svn revision will fix the issue for you. I'll update it next week some time. You might want to file a ticket at http://www.llvm.org/bugs with the information from your previous comment.

comment:7 Changed 10 years ago by mopihopi

Thanks. I changed the svn.revision from 224827 to 225216 in the Portfile, rebuilt llvm-3.6 and clang-3.6, and am no longer seeing the issue.

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

Great news. I'll make that change.

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

Resolution: invalid
Status: closedreopened

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

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