Summary: | CLang 6.0.1 (Part of the System 12.0) can not Build CLang 8.0.1 from the Port Collection | ||||||
---|---|---|---|---|---|---|---|
Product: | Base System | Reporter: | CrazyMihey <CrazyMihey> | ||||
Component: | bin | Assignee: | Bugmeister <bugmeister> | ||||
Status: | Closed Overcome By Events | ||||||
Severity: | Affects Only Me | CC: | brooks, dim | ||||
Priority: | --- | ||||||
Version: | 12.0-RELEASE | ||||||
Hardware: | i386 | ||||||
OS: | Any | ||||||
See Also: | https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=246274 | ||||||
Attachments: |
|
Description
CrazyMihey
2019-11-27 12:45:31 UTC
Official packages are currently built on 12.0 so I suspect a local issue. Since you indicate that you are running on an i386 system it is likely that the compiler was killed by an out-of-memory or out-of-swap error. Please check dmesg or your logs for errors related to c++. As a workaround you might consider setting the BE_NATIVE option to disable the AArch64 backend. It will also save you a bit of compile time. dmesg | grep --extended-regexp --ignore-case --colour=Auto "(CC|C\+\+|Memory|Swap)" dmesg says «pid 54444 (c++), uid 0: exited on signal 6 (core dumped)», but unfortunately there is no Time specified. «/var/log/messages» contains the same Message: grep --extended-regexp --ignore-case --colour=Auto --bz2decompress "(CC|C\+\+|Memory|Swap)" /var/log/messages* ... Nov 27 12:12:37 CrazyServer kernel: pid 54444 (c++), uid 0: exited on signal 6 (core dumped) Nov 28 00:00:00 CrazyServer kernel: Accounting disabled Nov 28 00:00:02 CrazyServer kernel: Accounting enabled Does «signal 6» mean Out of Memory? Is It «SIGABRT», sent by Compiler to HimSelf? I did not find the Answer. One more Thing: I had «CFLAGS+=-march=native -O3 -pipe» in «/etc/make.conf». Maybe it is the Reason. Now I added next Lines: # Ошибка Сборки LLVM 8.0: HTTP://Bugs.FreeBSD.Org/bugzilla/show_bug.cgi?id=242266 .if ( ${.CURDIR:M*/devel/llvm80*} ) CFLAGS+= -O2 CXXFLAGS+= -O2 COPTFLAGS+= -O2 .endif and will Try again. This Time «portmaster -B -v -d --no-confirm --delete-packages -a» worked perfectly, but I also excluded some «Heavy» Ports (actially, from FFMPEG dependants). PortMaster worked without Building of «GCC 9» and «LLVM 8». Global System UpGrade to 12.1 is planned later... Machine has 2 GB of RAM and Top says: «Mem: 31M Active, 494M Inact, 288K Laundry, 528M Wired, 920M Free»; «Swap: 4096M Total, 16M Used, 4080M Free». The «BE_NATIVE» Option appeared only in LLVM and Clang 8.0.0.r1, but FreeBSD 12.0 had 6.0.1 Version. Thank You for Advices! P.S. The worst part is that My Atom N270 does not support x64 OSes :). It looks like you are tickling some old bug in 6.0.1 which makes it use way too much memory for this particular compile command. I tried on 12.0-RELEASE amd64 with a lot of RAM, and I got the following time(1) output: 84.83 real 31.36 user 53.31 sys 6560428 maximum resident set size 40472 average shared memory size 2587 average unshared data size 255 average unshared stack size 3201539 page reclaims 1370 page faults 0 swaps 1379 block input operations 5 block output operations 0 messages sent 0 messages received 0 signals received 1383 voluntary context switches 1152 involuntary context switches E.g, it needs 6.3 GiB of memory and more than a minute to compile. This is obviously never going to work on i386, which can use up to 4 GiB of memory for user processes. Compare this to clang 8.0.1 on recent stable/12: 23.17 real 18.12 user 3.36 sys 314944 maximum resident set size 42981 average shared memory size 358 average unshared data size 253 average unshared stack size 69152 page reclaims 1090 page faults 0 swaps 1100 block input operations 5 block output operations 3 messages sent 0 messages received 0 signals received 1105 voluntary context switches 346 involuntary context switches That needs only ~308 MiB of memory, and a little more than 20 seconds. I'm unsure what will help here. You could try leaving out the -march=native stuff, or lowering the optimization level. The former should be easy enough, but for the latter, I don't know how to achieve that with the port. Another alternative is to do a binary upgrade to 12.1-R, and work from there. Ok, I got It. Thank You very much for the Statistics 6.0.1 vs 8.0.1. I will make a Clean Install of 12.1 in some Days (just have no Time for Full ReInstall). Just for Fun: «Make BuildWorld» («-march=native -O3 -pipe» in Make.Conf) takes a bit more than 24 hours on this Book :) «-march=native» is very usefull for further Work and «-O3» makes a Good Profit on «i386» (even Simple Test with «UBench»), but actually No Profit on «AMD64». Maybe because all AMD64/EM64T CPUs can execute SSE2, but not all x86 can. ^Triage: close as OBE. I'm sorry that this PR never got looked at, but by now, 12.0R is long out of support. |