Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 28 May 2017 11:34:57 -0300
From:      "Dr. Rolf Jansen" <rj@obsigna.com>
To:        freebsd-arm@freebsd.org
Subject:   Re: lldb on BeagleBone Black
Message-ID:  <1C1DA369-0BF1-4E22-A998-1E36CDC1A203@obsigna.com>
In-Reply-To: <8FDE5FCC-9BA8-4601-A32E-04FBAB5FFBEA@obsigna.com>
References:  <3DA2368D-AE7B-4D69-A634-2861D2EFA9AE@obsigna.com> <8FDE5FCC-9BA8-4601-A32E-04FBAB5FFBEA@obsigna.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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 <rj@obsigna.com>:
>=20
>> Am 09.01.2017 um 00:59 schrieb Dr. Rolf Jansen <rj@obsigna.com>:
>>=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.




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1C1DA369-0BF1-4E22-A998-1E36CDC1A203>