Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
aarch64 crossdev setup for pi4b fails to build on stage1
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gentoo on ARM
View previous topic :: View next topic  
Author Message
acertig
n00b
n00b


Joined: 16 Aug 2022
Posts: 13

PostPosted: Wed Dec 14, 2022 3:54 am    Post subject: aarch64 crossdev setup for pi4b fails to build on stage1 Reply with quote

Trying to setup my main desktop amd64 as a binhost for my pi. Apparently when trying to build the stage1 it cant find libcc1 on lib64. However after some research I found out it was being placed into regular /lib. I don't really know how to proceed since it's looking for it in the wrong place? Apparently this was a bug that got fixed a couple years ago and none issues have been filed ever since.

Code:
mv: cannot stat '/var/tmp/portage/cross-aarch64-unknown-linux-gnu/gcc-11.3.0/image/usr/lib64
/libcc1*': No such file or directory
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54423
Location: 56N 3W

PostPosted: Wed Dec 14, 2022 10:36 am    Post subject: Reply with quote

acertig,

Run crossdev to get the cross toolchain.
Code:
crossdev -t aarch64-unknown-linux-gnu

This will get you an 'empty' target root filesystem /usr/aarch64-unknown-linux-gnu/ on the build box.
Fix the profile symlink in /usr/aarch64-unknown-linux-gnu/etc/portage to point to the profile of you choosing for the Pi. The default embedded profile is not useful.
Set the USE flags for the Pi in /usr/aarch64-unknown-linux-gnu/etc/portage/make.conf
Execute
Code:
emerge-wrapper --init -t aarch64-unknown-linux-gnu


Code:
aarch64-unknown-linux-gnu-emerge -av @system --keep-going
will now try to cross compile the system set and install it into /usr/aarch64-unknown-linux-gnu/
It will also save binary packages to suit the Pi. A few packages are expected to fail.

Code:
# aarch64-unknown-linux-gnu-emerge -pv @system

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild  N     ] sys-apps/gentoo-functions-0.17::gentoo to /usr/aarch64-unknown-linux-gnu/ 0 KiB
[ebuild  N     ] sys-libs/timezone-data-2022g::gentoo to /usr/aarch64-unknown-linux-gnu/ USE="-leaps-timezone -nls -zic-slim" 0 KiB
[ebuild  N     ] virtual/libiconv-0-r2::gentoo to /usr/aarch64-unknown-linux-gnu/ 0 KiB
...
Notice the install location.

If you want a 32 bit Pi install, change the tuple to suit.

I have a 64 bit binhost for Pi3 and Pi4.
As of last night, its also available over https but there is no auto redirect.

Its also possible to populate the target root using the target stage3.
If you do that, preserve the make.conf left by crossdev and the target stage3 will install a target make.conf, which is not what you want for cross compiling.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
acertig
n00b
n00b


Joined: 16 Aug 2022
Posts: 13

PostPosted: Wed Dec 14, 2022 8:49 pm    Post subject: Reply with quote

lots of packages did refuse to compile but they do not amount to even half of the @system set
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo on ARM 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