Opened 10 years ago

Closed 10 years ago

#46599 closed defect (fixed)

clang-3.6 @3.6-r226372_0 fails building on 10.6.8

Reported by: udbraumann Owned by: jeremyhu (Jeremy Huddleston Sequoia)
Priority: Normal Milestone:
Component: ports Version: 2.3.3
Keywords: Cc:
Port: clang-3.6

Description

While upgrading clang from @3.6-r225216_0 to @3.6-r226372_0 lipo issues the following error:

:info:build lipo -create -output /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_llvm-3.6/clang-3.6/work/release_36/tools/clang/runtime/compiler-rt/clang_darwin/osx/libcompiler_rt.a /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_llvm-3.6/clang-3.6/work/release_36/tools/clang/runtime/compiler-rt/clang_darwin/osx/i386/libcompiler_rt.a /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_llvm-3.6/clang-3.6/work/release_36/tools/clang/runtime/compiler-rt/clang_darwin/osx/x86_64/libcompiler_rt.a /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_llvm-3.6/clang-3.6/work/release_36/tools/clang/runtime/compiler-rt/clang_darwin/osx/i386/libcompiler_rt.a /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_llvm-3.6/clang-3.6/work/release_36/tools/clang/runtime/compiler-rt/clang_darwin/osx/x86_64/libcompiler_rt.a
:info:build fatal error: lipo: /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_llvm-3.6/clang-3.6/work/release_36/tools/clang/runtime/compiler-rt/clang_darwin/osx/i386/libcompiler_rt.a and /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_llvm-3.6/clang-3.6/work/release_36/tools/clang/runtime/compiler-rt/clang_darwin/osx/i386/libcompiler_rt.a have the same architectures (i386) and can't be in the same fat output file

Attachments (1)

main.log.gz (444.2 KB) - added by udbraumann 10 years ago.

Download all attachments as: .zip

Change History (8)

Changed 10 years ago by udbraumann

Attachment: main.log.gz added

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

Yeah. It looks like a regression in compiler-rt's Makefile. It built fine on Lion+ though.

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

However, I don't actually see any differences in the Makefiles in compiler-rt between those revisions ... odd...

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

3.7 is also affected: http://build.macports.org/builders/buildports-snowleopard-x86_64/builds/33129

Lion+ buildbots are all ok.

My Leopard VM built it ok.

comment:4 Changed 10 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: jeremyhu@… removed
Keywords: lipo architecture i386 fat output file removed
Owner: changed from macports-tickets@… to jeremyhu@…
Summary: clang @3.6-r226372_0 fails building on 10.6.8clang-3.6 @3.6-r226372_0 fails building on 10.6.8

comment:5 in reply to:  3 Changed 10 years ago by udbraumann

My Leopard VM built it ok.

I guess you are talking about Leopard on Intel. Since both 3.5 and 3.6 (and probably upcoming 3.7) in turn require 3.4 for building, the latter should work productively. After I successfully had build 3.4 on Leopard (PPC) my basic "Hello, world" one liner test failed (last clang version it was working was 3.1):

$ printf '#include<stdio.h> \n int main(void) {fprintf(stderr,"Hello, world\\n");}' | clang-mp-3.4 -arch ppc -xc -o out.exe - && ./out.exe
clang(39479) malloc: *** error for object 0xa02a6708: Non-aligned pointer being freed
*** set a breakpoint in malloc_error_break to debug
...
<dozens of such "Non-aligned pointer being freed" messages>
...
ld: absolute address to symbol ___stderrp in a different linkage unit not supported in _main from /var/folders/fH/fHv2DgyLHvS8wcc5wmXwHU+++TM/-Tmp-/--855242.o
collect2: ld returned 1 exit status
clang: error: linker (via gcc) command failed with exit code 1 (use -v to see invocation)

As I have read somewhere that PPC support has much improved in 3.6 (I think since the llvm people now have started focusing again on PPC), I wonder how 3.6 can be built on PPC, if it relies on 3.4, which is not usable on PPC. 3.4 itself only requires apple gcc 4.2, I think. For the moment I better do not open a new ticket for the 3.4 problems on PPC, ok?

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

You should look at the wiki page I stared to track effort in that area:

http://trac.macports.org/wiki/LibcxxOnOlderSystems

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

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