Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 15 Sep 2013 17:19:21 -0400
From:      Paul Mather <paul@gromit.dlib.vt.edu>
To:        freebsd-arm <freebsd-arm@freebsd.org>
Subject:   A successful native build using clang at last---just!
Message-ID:  <581873CA-BFB9-4287-9DFE-46A262B4459A@gromit.dlib.vt.edu>

next in thread | raw e-mail | index | archive | help
After quite a bit of trying, I finally was able to complete a native =
build and upgrade using clang on FreeBSD/arm.  I used r255420 as the =
build platform and was able to upgrade to r255586 on my Raspberry Pi.

Here are some observations:

1) For some reason this same upgrade failed on my BeagleBone Black (also =
running r255420).  It fails early on with this error and doesn't get =
past it:

[[...]]
c++  -O -pipe =
-I/usr/src/lib/clang/libllvmtablegen/../../../contrib/llvm/include =
-I/usr/src/lib/clang/libllvmtablegen/../../../contrib/llvm/tools/clang/inc=
lude =
-I/usr/src/lib/clang/libllvmtablegen/../../../contrib/llvm/lib/TableGen =
-I. =
-I/usr/src/lib/clang/libllvmtablegen/../../../contrib/llvm/../../lib/clang=
/include -DLLVM_ON_UNIX -DLLVM_ON_FREEBSD -D__STDC_LIMIT_MACROS =
-D__STDC_CONSTANT_MACROS -fno-strict-aliasing =
-DLLVM_DEFAULT_TARGET_TRIPLE=3D\"armv6-gnueabi-freebsd10.0\" =
-DLLVM_HOST_TRIPLE=3D\"armv6-unknown-freebsd10.0\" =
-DDEFAULT_SYSROOT=3D\"\" -I/usr/obj/usr/src/tmp/legacy/usr/include =
-Wno-c++11-extensions -fno-exceptions -fno-rtti -c =
/usr/src/lib/clang/libllvmtablegen/../../../contrib/llvm/lib/TableGen/TGPa=
rser.cpp -o TGParser.o
Assertion failed: (!FoundVal && "Key already in new map?"), function =
moveFromOldBuckets, file =
/usr/src/lib/clang/libclangast/../../../contrib/llvm/include/llvm/ADT/Dens=
eMap.h, line 289.
Stack dump:
0.	Program arguments: /usr/bin/c++ -cc1 -triple =
armv6--freebsd10.0-gnueabi -S -disable-free -main-file-name TGParser.cpp =
-mrelocation-model static -mdisable-fp-elim -relaxed-aliasing =
-mconstructor-aliases -target-abi aapcs-linux -target-cpu arm1136jf-s =
-msoft-float -mfloat-abi soft -target-feature +soft-float =
-target-feature +soft-float-abi -target-feature -neon -coverage-file =
/tmp/TGParser-KtbaOq.s -resource-dir /usr/bin/../lib/clang/3.3 -D =
LLVM_ON_UNIX -D LLVM_ON_FREEBSD -D __STDC_LIMIT_MACROS -D =
__STDC_CONSTANT_MACROS -D =
LLVM_DEFAULT_TARGET_TRIPLE=3D"armv6-gnueabi-freebsd10.0" -D =
LLVM_HOST_TRIPLE=3D"armv6-unknown-freebsd10.0" -D DEFAULT_SYSROOT=3D"" =
-I /usr/src/lib/clang/libllvmtablegen/../../../contrib/llvm/include -I =
/usr/src/lib/clang/libllvmtablegen/../../../contrib/llvm/tools/clang/inclu=
de -I =
/usr/src/lib/clang/libllvmtablegen/../../../contrib/llvm/lib/TableGen -I =
. -I =
/usr/src/lib/clang/libllvmtablegen/../../../contrib/llvm/../../lib/clang/i=
nclude -I /usr/obj/usr/src/tmp/legacy/usr/include -internal-isystem =
/usr/include/c++/v1 -O2 -Wno-c++11-extensions -fdeprecated-macro =
-fno-dwarf-directory-asm -fdebug-compilation-dir =
/usr/obj/usr/src/tmp/usr/src/lib/clang/libllvmtablegen -ferror-limit 19 =
-fmessage-length 0 -mstackrealign -fno-rtti -fno-signed-char =
-fobjc-runtime=3Dgnustep -fobjc-default-synthesize-properties =
-fdiagnostics-show-option -backend-option -vectorize-loops -o =
/tmp/TGParser-KtbaOq.s -x c++ =
/usr/src/lib/clang/libllvmtablegen/../../../contrib/llvm/lib/TableGen/TGPa=
rser.cpp=20
1.	/usr/include/c++/v1/locale:3072:48: current parser token 'init'
2.	/usr/include/c++/v1/locale:205:1 =
<Spelling=3D/usr/include/c++/v1/__config:321:37>: parsing namespace =
'std'
3.	/usr/include/c++/v1/locale:205:1 =
<Spelling=3D/usr/include/c++/v1/__config:321:59>: parsing namespace =
'__1'
c++: error: unable to execute command: Abort trap (core dumped)
c++: error: clang frontend command failed due to signal (use -v to see =
invocation)
FreeBSD clang version 3.3 (tags/RELEASE_33/final 183502) 20130610
Target: armv6--freebsd10.0-gnueabi
Thread model: posix
c++: note: diagnostic msg: PLEASE submit a bug report to =
http://llvm.org/bugs/ and include the crash backtrace, preprocessed =
source, and associated run script.
c++: note: diagnostic msg: Error generating preprocessed source(s).
*** Error code 254

Stop.
make[3]: stopped in /usr/src/lib/clang/libllvmtablegen
*** Error code 1

Stop.
make[2]: stopped in /usr/src
*** Error code 1

Stop.
make[1]: stopped in /usr/src
*** Error code 1

Stop.
make: stopped in /usr/src

2) The successful upgrade on Raspberry Pi had to be restarted a couple =
of times (using -DNO_CLEAN) due to hangs.  I have noticed problems with =
the system when swap is used.  Paging out to swap seems okay, but =
processes appear to die when they are paged back in from swap.  =
Sometimes, this hangs the system.

3) FWIW, I am running with super pages enabled: vm.pmap.sp_enabled=3D1.

Cheers,

Paul.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?581873CA-BFB9-4287-9DFE-46A262B4459A>