Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
I caught error with crossdev
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
Dawn_Xu
n00b
n00b


Joined: 04 Oct 2023
Posts: 12

PostPosted: Fri May 03, 2024 2:16 pm    Post subject: I caught error with crossdev Reply with quote

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
View user's profile Send private message
pingtoo
l33t
l33t


Joined: 10 Sep 2021
Posts: 939
Location: Richmond Hill, Canada

PostPosted: Sat May 04, 2024 5:37 pm    Post subject: Reply with quote

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
View user's profile Send private message
Dawn_Xu
n00b
n00b


Joined: 04 Oct 2023
Posts: 12

PostPosted: Sun May 05, 2024 1:49 pm    Post subject: Reply with quote

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
View user's profile Send private message
pingtoo
l33t
l33t


Joined: 10 Sep 2021
Posts: 939
Location: Richmond Hill, Canada

PostPosted: Sun May 05, 2024 4:45 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum