From owner-freebsd-arm@FreeBSD.ORG Sun Sep 15 22:48:31 2013 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id B49189EE for ; Sun, 15 Sep 2013 22:48:31 +0000 (UTC) (envelope-from paul@gromit.dlib.vt.edu) Received: from lennier.cc.vt.edu (lennier.cc.vt.edu [198.82.162.213]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 728762A30 for ; Sun, 15 Sep 2013 22:48:31 +0000 (UTC) Received: from mr2.cc.vt.edu (mr2.cc.vt.edu [198.82.163.74]) by lennier.cc.vt.edu (8.13.8/8.13.8) with ESMTP id r8FMlTrT020723; Sun, 15 Sep 2013 18:47:29 -0400 Received: from auth1.smtp.vt.edu (auth1.smtp.vt.edu [198.82.161.152]) by mr2.cc.vt.edu (8.14.4/8.14.4) with ESMTP id r8FMlTKd023271; Sun, 15 Sep 2013 18:47:29 -0400 Received: from gromit.chumby.lan (c-98-249-9-133.hsd1.va.comcast.net [98.249.9.133]) (authenticated bits=0) by auth1.smtp.vt.edu (8.14.4/8.14.4) with ESMTP id r8FMlSei003170 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO); Sun, 15 Sep 2013 18:47:29 -0400 Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 6.5 \(1508\)) Subject: Re: A successful native build using clang at last---just! From: Paul Mather In-Reply-To: <144C741C-550E-4874-9F10-093959204270@bsdimp.com> Date: Sun, 15 Sep 2013 18:47:28 -0400 Content-Transfer-Encoding: quoted-printable Message-Id: <621E74E9-602E-4005-B418-480C183B9D6D@gromit.dlib.vt.edu> References: <581873CA-BFB9-4287-9DFE-46A262B4459A@gromit.dlib.vt.edu> <48D945AB-1303-4ECB-9250-1DEA548FAECA@gromit.dlib.vt.edu> <144C741C-550E-4874-9F10-093959204270@bsdimp.com> To: Warner Losh X-Mailer: Apple Mail (2.1508) Cc: freebsd-arm X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 15 Sep 2013 22:48:31 -0000 On Sep 15, 2013, at 6:02 PM, Warner Losh wrote: >=20 > On Sep 15, 2013, at 3:52 PM, Paul Mather wrote: >=20 >> On Sep 15, 2013, at 5:34 PM, Warner Losh wrote: >>=20 >>> Do you have swap space configured? clang building clang takes a lot = of memory... >>=20 >> Yes, I have swap space configured (see item 2 below). It's on an = external USB drive (as are /usr/src and /usr/obj), and the swap = partition is 2 GB in size. >=20 > 2GB might not be enough... I always configure 6GB of swap, but I use = a sparse zerod file to do it. Might be worth a shot... True, it's worth a shot. I'll try adding more swap space, but I doubt = it will help. Looking at swap usage during the build, it never seems to = consume more than a few MB of swap, and has never come anywhere near = using the 2 GB that is already configured. It's odd, too, that 2 GB swap is enough to complete a native build on a = Raspberry Pi Model B and not a BeagleBone Black (both 512 MB RAM = systems). Also, as noted, processes appear to die when memory used by them is = paged back in, so I'm wondering if there's a bug in swap handling on = FreeBSD/arm to blame? Cheers, Paul. >=20 >> Note, this is a native build. I don't have problems cross-building = FreeBSD/arm using Crochet on FreeBSD/amd64. >=20 > Yea, amd64 machine likely has lots of memory... >=20 > Warner >=20 >> Cheers, >>=20 >> Paul. >>=20 >>>=20 >>> Warner >>>=20 >>>=20 >>> On Sep 15, 2013, at 3:19 PM, Paul Mather wrote: >>>=20 >>>> 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. >>>>=20 >>>> Here are some observations: >>>>=20 >>>> 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: >>>>=20 >>>> [[...]] >>>> 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/l >>>> egacy/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 = : parsing namespace = 'std' >>>> 3. /usr/include/c++/v1/locale:205:1 = : 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 >>>>=20 >>>> Stop. >>>> make[3]: stopped in /usr/src/lib/clang/libllvmtablegen >>>> *** Error code 1 >>>>=20 >>>> Stop. >>>> make[2]: stopped in /usr/src >>>> *** Error code 1 >>>>=20 >>>> Stop. >>>> make[1]: stopped in /usr/src >>>> *** Error code 1 >>>>=20 >>>> Stop. >>>> make: stopped in /usr/src >>>>=20 >>>> 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. >>>>=20 >>>> 3) FWIW, I am running with super pages enabled: = vm.pmap.sp_enabled=3D1. >>>>=20 >>>> Cheers, >>>>=20 >>>> Paul. >>>> _______________________________________________ >>>> freebsd-arm@freebsd.org mailing list >>>> http://lists.freebsd.org/mailman/listinfo/freebsd-arm >>>> To unsubscribe, send any mail to = "freebsd-arm-unsubscribe@freebsd.org" >>>=20 >>=20 >=20