cva6-sdk icon indicating copy to clipboard operation
cva6-sdk copied to clipboard

[TASK] <title> Running "make images" command using the docker container doesn't work.

Open walrider3 opened this issue 1 year ago • 5 comments

Is there an existing CVA6-SDK task for this?

  • [X] I have searched the existing task issues

Task Description

uclibc 1.0.49 Building /usr/bin/make -C /repo/buildroot/output/build/uclibc-1.0.49 ARCH="riscv64" CROSS_COMPILE="/repo/buildroot/output/host/bin/riscv64-buildroot-linux-uclibc-" UCLIBC_EXTRA_CFLAGS=" -g0 -fno-lto" HOSTCC="/usr/bin/gcc" headers make[2]: Entering directory '/repo/buildroot/output/build/uclibc-1.0.49' make[2]: 'headers' is up to date. make[2]: Leaving directory '/repo/buildroot/output/build/uclibc-1.0.49' /usr/bin/make -C /repo/buildroot/output/build/uclibc-1.0.49 ARCH="riscv64" CROSS_COMPILE="/repo/buildroot/output/host/bin/riscv64-buildroot-linux-uclibc-" UCLIBC_EXTRA_CFLAGS=" -g0 -fno-lto" HOSTCC="/usr/bin/gcc" make[2]: Entering directory '/repo/buildroot/output/build/uclibc-1.0.49' make[3]: 'lib/ld-uClibc.so' is up to date. LD libuClibc-1.0.49.so /repo/buildroot/output/host/lib/gcc/riscv64-buildroot-linux-uclibc/13.3.0/../../../../riscv64-buildroot-linux-uclibc/bin/ld: libc/libc_so.a(err.os): in function .L0 ': err.c:(.text+0xa0): undefined reference to __atomic_compare_exchange_4' /repo/buildroot/output/host/lib/gcc/riscv64-buildroot-linux-uclibc/13.3.0/../../../../riscv64-buildroot-linux-uclibc/bin/ld: libc/libc_so.a(err.os): in function .L6': err.c:(.text+0x138): undefined reference to __atomic_exchange_4' /repo/buildroot/output/host/lib/gcc/riscv64-buildroot-linux-uclibc/13.3.0/../../../../riscv64-buildroot-linux-uclibc/bin/ld: libc/libc_so.a(__cxa_finalize.os): in function .L3': __cxa_finalize.c:(.text+0xac): undefined reference to __atomic_compare_exchange_8' /repo/buildroot/output/host/lib/gcc/riscv64-buildroot-linux-uclibc/13.3.0/../../../../riscv64-buildroot-linux-uclibc/bin/ld: libc/libc_so.a(fork.oS): in function .L23': fork.c:(.text+0x130): undefined reference to __atomic_fetch_add_4' /repo/buildroot/output/host/lib/gcc/riscv64-buildroot-linux-uclibc/13.3.0/../../../../riscv64-buildroot-linux-uclibc/bin/ld: libc/libc_so.a(sem_timedwait.oS): in function .L5': sem_timedwait.c:(.text+0xd8): undefined reference to __atomic_fetch_add_8' collect2: error: ld returned 1 exit status libc/Makefile.in:77: recipe for target 'lib/libc.so' failed make[2]: *** [lib/libc.so] Error 1 make[2]: Leaving directory '/repo/buildroot/output/build/uclibc-1.0.49' package/pkg-generic.mk:286: recipe for target '/repo/buildroot/output/build/uclibc-1.0.49/.stamp_built' failed make[1]: *** [/repo/buildroot/output/build/uclibc-1.0.49/.stamp_built] Error 2 make[1]: Leaving directory '/repo/buildroot' Makefile:76: recipe for target '/repo/buildroot/output/host/bin/riscv64-buildroot-linux-gnu-gcc' failed make: *** [/repo/buildroot/output/host/bin/riscv64-buildroot-linux-gnu-gcc] Error 2 I have no name!@0fd45013006f:/repo$

Description of Done

I need to get the files for to flash the sd card with so I can boot linux on the cva6 core on the genesys 2 board. But the command gives the following errror.

walrider3 avatar Jul 27 '24 07:07 walrider3

I solved the above error by opening the docker container by root by using the following command: sudo docker run -it -v pwd:/repo -w /repo ghcr.io/pulp-platform/ariane-sdk(removing the user part)

I now get the following error, the wget --passive-ftp -nd -t 3 -O '/repo/buildroot/output/build/.linux-v5.10.7-br1.tar.gz.hEmhDo/output' 'http://sources.buildroot.net/linux-v5.10.7-br1.tar.gz' command failed and the file linux-v5.10.7-br1.tar.gz actually doesn't exist on the address it is said to exist: image

wal222 avatar Jul 27 '24 17:07 wal222

I cannot reproduce your issues, therefore, I also cannot offer much help. The error messages that you posted point towards a broken toolchain, but the toolchain should be built by make images so I have no idea what is going on.

I just did a clean build locally on ubuntu 24.04 and it worked without issues. If it does not work for you on your setup, try on a clean ubuntu image (either in docker, or a full VM).

Moschn avatar Aug 06 '24 13:08 Moschn

I cannot reproduce your issues, therefore, I also cannot offer much help. The error messages that you posted point towards a broken toolchain, but the toolchain should be built by make images so I have no idea what is going on.

I just did a clean build locally on ubuntu 24.04 and it worked without issues. If it does not work for you on your setup, try on a clean ubuntu image (either in docker, or a full VM).

I'm already running the command in a docker container(as I have mentioned in the title) that too on a new and clean ubuntu image I setup as dual boot. Despite this the error still comes.

walrider3 avatar Aug 08 '24 17:08 walrider3

Are you following all the steps outlined in the readme? Also, please do not tamper with the git submodules and their version. The current master of this repo should be working. A simple git submodule update --init --recursive is all you need.

Moschn avatar Aug 09 '24 06:08 Moschn

Hello @Moschn, @walrider3 ,

I have also encountered the same problem when i use make clean-all and then make all in my host machine instead of docker. Is there any update available related to this error?

Thanks in advance for your time.

jason23g avatar Nov 13 '24 09:11 jason23g