Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
1 task done
walrider3 opened this issue Jul 27, 2024 · 5 comments
Open
1 task done
Labels
task A project task

Comments

@walrider3
Copy link

Is there an existing CVA6-SDK task for this?

  • 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 walrider3 added the task A project task label Jul 27, 2024
@wal222
Copy link

wal222 commented Jul 27, 2024

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

@Moschn
Copy link
Contributor

Moschn commented Aug 6, 2024

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).

@walrider3
Copy link
Author

walrider3 commented Aug 8, 2024

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.

@Moschn
Copy link
Contributor

Moschn commented Aug 9, 2024

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.

@jason23g
Copy link

jason23g commented Nov 13, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
task A project task
Projects
None yet
Development

No branches or pull requests

4 participants