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> Errors including undefined reference to `__atomic_compare_exchange_4' when running "make images" command #100

Open
1 task done
walrider3 opened this issue Jul 24, 2024 · 0 comments
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

I'm trying to run the "make images" so I can make a bootable SD card. However, it is not working since I get the following error:/mnt/c/Users/PMLS/Downloads/cva6_sdk_master/buildroot/output/host/bin/riscv64-buildroot-linux-uclibc-nm: libc/stdlib/__cxa_finalize.os: file format not recognized
AR cr lib/libc.a
STRIP -x -R .note -R .comment lib/libc.a
CC libpthread/nptl/pthread_atfork.oS
AR cr lib/libpthread_nonshared.a
STRIP -x -R .note -R .comment lib/libpthread_nonshared.a
LD libuClibc-1.0.49.so
/mnt/c/Users/PMLS/Downloads/cva6_sdk_master/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'
/mnt/c/Users/PMLS/Downloads/cva6_sdk_master/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'
/mnt/c/Users/PMLS/Downloads/cva6_sdk_master/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'
/mnt/c/Users/PMLS/Downloads/cva6_sdk_master/buildroot/output/host/lib/gcc/riscv64-buildroot-linux-uclibc/13.3.0/../../../../riscv64-buildroot-linux-uclibc/bin/ld: libc/libc_so.a(register-atfork.oS): in function .L0 ': register-atfork.c:(.text+0x4c): undefined reference to __atomic_compare_exchange_8'
/mnt/c/Users/PMLS/Downloads/cva6_sdk_master/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
make[2]: *** [libc/Makefile.in:77: lib/libc.so] Error 1
make[2]: Leaving directory '/mnt/c/Users/PMLS/Downloads/cva6_sdk_master/buildroot/output/build/uclibc-1.0.49'
make[1]: *** [package/pkg-generic.mk:289: /mnt/c/Users/PMLS/Downloads/cva6_sdk_master/buildroot/output/build/uclibc-1.0.49/.stamp_built] Error 2
make[1]: Leaving directory '/mnt/c/Users/PMLS/Downloads/cva6_sdk_master/buildroot'
make: *** [Makefile:77: /mnt/c/Users/PMLS/Downloads/cva6_sdk_master/buildroot/output/host/bin/riscv64-buildroot-linux-gnu-gcc] Error 2

Description of Done

I need to make bootable SD card. For now I'm using the prebuilt bitstream of CVA6 along with its prebuilt Linux image and memory configuration file since those commands ("make fpga" for bitstream on the cva6 repo) also don't work. The prebuild of the Linux image includes the bbl.bin file which I guess is the Linux image(which I'm guessing is equivalent to the vmlinux image and uImage.bin files), however, I also need the fw_payload.bin file and "make fw_payload.bin" also returns an error identical to the one above. Clicking on the buildroot directory in this repo leads to a 404 web page. So I went ahead and downloaded the latest version of Buildroot from its official gitlab repo and unzipped it into the empty buildroot file.
After researching myself for sometime, I have a suspicion it might be due to using the latest version buildroot, however I can't determine what version of buildroot was used in this repo since it leads to 404 web page. Or maybe the problem could be with something else(there was a similar problem people online had with gprc and deprecating the version solved their problem).

@walrider3 walrider3 added the task A project task label Jul 24, 2024
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

1 participant