Hi Siwei,

I have removed libarchive from python2 and installed libarchive-c with python3.  seL4Test is up and running.

Many thanks.

Best,


Jacob



On Wed, Nov 13, 2019 at 9:19 PM Zhuang, Siwei (Data61, Kensington NSW) <Siwei.Zhuang@data61.csiro.au> wrote:
It looks like either you're using the libarchive in python2 or the package is
outdated.

Try something like,
    pip3 install libarchive --upgrade

You may need to remove the libarchive from python2, although seL4test
requires both python2 and 3.

Regards,
Siwei

On Wed, 2019-11-13 at 20:26 -0800, Jacob Yu wrote:
> Thanks, Siwei.
>
> After I have done a clean build (by removing previous installation in
> "/opt/riscv"), I am able to enable "multilib" when building
> "riscv-gnu-toolchain" successfully.  I also found out that I needed to
> build Newlib.
>
> I can now run " ../init-build.sh -DPLATFORM=spike -DRISCV64=TRUE
> -DSIMULATION=1" in the build directory under seL4Test but still failed in
> ninja:
>
> [1/20] Generating gen_headers/image_start_addr.h
> FAILED: elfloader/gen_headers/image_start_addr.h
> cd /home/webuser/Dev/l4/l4dev/seL4test/cbuild/elfloader && sh -c
> "/home/webuser/Dev/l4/l4dev/seL4test/tools/seL4/elfloader-tool/../cmake-
> tool/helpers/shoehorn.py
> /home/webuser/Dev/l4/l4dev/seL4test/cbuild/kernel/gen_headers/plat/machine/p
> latform_gen.yaml
> /home/webuser/Dev/l4/l4dev/seL4test/cbuild/elfloader/archive.o >
> /home/webuser/Dev/l4/l4dev/seL4test/cbuild/elfloader/gen_headers//image_star
> t_addr.h"
> Traceback (most recent call last):
>   File
> "/home/webuser/Dev/l4/l4dev/seL4test/tools/seL4/elfloader-tool/../cmake-
> tool/helpers/shoehorn.py",
> line 81, in <module>
>     def get_bytes(entry: libarchive.entry.ArchiveEntry) -> io.BytesIO:
> AttributeError: module 'libarchive' has no attribute 'entry'
> ninja: build stopped: subcommand failed.
>
> Thank again for all the help.
>
> Regards,
>
>
> Jacob
>
> On Tue, Nov 12, 2019 at 4:37 PM Zhuang, Siwei (Data61, Kensington NSW) <
> Siwei.Zhuang@data61.csiro.au> wrote:
>
> > Hi Jacob,
> >
> > Never had this problem before, so just a blind guess.
> >
> > As you can build "riscv-pk", you must be using the cross compiler from
> > your
> > previous build(with multilib disabled). Try removing the previous
> > installation in "/opt/riscv", and also do "make clean" to remove all the
> > previous build directories.
> >
> > I noticed that the log you attached says "Checking whether the C compiler
> > works ... no", have a look at "config.log" to see if there's any useful
> > info.
> >
> > Also make sure you have enough disk space, my build takes 21GB.
> >
> > Regards,
> > Siwei
> >
> > On Tue, 2019-11-12 at 11:31 -0800, Jacob Yu wrote:
> > > Hi
> > >
> > > I am able to install & build "riscv-pk" and "riscv-isa-sim", and then
> > > try
> > > out Spike.  Many thank!
> > >
> > > > ./configure --prefix=/opt/riscv --enable-multilib
> > > > sudo make linux
> > > Otherwise, I also tried to enable "multilib" when building
> > > "riscv-gnu-toolchain" but with no luck. It complained:
> > >
> > > > ...
> > > > configure: error: in
> > > `/home/webuser/Dev/risc-v/riscv-gnu-toolchain/build-gcc-linux-
> > > stage2/riscv64-unknown-linux-gnu/lib32/ilp32/libgomp':
> > > > configure: error: C compiler cannot create executables
> > >
> > > And make failed with:
> > >
> > > > Makefile:13703: recipe for target 'configure-target-libgomp' failed
> > > > make[2]: *** [configure-target-libgomp] Error 1
> > >
> > > Again, any suggestions?
> > >
> > > Regards,
> > >
> > >
> > > Jacob
> > > ============================================================
> > > ...
> > > checking for riscv64-unknown-linux-gnu-gcc...
> > > /home/webuser/Dev/risc-v/riscv-gnu-toolchain/build-gcc-linux-
> > > stage2/./gcc/xgcc
> > >
> > -B/home/webuser/Dev/risc-v/riscv-gnu-toolchain/build-gcc-linux-
> > stage2/./gcc/
> > > -B/opt/riscv/riscv64-unknown-linux-gnu/bin/
> > > -B/opt/riscv/riscv64-unknown-linux-gnu/lib/ -isystem
> > > /opt/riscv/riscv64-unknown-linux-gnu/include -isystem
> > > /opt/riscv/riscv64-unknown-linux-gnu/sys-include  -march=rv32imac
> > > -mabi=ilp32
> > >
> > >
> > >
> > > *checking whether the C compiler works... noconfigure: error: in
> > > `/home/webuser/Dev/risc-v/riscv-gnu-toolchain/build-gcc-linux-
> > > stage2/riscv64-unknown-linux-gnu/lib32/ilp32/libgomp':configure:
> > > error: C compiler cannot create executablesSee `config.log' for more
> > > details*
> > >
> > > *Makefile:13703: recipe for target 'configure-target-libgomp'
> > > failedmake[2]: *** [configure-target-libgomp] Error 1*
> > > make[2]: Leaving directory
> > > '/home/webuser/Dev/risc-v/riscv-gnu-toolchain/build-gcc-linux-stage2'
> > > Makefile:951: recipe for target 'all' failed
> > > make[1]: *** [all] Error 2
> > > make[1]: Leaving directory
> > > '/home/webuser/Dev/risc-v/riscv-gnu-toolchain/build-gcc-linux-stage2'
> > > Makefile:304: recipe for target 'stamps/build-gcc-linux-stage2' failed
> > > make: *** [stamps/build-gcc-linux-stage2] Error 2
> > >
> > > On Mon, Nov 11, 2019 at 5:52 PM Zhuang, Siwei (Data61, Kensington NSW) <
> > > Siwei.Zhuang@data61.csiro.au> wrote:
> > >
> > > > No, building riscv-isa-sim alone is sufficient if you only need Spike.
> > > >
> > > > seL4 also generates a script called "simulate" in the your build
> > > > directory.
> > > > The script invokes qemu for simulation.
> > > >
> > > > Regards,
> > > > Siwei
> > > >
> > > > On Mon, 2019-11-11 at 17:20 -0800, Jacob Yu wrote:
> > > > > Thanks, Siwei for the info.  I'll give it a try.
> > > > >
> > > > > > Running seL4 no longer requires RISC-V tools. In case you want to
> > use
> > > > > Spike,
> > > > > > I'd suggest building the riscv-isa-sim separately to get the
> > > > > > latest
> > > > code.
> > > > > Does this require RISC-V tools to build?
> > > > >
> > > > > Best,
> > > > >
> > > > >
> > > > > Jacob
> > > > >
> > > > > On Sun, Nov 10, 2019 at 10:58 PM Zhuang, Siwei (Data61, Kensington
> > NSW)
> > > > > <
> > > > > Siwei.Zhuang@data61.csiro.au> wrote:
> > > > >
> > > > > > Hi Jacob,
> > > > > >
> > > > > > You need to enable multilib when building "riscv-gnu-toolchain".
> > > > > >
> > > > > >     ./configure --prefix=/path-to-install-toolchain
> > --enable-multilib
> > > > > > then
> > > > > >     make or make linux
> > > > > >
> > > > > > Running seL4 no longer requires RISC-V tools. In case you want to
> > use
> > > > > > Spike,
> > > > > > I'd suggest building the riscv-isa-sim separately to get the
> > > > > > latest
> > > > code.
> > > > > > Regards,
> > > > > > Siwei
> > > > > >
> > > > > > On Sun, 2019-11-10 at 15:50 -0800, Jacob Yu wrote:
> > > > > > > Hi
> > > > > > >
> > > > > > > I am trying to build "seL4 tests" for "Spike" platform (the
> > RISC-V
> > > > > > > simulator from UC Berkeley) on Ubuntu 18.04.3 LTS, a 64-bit
> > system.
> > > > > > > First of all, I was able to build RISC-V tools with "build.sh"
> > after
> > > > > > > manually installing "riscv-gnu-toolchain" from GitHub as well as
> > > > > > additional
> > > > > > > python modules (future, ply, protobuf).  I then kicked of
> > > > > > "../init-build.sh
> > > > > > > -DPLATFORM=spike -DRISCV64=TRUE -DSIMULATION=1" from local build
> > > > > > directory.
> > > > > > > After that, however, "ninja" command complained about "undefined
> > > > > > reference
> > > > > > > to `__nedf2'". I understand there is no FPU support in "Spike"
> > > > platform
> > > > > > so
> > > > > > > a need for "soft-float" module.  Where should I specify
> > "-lsoft-fp"?
> > > > > > > Any suggestions?
> > > > > > >
> > > > > > > Thanks,
> > > > > > >
> > > > > > >
> > > > > > > Jacob
> > > > > > > _______________________________________________
> > > > > > > Devel mailing list
> > > > > > > Devel@sel4.systems
> > > > > > > https://sel4.systems/lists/listinfo/devel