From owner-freebsd-arm@freebsd.org Sun May 28 14:35:04 2017 Return-Path: Delivered-To: freebsd-arm@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4E61CD85DD5 for ; Sun, 28 May 2017 14:35:04 +0000 (UTC) (envelope-from rj@obsigna.com) Received: from mo6-p00-ob.smtp.rzone.de (mo6-p00-ob.smtp.rzone.de [IPv6:2a01:238:20a:202:5300::8]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "*.smtp.rzone.de", Issuer "TeleSec ServerPass DE-2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D6C28121E for ; Sun, 28 May 2017 14:35:03 +0000 (UTC) (envelope-from rj@obsigna.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1495982101; l=3616; s=domk; d=obsigna.com; h=In-Reply-To:To:References:Date:Subject:Mime-Version: Content-Transfer-Encoding:Content-Type:From; bh=fT/a1bYhn14OJYDrdnVTMlexEExSE5wQ20laXSARlNI=; b=Zls3jUso79fnY8I84wM8GI/PC/W7NWIRarKNTyi49uCdX1gcC0aUngarOgxHXuQKae aVDYAKZPlCx6ZvJ0tQvV2hb5cQ52b6LJixkT3rbGaqIMh/caqfk2fahc935VLgaIi8CO UKAaRY3TU4986HzymSiJp0PjD8CNyuDfuRfUg= X-RZG-AUTH: :O2kGeEG7b/pS1EK7WHa0hxqKZr4lnx6UhT0M0o35iAdWtoM07Gt3wQHFGhIm99LihP4= X-RZG-CLASS-ID: mo00 Received: from mail.obsigna.com (bb02afdb.virtua.com.br [187.2.175.219]) by smtp.strato.de (RZmta 40.7 DYNA|AUTH) with ESMTPSA id j0108ct4SEZ04zC (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (curve secp521r1 with 521 ECDH bits, eq. 15360 bits RSA)) (Client did not present a certificate) for ; Sun, 28 May 2017 16:35:00 +0200 (CEST) Received: from rolf.projectworld.net (rolf.projectworld.net [192.168.222.15]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.obsigna.com (Postfix) with ESMTPSA id 1F5C976F0B55 for ; Sun, 28 May 2017 11:34:58 -0300 (BRT) From: "Dr. Rolf Jansen" Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\)) Subject: Re: lldb on BeagleBone Black Date: Sun, 28 May 2017 11:34:57 -0300 References: <3DA2368D-AE7B-4D69-A634-2861D2EFA9AE@obsigna.com> <8FDE5FCC-9BA8-4601-A32E-04FBAB5FFBEA@obsigna.com> To: freebsd-arm@freebsd.org In-Reply-To: <8FDE5FCC-9BA8-4601-A32E-04FBAB5FFBEA@obsigna.com> Message-Id: <1C1DA369-0BF1-4E22-A998-1E36CDC1A203@obsigna.com> X-Mailer: Apple Mail (2.3273) X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 May 2017 14:35:04 -0000 This is only a follow-up notice. I reliably managed to build (lldb + clang/lld) from the svn trunk of = LLVM 5.0.0 on my Beaglebone Black running the latest snapshot (May 20th) = of FreeBSD 12.0-CURRENT, and the lldb is working very well, and this = includes single stepping and ncurses-GUI mode, while single stepping = with the latest lldb 4.0.1 from the ports does not work. In order to reliably build LLVM 5.0.0 (svn), I set up a 1 GB swap = partition for the BBB on a NFSv4 share on a FreeBSD fileserver in my = network - I put a howto of the procedure on my BLog: https://obsigna.net/?p=3D659 Eventually this prevents, that building LLVM fails because of job = running out of memory was killed. The build directory resides on a NFSv4 share on that fileserver as well = =E2=80=93 note, NFSv3 gives errors with subversion. The prerequesites on the Beaglebone are: # pkg install tmux # pkg install cmake # pkg install python # pkg install libxml2 # pkg install swig30 # pkg install ninja # pkg install subversion On the FreeBSD fileserver: # /path_to_the/bbb_share # svn co http://llvm.org/svn/llvm-project/llvm/trunk llvm # cd llvm/tools # svn co http://llvm.org/svn/llvm-project/cfe/trunk clang # svn co http://llvm.org/svn/llvm-project/lld/trunk lld # svn co http://llvm.org/svn/llvm-project/lldb/trunk lldb On the Beaglebone Black: # mount_nfs -o noatime,readahead=3D4,intr,soft,nfsv4 = server:/path_to_the/bbb_share /mnt # cd /mnt # mkdir build # cmake -DLLVM_TARGETS_TO_BUILD=3D"ARM" -DCMAKE_BUILD_TYPE=3D"MinSizeRel" = \ -DLLVM_PARALLEL_COMPILE_JOBS=3D"1" -DLLVM_PARALLEL_LINK_JOBS=3D"1"= -G Ninja .. I execute the actual build command from within a tmux session, so I may = disconnect during the quite long (40 h) build: # tmux new "ninja lldb install" When debugging in GUI mode using the newly build lldb 5.0.0-svn, I see = only a minor issue, namely UTF8 strings are not displayed correctly. = This happens in the ncurses-GUI only, and this is an ARM issue, since it = does not occur on x86 machines. Perhaps this might be related to the = signed/unsigned char mismatch between ARM and x86. Best regards Rolf > Am 11.01.2017 um 11:20 schrieb Dr. Rolf Jansen : >=20 >> Am 09.01.2017 um 00:59 schrieb Dr. Rolf Jansen : >>=20 >> I am running FreeBSD 12.0-CURRENT (BEAGLEBONE) #0 r311461: Fri Jan 6 = 03:13:01 UTC 2017 >>=20 >> Does any of the llvm ports build on the BBB? I am looking for a = working lldb, and pre-build packages are not available, and I fear there = is a certain reason why not -- perhaps build failures? >>=20 >> Therefore, is it actually possible to obtain a working lldb (with gui = option) for armv6 by building e.g. devel/llvm-devel on my BeagleBone = Black? >>=20 >> Which of the llvm-ports would be most promising? >=20 > I tried building devel/llvm-devel having the ports tree attached on a = fast USB disk. After 36 h of building it bailed out because of some = obscure error in the AArch64 code generator. >=20 > Finally, I don't think that building any LLVM port is viable on the = BBB, first because building takes forever. The BBB needs 1 minute for = compiling a C++ file which got only 20 lines of code. Of course this = comes because the C++ experts tend for some ingenious reasons to hide = all the implementations into the headers which need then to be compiled = again and again. Second, it doesn't make sense at all to build LLVM for = all the possible targets on a machine which I will never ever use for = cross-development.