View previous topic :: View next topic |
Author |
Message |
Dawn_Xu n00b
Joined: 04 Oct 2023 Posts: 13
|
Posted: Fri May 03, 2024 2:16 pm Post subject: I caught error with crossdev |
|
|
I tried every arch and libc, but when compiling stage1 gcc, It said
"mv: cannot stat '/var/tmp/portage/cross-riscv64-linux-musl/gcc-13.2.1_p20240210/image/usr/lib64/libcc1*': No such file or directory"
or others in same error
so how to solve this? |
|
Back to top |
|
|
pingtoo Veteran
Joined: 10 Sep 2021 Posts: 1248 Location: Richmond Hill, Canada
|
Posted: Sat May 04, 2024 5:37 pm Post subject: |
|
|
Dawn_Xu,
I was able reproduce the same error in your post.
This is problem crossdev incompleteness, It just does not support riscv64's gcc structure. And the main problem lie on gcc installed in usr/lib whereas the emerge want to get it from usr/lib64
There are two workarounds I tested,- Manully quick modify /etc/portage/env/cross-riscv64-linux-musl/gcc.conf -- change the line LIBDIR_lp64d='lib64' to LIBDIR_lp64d='lib'. You have to do quick enough before gcc start compile. because those env files are generated on the fly by crossdev.
- Use Ebuild Phase Function Hooks -- by creating a /etc/portage/bashrc with
Code: |
pre_src_install() {
echo "Enter pre_src_install"
if [ "$PN" = "gcc" ]; then
echo "set LIBDIR_lp64d=lib"
LIBDIR_lp64d='lib'
fi
} |
I build my test on LicheePi4 in a gentoo docker container using gentoo/portage:20240503. No special setup, just start the container, build crossdev then use the command Code: | crossdev -S -t riscv64-linux-musl |
|
|
Back to top |
|
|
Dawn_Xu n00b
Joined: 04 Oct 2023 Posts: 13
|
Posted: Sun May 05, 2024 1:49 pm Post subject: |
|
|
pingtoo wrote: |
I think I find the reason,
I set Code: |
CC=clang
CXX=clang++
|
in make.conf, but I'm using a default, gcc compiler profile
|
|
|
Back to top |
|
|
pingtoo Veteran
Joined: 10 Sep 2021 Posts: 1248 Location: Richmond Hill, Canada
|
Posted: Sun May 05, 2024 4:45 pm Post subject: |
|
|
Dawn_Xu wrote: | pingtoo wrote: |
I think I find the reason,
I set Code: |
CC=clang
CXX=clang++
|
in make.conf, but I'm using a default, gcc compiler profile
|
| Please NOTE. I did not wrote any of above. So please don't quote me on that.
Does it mean it is working for you now? I mean when you using clang? |
|
Back to top |
|
|
|