GenPi64 / gentoo-on-rpi-64bit

Bootable 64-bit Gentoo image for the Raspberry Pi4B, 3B & 3B+, with Linux 5.4, OpenRC, Xfce4, VC4/V3D, camera and h/w codec support, weekly-autobuild binhost
GNU General Public License v3.0
55 stars 8 forks source link

Tracking Variables Affecting Cross Compiling For Each Release #42

Open jlpoolen opened 1 year ago

jlpoolen commented 1 year ago

This is an enhancement request.

As releases of GenPi64 come forth, I'm going to assume there will be tagging of some sort. Concurrent with the tagging, it would be helpful if the requisite variables needed to identify a cross compiler where tracked. That way, if a new release uses a new version of gcc or etc., the change would be noted and easily determined without having to stage and activate the release.

I'm considering using cross compilers to speed up creating packages for Gentoo OpenRC running on the Raspberry Pi Zero 2W. Currently, I'm building net-misc/zerotier and I'm 22 hours into the build with my main root console grinding to such a slow state that just process line commands occurs about every 7 minutes. I had compiled tmux and ntpd previously and while they probably took about 20 minutes, they did not weigh down the system such as zerotier has. Already cmake was upgraded in Gentoo's portage since the build of the release I currently have (dated August 15, 2023), and that surely will be a resource hungry build making it almost impossible on a Raspberry Pi Zero 2W.

The variables needed for defining a cross compiler are:

An example command to create a cross-compiler would be:

 crossdev --g [gcc version] --l [(g)libc version] --b [binutils version] --k [kernel headers version] -P -v -t [tuple]

I do not know how often the four variables change vis-a-vis the build for GenPi64, but given that the goal is to provide a build based on Gentoo's current high watermark, I image these variables could change quite often as they do in Gentoo's regular portage and that having a record of what released build has what values could be helpful ... it might be something tracked in a wiki were the principals of this project deem it wise to activate the wiki feature of this project (See Request To Activate Wiki https://github.com/GenPi64/Build.Dist/issues/194)

jlpoolen commented 1 year ago

For posterity, here are a series of commands, specific for arm64, which print out the current versions:

    wget -qO- https://gentoo.osuosl.org/releases/arm64/autobuilds/latest-stage3-arm64-openrc.txt|tail -n 1 | \
awk '{print "https://gentoo.osuosl.org/releases/arm64/autobuilds/"$1".CONTENTS.gz"}' | \
xargs wget -qO - |gunzip|perl -ne 'm/((binutils|gcc|glibc)\-\d.*)\/CBUILD/; print "$1\n";'  | uniq

Example run:

jlpoole@eos ~ $ wget -qO- https://gentoo.osuosl.org/releases/arm64/autobuilds/latest-stage3-arm64-openrc.txt|tail -n 1 | \
awk '{print "https://gentoo.osuosl.org/releases/arm64/autobuilds/"$1".CONTENTS.gz"}' | \
 xargs wget -qO - |gunzip|perl -ne 'm/((binutils|gcc|glibc)\-\d.*)\/CBUILD/; print "$1\n";'  | uniq

binutils-2.40-r5
gcc-12.3.1_p20230526
glibc-2.37-r3
jlpoole@eos ~ $ date
Thu Aug 17 19:56:50 PDT 2023
jlpoole@eos ~ $ 
jlpoolen commented 1 year ago

The Aug_15 build Mike Jones provided me (via Discord) matches the high watermark referenced in my comment immediately above this one as:

jlpoole@pizero1 ~ $ date; gcc --version
Thu Aug 17 10:00:25 PM CDT 2023
gcc (Gentoo 12.3.1_p20230526 p2) 12.3.1 20230526
Copyright (C) 2022 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

jlpoole@pizero1 ~ $
jlpoole@pizero1 ~ $ eix -I sys-devel/binutils
[I] sys-devel/binutils
     Available versions:  
     (2.32) [M]~2.32-r2^t
     (2.33) [M]2.33.1-r1^t
     (2.34) [M]2.34-r2^t
     (2.35) [M]2.35.2^t
     (2.36) [M]2.36.1-r2^t
     (2.37) [M]2.37_p1-r2^t
     (2.38) 2.38-r2^t
     (2.39) 2.39-r5^t
     (2.40) 2.40-r5^t ~2.40-r6^t ~2.40-r7^t ~2.40-r8^t
     (2.41) ~2.41^t ~2.41-r1^t
     (9999) **9999*l^t
       {cet debuginfod default-gold doc (+)gold gprofng hardened multitarget +nls pgo +plugins static-libs test vanilla zstd}
     Installed versions:  2.40-r5(2.40)^t(12:11:15 AM 07/30/2023)(nls plugins -cet -doc -gold -gprofng -multitarget -pgo -static-libs -test -vanilla -zstd)
     Homepage:            https://sourceware.org/binutils/
     Description:         Tools necessary to build programs

[I] sys-devel/binutils-config
     Available versions:  5.4.1 5.5 **9999*l {+native-symlinks}
     Installed versions:  5.5(10:52:20 PM 07/29/2023)(native-symlinks)
     Homepage:            https://wiki.gentoo.org/wiki/Project:Toolchain
     Description:         Utility to change the binutils version being used

Found 2 matches
jlpoole@pizero1 ~ $ 

jlpoole@pizero1 ~ $ eix -I sys-libs/glibc
[I] sys-libs/glibc
     Available versions:  (2.2) [M]~*2.19-r2^s [M]2.31-r7^t [M]2.32-r8^t [M]2.33-r14^t [M]2.34-r14^t [M]2.35-r11^t 2.36-r8^t 2.37-r3^t ~2.37-r4^t **2.38^t **9999*l^t
       {audit caps cet +clone3 compile-locales +crypt custom-cflags debug doc experimental-loong gd hash-sysv-compat headers-only +multiarch multilib multilib-bootstrap nscd perl profile selinux +ssp stack-realign +static-libs static-pie suid systemd systemtap test vanilla}
     Installed versions:  2.37-r3(2.2)^t(07:38:37 AM 08/15/2023)(multiarch ssp static-libs -audit -caps -cet -compile-locales -crypt -custom-cflags -doc -gd -hash-sysv-compat -headers-only -multilib -multilib-bootstrap -nscd -perl -profile -selinux -stack-realign -suid -systemd -systemtap -test -vanilla)
     Homepage:            https://www.gnu.org/software/libc/
     Description:         GNU libc C library

jlpoole@pizero1 ~ $