Toolchain build error


(Dinesh) #1

When building the freedom-u-sdk toolchain on Ubuntu 18.04 LTS, I get this error:

$ make
make -C /home/dt/f/freedom-u-sdk/buildroot RISCV=/home/dt/f/freedom-u-sdk/toolchain PATH=/home/dt/f/freedom-u-sdk/toolchain/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin O=/home/dt/f/freedom-u-sdk/work/buildroot_initramfs
make[1]: Entering directory ‘/home/dt/f/freedom-u-sdk/buildroot’
>>> libtirpc 1.0.1 Configuring
>>> libtirpc 1.0.1 Autoreconfiguring
libtoolize: putting auxiliary files in ‘.’.
libtoolize: copying file ‘./ltmain.sh’
libtoolize: putting macros in AC_CONFIG_MACRO_DIRS, ‘m4’.
libtoolize: copying file ‘m4/libtool.m4’
libtoolize: copying file ‘m4/ltoptions.m4’
libtoolize: copying file ‘m4/ltsugar.m4’
libtoolize: copying file ‘m4/ltversion.m4’
libtoolize: copying file ‘m4/lt~obsolete.m4’
Unescaped left brace in regex is illegal here in regex; marked by <-- HERE in m/${ <-- HERE ([^ \t=:+{}]+)}/ at /home/dt/f/freedom-u-sdk/work/buildroot_initramfs/host/usr/bin/automake line 3936.
autoreconf: /home/dt/f/freedom-u-sdk/work/buildroot_initramfs/host/usr/bin/automake failed with exit status: 255
package/pkg-generic.mk:185: recipe for target ‘/home/dt/f/freedom-u-sdk/work/buildroot_initramfs/build/libtirpc-1.0.1/.stamp_configured’ failed
make[1]: *** [/home/dt/f/freedom-u-sdk/work/buildroot_initramfs/build/libtirpc-1.0.1/.stamp_configured] Error 1
make[1]: Leaving directory ‘/home/dt/f/freedom-u-sdk/buildroot’
Makefile:90: recipe for target ‘/home/dt/f/freedom-u-sdk/work/buildroot_initramfs/images/rootfs.tar’ failed
make: *** [/home/dt/f/freedom-u-sdk/work/buildroot_initramfs/images/rootfs.tar] Error 2
$


(Jim Wilson) #2

freedom-u-sdk builds on Ubuntu 16.04. It does not build on Ubuntu 18.04 without patches to fix versioning problems. If you cd into buildroot, and checkout the sifive branch, you can get the patch you need to make it build on Ubuntu 18.04. It is the last commit on the sifive branch. At least I think that is the only patch you need. I haven’t tested this recently.


(Dinesh) #3

Thanks a lot, Jim.


(Dinesh) #4

I switched buildroot to the sifive branch. I still get the same error when running make from freedom-u-sdk.
It is the only error. make -k completes fine. I had to install autotools-dev on Ubuntu 18.

Applying 0005-Add-more-XDR-files-needed-to-build-rpcbind-on-top-of.patch using patch:
patching file Makefile.am
patching file tirpc/rpcsvc/mount.x
patching file tirpc/rpcsvc/nfs_prot.x
patching file tirpc/rpcsvc/rquota.x

Applying 0006-Disable-DES-authentification-support.patch using patch:
patching file src/Makefile.am
patching file src/svc_auth.c
patching file src/rpc_soc.c

Applying 0007-Add-missing-rwlock_unlocks-in-xprt_register.patch using patch:
patching file src/svc.c

Applying 0008-include-stdint.h-for-uintptr_t.patch using patch:
patching file src/xdr_sizeof.c
>>> libtirpc 1.0.1 Updating config.sub and config.guess
for file in config.guess config.sub; do for i in $(find /home/dt/f/freedom-u-sdk/work/buildroot_initramfs/build/libtirpc-1.0.1 -name $file); do cp support/gnuconfig/$file $i; done; done
>>> libtirpc 1.0.1 Configuring
>>> libtirpc 1.0.1 Autoreconfiguring
libtoolize: putting auxiliary files in ‘.’.
libtoolize: copying file ‘./ltmain.sh’
libtoolize: putting macros in AC_CONFIG_MACRO_DIRS, ‘m4’.
libtoolize: copying file ‘m4/libtool.m4’
libtoolize: copying file ‘m4/ltoptions.m4’
libtoolize: copying file ‘m4/ltsugar.m4’
libtoolize: copying file ‘m4/ltversion.m4’
libtoolize: copying file ‘m4/lt~obsolete.m4’
Unescaped left brace in regex is illegal here in regex; marked by <-- HERE in m/${ <-- HERE ([^ \t=:+{}]+)}/ at /home/dt/f/freedom-u-sdk/work/buildroot_initramfs/host/usr/bin/automake line 3936.
autoreconf: /home/dt/f/freedom-u-sdk/work/buildroot_initramfs/host/usr/bin/automake failed with exit status: 255
package/pkg-generic.mk:185: recipe for target ‘/home/dt/f/freedom-u-sdk/work/buildroot_initramfs/build/libtirpc-1.0.1/.stamp_configured’ failed
make[1]: *** [/home/dt/f/freedom-u-sdk/work/buildroot_initramfs/build/libtirpc-1.0.1/.stamp_configured] Error 1
make[1]: Leaving directory ‘/home/dt/f/freedom-u-sdk/buildroot’
Makefile:90: recipe for target ‘/home/dt/f/freedom-u-sdk/work/buildroot_initramfs/images/rootfs.tar’ failed
make: *** [/home/dt/f/freedom-u-sdk/work/buildroot_initramfs/images/rootfs.tar] Error 2
$ cd buildroot
$ git branch -a
master

  • sifive
    remotes/origin/HEAD -> origin/master
    remotes/origin/master
    remotes/origin/sifive
    remotes/origin/sifive-next
    $ git log | head -5
    commit dfc15319532373fb8cea6b67edfd7f16c366d188
    Author: Palmer Dabbelt palmer@dabbelt.com
    Date: Thu Dec 14 15:50:20 2017 -0800

    Add tyrquake, an open source quake 1 implementation
    $