Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Installing Gentoo
  • Search

[SOLVED]cross compile & binhost for 2nd system

Having problems with the Gentoo Handbook? If you're still working your way through it, or just need some info before you start your install, this is the place. All other questions go elsewhere.
Post Reply
Advanced search
13 posts • Page 1 of 1
Author
Message
irets
Apprentice
Apprentice
User avatar
Posts: 241
Joined: Tue Dec 17, 2019 12:57 pm

[SOLVED]cross compile & binhost for 2nd system

  • Quote

Post by irets » Mon Dec 12, 2022 1:44 pm

Hi,

I got my hands on a Lenovo T400 on which I'd like to run gentoo on but installing and keeping it up-to-date will be a slow and tedious process.
Can I somehow use my desktop computer which also runs gentoo, to keep my T400 up-to-date by using my desktop CPU to compile the software?
Would I need to initiate emerge on my laptop and then somehow run the compilation on my desktop or start the compilation on my desktop and then apply the finished packages on my laptop's filesystem with portage?

What would the best way to accomplish this? Are there any caveats? Is there a way to go about doing this without polluting @world of my desktop with packages required by my laptop?

emerge --info of my desktop:

Code: Select all

Portage 3.0.41 (python 3.10.9-final-0, default/linux/amd64/17.1, gcc-11.3.0, glibc-2.36-r5, 5.15.80-wired-x86_64 x86_64)
=================================================================
System uname: Linux-5.15.80-wired-x86_64-x86_64-Intel-R-_Core-TM-_i7-4790K_CPU_@_4.00GHz-with-glibc2.36
KiB Mem:    16330904 total,  13377192 free
KiB Swap:   20954176 total,  20954176 free
Timestamp of repository gentoo: Sun, 11 Dec 2022 20:00:01 +0000
Head commit of repository gentoo: 7b1d7789c7ace95a6c6096c30aa971e3a87ad363
Timestamp of repository dotnet: Wed, 07 Dec 2022 00:01:55 +0000
Head commit of repository dotnet: 668966a5140f17686842dc3428912822aaf13626

Timestamp of repository guru: Sat, 10 Dec 2022 02:04:30 +0000
Head commit of repository guru: af0bd4f351443ad741b050412198f1a7c28ee2a2

Head commit of repository steam-overlay: 226725c26fa7f88b72889a494139342ca1729f82

sh bash 5.1_p16-r2
ld GNU ld (Gentoo 2.38 p4) 2.38
app-misc/pax-utils:        1.3.5::gentoo
app-shells/bash:           5.1_p16-r2::gentoo
dev-java/java-config:      2.3.1::gentoo
dev-lang/perl:             5.34.1-r4::gentoo
dev-lang/python:           3.10.9::gentoo, 3.11.1::gentoo
dev-lang/rust:             1.65.0::gentoo
dev-util/cmake:            3.24.3::gentoo
dev-util/meson:            0.63.3::gentoo
sys-apps/baselayout:       2.9::gentoo
sys-apps/openrc:           0.45.2-r2::gentoo
sys-apps/sandbox:          2.29::gentoo
sys-devel/autoconf:        2.13-r7::gentoo, 2.71-r5::gentoo
sys-devel/automake:        1.16.5::gentoo
sys-devel/binutils:        2.38-r2::gentoo
sys-devel/binutils-config: 5.4.1::gentoo
sys-devel/clang:           15.0.5::gentoo
sys-devel/gcc:             11.3.0::gentoo
sys-devel/gcc-config:      2.8::gentoo
sys-devel/libtool:         2.4.7::gentoo
sys-devel/lld:             15.0.5::gentoo
sys-devel/llvm:            15.0.5::gentoo
sys-devel/make:            4.3::gentoo
sys-kernel/linux-headers:  5.15-r3::gentoo (virtual/os-headers)
sys-libs/glibc:            2.36-r5::gentoo
Repositories:

gentoo
    location: /var/db/repos/gentoo
    sync-type: rsync
    sync-uri: rsync://rsync.gentoo.org/gentoo-portage
    priority: -1000
    sync-rsync-verify-metamanifest: yes
    sync-rsync-extra-opts: 
    sync-rsync-verify-jobs: 1
    sync-rsync-verify-max-age: 24

dotnet
    location: /var/db/repos/dotnet
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/dotnet.git
    masters: gentoo

guru
    location: /var/db/repos/guru
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/guru.git
    masters: gentoo

localrepo
    location: /var/db/repos/localrepo
    masters: gentoo

steam-overlay
    location: /usr/local/portage/steam-overlay
    sync-type: git
    sync-uri: https://github.com/anyc/steam-overlay.git
    masters: gentoo
    priority: 50

ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="@FREE"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-march=native -O2 -pipe"
DISTDIR="/var/cache/distfiles"
ENV_UNSET="CARGO_HOME DBUS_SESSION_BUS_ADDRESS DISPLAY GOBIN GOPATH PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR XDG_STATE_HOME"
FCFLAGS="-march=native -O2 -pipe"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs buildpkg-live config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news parallel-fetch pid-sandbox preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-march=native -O2 -pipe"
GENTOO_MIRRORS="ftp://mirror.netcologne.de/gentoo/ https://mirror.netcologne.de/gentoo/ http://mirror.netcologne.de/gentoo/ rsync://mirror.netcologne.de/gentoo/"
INSTALL_MASK="/lib/systemd/*/*.service /usr/lib/systemd/*/*.service"
LANG="en_US.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j4"
PKGDIR="/var/cache/binpkgs"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/var/tmp"
SHELL="/bin/bash"
USE="X acl alsa amd64 bzip2 cli crypt dri elogind fortran gdbm iconv ipv6 libglvnd libtirpc multilib ncurses nls nptl openmp pam pcre pulseaudio readline seccomp split-usr ssl test-rust unicode xattr xinerama zlib" ABI_X86="64" ADA_TARGET="gnat_2021" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="mmx mmxext sse sse2" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" GRUB_PLATFORMS="pc" INPUT_DEVICES="libinput wacom" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LUA_SINGLE_TARGET="lua5-1" LUA_TARGETS="lua5-1" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php7-4 php8-0" POSTGRES_TARGETS="postgres12 postgres13" PYTHON_SINGLE_TARGET="python3_10" PYTHON_TARGETS="python3_10" RUBY_TARGETS="ruby27" USERLAND="GNU" VIDEO_CARDS="nvidia" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq proto steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  ADDR2LINE, AR, ARFLAGS, AS, ASFLAGS, CC, CCLD, CONFIG_SHELL, CPP, CPPFLAGS, CTARGET, CXX, CXXFILT, ELFEDIT, EMERGE_DEFAULT_OPTS, EXTRA_ECONF, F77FLAGS, FC, GCOV, GPROF, LC_ALL, LD, LEX, LFLAGS, LIBTOOL, LINGUAS, MAKE, MAKEFLAGS, NM, OBJCOPY, OBJDUMP, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, RANLIB, READELF, RUSTFLAGS, SIZE, STRINGS, STRIP, YACC, YFLAGS
Last edited by irets on Wed Dec 14, 2022 9:10 pm, edited 1 time in total.
Top
sublogic
Guru
Guru
User avatar
Posts: 386
Joined: Mon Mar 21, 2022 3:02 am
Location: Pennsylvania, USA

  • Quote

Post by sublogic » Tue Dec 13, 2022 12:07 am

Well, there is sys-devel/distcc . See the wiki page, https://wiki.gentoo.org/wiki/Distcc . Uh, heed the warning at the top. Read the discussion tab.

Distcc doesn't work with rust, so firefox for example won't benefit. Also, when compiling gcc or clang, distcc only works on the first pass (compiling with the installed compiler) and not the other two (re-compiling, twice, with the new compiler).

I have an amd64-multilib desktop and an old x86 laptop with only (!) 2 GB of RAM. For the special cases above I cobbled a chroot environment for the desktop with root= the laptop's root, exported by NFS. The desktop bind-mounts its /proc, /dev, /sys, /run and /var/tmp/portage over the exported root, then does the chroot. Running emerge takes all commands (including compilers) from the laptop but runs on the desktop's cpu, memory and /var/tmp/portage .

When I update the laptop, I run emerge --ask and carefully check the list. If there are distcc-averse packages, I start over and --exclude them. When that finishes, I get in the chroot environment on the desktop and finish updating @world from there.

(There has to be a better way 8O . Experts please chime in.)

Your desktop is amd64 like mine. If your laptop is also amd64 you have a much easier path: emerge --buildpkg or --buildpkgonly on the desktop and copy the tarballs in /var/cache/binpkgs to the laptop.
Top
Christian99
Veteran
Veteran
Posts: 1769
Joined: Thu May 28, 2009 5:20 pm

  • Quote

Post by Christian99 » Tue Dec 13, 2022 12:49 am

sublogic wrote: When I update the laptop, I run emerge --ask and carefully check the list. If there are distcc-averse packages, I start over and --exclude them. When that finishes, I get in the chroot environment on the desktop and finish updating @world from there.
I would make an update alias, that has the problematic packages already excluded. then I would run this update alias and after that make update in the chroot.
This eleminates manually checking the package list, that is probably tedious and error prone.

Or just run complete update from chroot, should be possible, too.
Top
sdauth
l33t
l33t
User avatar
Posts: 770
Joined: Wed Sep 19, 2018 2:48 am
Location: Ásgarðr

Re: cross compiling & maintaining a secondary system

  • Quote

Post by sdauth » Tue Dec 13, 2022 4:05 am

Irets wrote:What would the best way to accomplish this? Are there any caveats?
I also have a T400, I installed the entire core2 system in a chroot on my desktop. Every package is built inside the chroot. The /var/cache/binpkgs of the chroot is shared over LAN (with nginx) and the T400 only pulls the packages from the chroot binhost.
More details in this thread : viewtopic-p-8463552-highlight-.html#8463552
Very few things changed (some quick and dirty script added to synchronize the /etc/portage/package.* settings between desktop and chroot and also between chroot and the T400 to ease maintenance), it still works great after nearly three years.
You want to make sure to correctly set the variables in the core2 chroot : (-march=core2 and the flags)

Code: Select all

CHOST="x86_64-pc-linux-gnu"
COMMON_FLAGS="-march=core2 -O2 -pipe"
CFLAGS="${COMMON_FLAGS}"
CXXFLAGS="${COMMON_FLAGS}"
FCFLAGS="${COMMON_FLAGS}"
FFLAGS="${COMMON_FLAGS}"

CPU_FLAGS_X86="mmx mmxext sse sse2 sse3 sse4_1 ssse3"
Top
CaptainBlood
Advocate
Advocate
User avatar
Posts: 4237
Joined: Sun Jan 24, 2010 9:38 am

  • Quote

Post by CaptainBlood » Tue Dec 13, 2022 8:22 am

Off topic, having a core2 build the classical way, elsewhere on higher CPU --buildpkgonly non chrooted sys-devel/gcc[jit] raises issues on core2 when libgccjit is involved:Bugzilla

Anyone by chance using sys-devel/gcc[jit] on the core2?
I'd like to be sure chrooted sys-devel/gcc[jit] build is the way to go, as it likely should.

Thks 4 ur attention, interest & support.
USE="-* ..." in /etc/portage/make.conf here, i.e. a countermeasure to portage implicit braces, belt & diaper paradigm
LT: "I've been doing a passable imitation of the Fontana di Trevi, except my medium is mucus. Sooo much mucus. "
Top
irets
Apprentice
Apprentice
User avatar
Posts: 241
Joined: Tue Dec 17, 2019 12:57 pm

  • Quote

Post by irets » Tue Dec 13, 2022 2:57 pm

Thanks for the replies.

If I understood this correctly, I must first install my to-be install inside a chroot and use the make.conf file as an example provided by the user sdauth?
Will things "just work" when I proceed to copy over the contents of this chroot on to my laptop's HDD and install a bootloader?

After getting to a point where my laptop will boot, I must use software like distcc to keep my laptop's filesystem and the chroot folder of my desktop in sync?
I still don't quite grasp what software like distcc is doing or how am I keeping this secondary system up-to-date post-install.
Sync the folders and then overwrite the root of my laptop with the contents of the chroot folder on my desktop? Sounds messy. Will portage be the one to distribute the compiled files across LAN or will I have to using scp or such by copying over the whole of chroot env to laptop's root?
Top
NeddySeagoon
Administrator
Administrator
User avatar
Posts: 56080
Joined: Sat Jul 05, 2003 9:37 am
Location: 56N 3W

  • Quote

Post by NeddySeagoon » Tue Dec 13, 2022 3:49 pm

Irets,

Its two separate concepts.

distcc distributes compile jobs from one system to many others to reduce elapsed build time.
Only C and C++ is distributed.
The configure and link steps are still performed on the system doing the distributing. That can be a problem on memory constrained systems.

The chroot approach does everything on another system.
You make a chroot at say /usr/weak_system/ then do a whole Gentoo install into /usr/weak_system/ that suits the target.
Copy over the targets /etc/portage to /usr/weak_system/etc/portage
Before you build anything, set

Code: Select all

FEATURES=buildpkg
in the target make.conf.
On the target system, discover what -march=native actually means and use that in place of -march=native.
Copy over the targets world file too.

At this point, you have a chroot all set up to look like that target, plus it will build and save binary packages too.
It only contains the stage3 you installed though.

Code: Select all

emerge -eav @world 
will get you a full set of binary packages for the target.
You update the same way.

There are several ways to share the binary packages with the target. NFS, webserver ...
Share the portage tree with the target too.

On the target, tell portage to install the binaries.
Rinse and repeat for updates.

What can go wrong ...
If the target CPU instruction set is a subset of the build host, it works as advertised.
If the target CPU has instructions that the build host lacks, then building code is is fine. Executing it is not if one of the missing instructions in needed.
Illegal instruction exceptions are a dead give away.
As its only the toolchain that will run on the build host, it may never be a problem.
Portage can be set up to manage that as problems are discovered.

I really need to write this up as a wiki page, as I've posted it here several times now.
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Top
sdauth
l33t
l33t
User avatar
Posts: 770
Joined: Wed Sep 19, 2018 2:48 am
Location: Ásgarðr

  • Quote

Post by sdauth » Tue Dec 13, 2022 5:56 pm

Irets wrote:If I understood this correctly, I must first install my to-be install inside a chroot and use the make.conf file as an example provided by the user sdauth?
Will things "just work" when I proceed to copy over the contents of this chroot on to my laptop's HDD and install a bootloader?
Yes. You do a full install in the chroot (or to save time, just the bare install to be able to boot on a console with useful tools, network etc..), once that it is done, you copy the chroot to a partition on the T400 HDD/SSD and install a bootloader.
This only happens once.
After that, you will only pull binary packages from the chroot.

As NeddySeagoon said, in the chroot, you need to make sure to set FEATURES="buildpkg" (but I think it is enabled by default now) so that you keep a copy of every compiled package inside /var/cache/binpkgs (chroot)

My full /etc/portage/make.conf on the T400 :

Code: Select all

CHOST="x86_64-pc-linux-gnu"
COMMON_FLAGS="-march=core2 -O2 -pipe"
CFLAGS="${COMMON_FLAGS}"
CXXFLAGS="${COMMON_FLAGS}"
FCFLAGS="${COMMON_FLAGS}"
FFLAGS="${COMMON_FLAGS}"

CPU_FLAGS_X86="mmx mmxext sse sse2 sse3 sse4_1 ssse3"
MAKEOPTS="-j3"
EMERGE_DEFAULT_OPTS="--jobs 2 --getbinpkgonly --binpkg-respect-use=n"
ACCEPT_LICENSE="-* @FREE"
FEATURES="binpkg-multi-instance userfetch"

PORTAGE_BINHOST="https://master.lan/gentoo-core2/binpkgs"
PORTDIR="/var/db/repos/gentoo"
DISTDIR="/var/cache/distfiles"
PKGDIR="/var/cache/binpkgs"
PORT_LOGDIR="/var/log/portage"
PORTAGE_ELOG_CLASSES="log warn error"
PORTAGE_ELOG_SYSTEM="save"

VIDEO_CARDS="intel"
INPUT_DEVICES="libinput"

LC_MESSAGES=C
LINGUAS="en fr"
L10N="fr"

USE="whatever is needed"
After that, when you install stuff, it will only install if it is available as a binpkg (in the chroot) because I set --getbinpkgonly instead of --getbinpkg. (which will revert to compile missing package on your T400 if the binpkg is not available in the chroot) I prefer to avoid creating mess so everything is built inside the chroot instead of allowing to build on the T400 if package is missing from the chroot. You can still override this manually if needed.

Also, gentoo tree is synchronized over rsync from "desktop" in both the chroot & the T400, so in each /etc/portage/repos.conf/gentoo.conf (because there is no need to spam the gentoo rsync server..)

I set :

Code: Select all

sync-uri = rsync://master.lan/gentoo-portage
instead of default : sync-uri = rsync://rsync.gentoo.org/gentoo-portage (only main desktop synchronize the gentoo tree)

And on the desktop, the rsyncd daemon is enabled (with openrc) with this entry ( [gentoo-portage] ) enabled in /etc/rsyncd.conf :

Code: Select all

# Simple example for enabling your own local rsync server
[gentoo-portage]
path = /var/db/repos/gentoo
comment = Gentoo ebuild repository
exclude = /distfiles /packages
Last edited by sdauth on Tue Dec 13, 2022 6:59 pm, edited 2 times in total.
Top
NeddySeagoon
Administrator
Administrator
User avatar
Posts: 56080
Joined: Sat Jul 05, 2003 9:37 am
Location: 56N 3W

  • Quote

Post by NeddySeagoon » Tue Dec 13, 2022 6:54 pm

sdauth,

On my LAN, I use NFS for sharing the repo and the bin packages. Thats ~amd64.
My Raspberry Pi /aarch64 binhost is on the web.
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Top
irets
Apprentice
Apprentice
User avatar
Posts: 241
Joined: Tue Dec 17, 2019 12:57 pm

  • Quote

Post by irets » Wed Dec 14, 2022 8:24 pm

Thanks again for all the replies, it has been a learning experience. :)

I'm at a point where my T400 boots into a nice minimal X11 environment.
I don't have any automation setup yet for syncing the chroot's /var/cache/binpkgs to my laptop as I'm learning the way to do it manually before automation.

Inside chroot I compiled media-sound/pavucontrol & media-sound/alsa-utils but after using scp to merge /var/cache/binpkgs of my desktop to my laptop, Portage is not able to find these packages even though they're present inside PKGDIR.

The output when attempting to install these new binpkgs:

Code: Select all

emerge -1ap media-sound/alsa-utils
!!! /etc/portage/binrepos.conf is missing (or PORTAGE_BINHOST is unset), but use is requested.
!!! /etc/portage/binrepos.conf is missing (or PORTAGE_BINHOST is unset), but use is requested.

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

Calculating dependencies... done!

emerge: there are no binary packages to satisfy "media-sound/alsa-utils".

emerge: searching for similar names...
emerge: Maybe you meant any of these: media-sound/pulseaudio, media-sound/lame, media-libs/alsa-lib?

 * IMPORTANT: 11 news items need reading for repository 'gentoo'.
 * Use eselect news read to view new items.
The same goes for media-sound/pulseaudio.

The files are present in PKGDIR on my laptop, as seen here:

Code: Select all

irets@T400 ~ $ grep -r "alsa-utils\|pavucontrol" /var/cache/binpkgs/
grep: /var/cache/binpkgs/media-sound/pulseaudio-daemon/pulseaudio-daemon-16.1-r3-1.xpak: binary file matches
/var/cache/binpkgs/binpkgs/Packages:CPV: media-sound/alsa-utils-1.2.7-r1
/var/cache/binpkgs/binpkgs/Packages:PATH: media-sound/alsa-utils/alsa-utils-1.2.7-r1-1.xpak
/var/cache/binpkgs/binpkgs/Packages:CPV: media-sound/pavucontrol-5.0-r1
/var/cache/binpkgs/binpkgs/Packages:PATH: media-sound/pavucontrol/pavucontrol-5.0-r1-1.xpak
grep: /var/cache/binpkgs/binpkgs/media-sound/pavucontrol/pavucontrol-5.0-r1-1.xpak: binary file matches
grep: /var/cache/binpkgs/binpkgs/media-sound/pulseaudio-daemon/pulseaudio-daemon-16.1-r3-1.xpak: binary file matches
grep: /var/cache/binpkgs/binpkgs/media-sound/alsa-utils/alsa-utils-1.2.7-r1-1.xpak: binary file matches
This is the make.conf of my laptop:

Code: Select all

# These settings were set by the catalyst build script that automatically
# built this stage.
# Please consult /usr/share/portage/config/make.conf.example for a more
# detailed example.
CHOST="x86_64-pc-linux-gnu" 
COMMON_FLAGS="-march=core2 -O2 -pipe"
CFLAGS="${COMMON_FLAGS}"
CXXFLAGS="${COMMON_FLAGS}"
FCFLAGS="${COMMON_FLAGS}"
FFLAGS="${COMMON_FLAGS}"
INSTALL_MASK="/lib/systemd/*/*.service /usr/lib/systemd/*/*.service"
FEATURES="buildpkg"
EMERGE_DEFAULT_OPTS="--getbinpkgonly"
PKGDIR="/var/cache/binpkgs"
GRUB_PLATFORMS="pc"
VIDEO_CARDS="intel"
INPUT_DEVICES="libinput"
USE="X elogind pulseaudio -gnome -systemd"

CPU_FLAGS_X86="mmx mmxext sse sse2 sse3 sse4_1 ssse3"

# NOTE: This stage was built with the bindist Use flag enabled

# This sets the language of build output to English.
# Please keep this setting intact when reporting bugs.
LC_MESSAGES=C

GENTOO_MIRRORS="ftp://mirror.netcologne.de/gentoo/ https://mirror.netcologne.de/gentoo/ http://mirror.netcologne.de/gentoo/ rsync://mirror.netcologne.de/gentoo/"
Tried running emaint binhost --fix but to no avail.
What am I missing here?
Top
NeddySeagoon
Administrator
Administrator
User avatar
Posts: 56080
Joined: Sat Jul 05, 2003 9:37 am
Location: 56N 3W

  • Quote

Post by NeddySeagoon » Wed Dec 14, 2022 8:42 pm

Irets,

Code: Select all

emerge -1ap media-sound/alsa-utils
!!! /etc/portage/binrepos.conf is missing (or PORTAGE_BINHOST is unset), but use is requested.
...
-- edit --

Its actually confusion, so that snip is not useful.

Code: Select all

       --usepkgonly [ y | n ], -K
              Tells emerge to only use binary packages (from $PKGDIR).  All the binary packages must  be  available
              at  the  time  of  dependency  calculation  or emerge will simply abort.  Portage does not use ebuild
              repositories when calculating dependency information so all masking information is ignored.  Like  -k
              above,  this  option implies --with-bdeps=n.  To include build time dependencies, --with-bdeps=y must
              be specified explicitly.

       --getbinpkg [ y | n ], -g
              Using  the  server  and location defined in PORTAGE_BINHOST (see make.conf(5)), portage will download
              the information from each binary package found and it will use that information to help build the de‐
              pendency list.  This option implies -k.  (Use -gK for binary-only merging.)

       --getbinpkgonly [ y | n ], -G
              This  option  is identical to -g, as above, except binaries from the remote server are preferred over
              local packages if they are not identical.
Its two different options for local and remote binhosts.

Your make.conf says --getbinpkgonly ... but that for a remote binhost ...

emerge -K ... should work os it will override make.conf.
Last edited by NeddySeagoon on Wed Dec 14, 2022 8:50 pm, edited 1 time in total.
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Top
irets
Apprentice
Apprentice
User avatar
Posts: 241
Joined: Tue Dec 17, 2019 12:57 pm

  • Quote

Post by irets » Wed Dec 14, 2022 8:44 pm

After some wiki'ing, I realized that I likely need to configure the PORTAGE_BINHOST variable.
I chose SSH for this approach.

After creating a pair a keys for the root account and copying them over to my desktop, I added

Code: Select all

PORTAGE_BINHOST="ssh://root@192.168.1.101/var/cache/binpkgs"
to the make.conf of my laptop.
The output has changed slightly but the packages aren't available yet.

Code: Select all

 emerge -av alsa-utils pavucontrol
cat: /var/cache/binpkgs/Packages: No such file or directory


!!! Binhost package index  has no TIMESTAMP field.

 * IMPORTANT: 11 news items need reading for repository 'gentoo'.
 * Use eselect news read to view new items.

cat: /var/cache/binpkgs/Packages: No such file or directory


!!! Binhost package index  has no TIMESTAMP field.

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

Calculating dependencies... done!

emerge: there are no binary packages to satisfy "alsa-utils".

emerge: searching for similar names...
emerge: Maybe you meant any of these: app-misc/pax-utils, dev-util/glib-utils, app-arch/xz-utils?
cat: /var/cache/binpkgs/Packages: No such file or directory seems like a clue in the output.

EDIT:
Fixed the PORTAGE_BINHOST variable to "ssh://root@192.168.1.101/mnt/t400chroot/var/cache/binpkgs".
Now I'm seeing a nice list of packages to be merged.

Code: Select all

 emerge -av alsa-utils pavucontrol

 * IMPORTANT: 11 news items need reading for repository 'gentoo'.
 * Use eselect news read to view new items.


Local copy of remote index is up-to-date and will be used.

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

Calculating dependencies... done!
[binary  N     ] dev-libs/libsigc++-2.10.8-1:2::gentoo  USE="-gtk-doc -test" ABI_X86="(64) -32 (-x32)" 117 KiB
[binary  N     ] x11-themes/sound-theme-freedesktop-0.8-1::gentoo  383 KiB
[binary  N     ] media-libs/libsamplerate-0.2.2-1::gentoo  USE="-test" ABI_X86="(64) -32 (-x32)" 1,419 KiB
[binary  N     ] dev-cpp/glibmm-2.66.5-1:2::gentoo  USE="-debug -gtk-doc -test" ABI_X86="(64) -32 (-x32)" 1,420 KiB
[binary  N     ] dev-cpp/cairomm-1.14.4-1::gentoo  USE="X -gtk-doc -test" ABI_X86="(64) -32 (-x32)" 157 KiB
[binary  N     ] dev-libs/json-glib-1.6.6-r1-1::gentoo  USE="introspection -gtk-doc" ABI_X86="(64) -32 (-x32)" 233 KiB
[binary  N     ] media-libs/libcanberra-0.30-r7-1::gentoo  USE="gtk3 pulseaudio sound -alsa -gnome -gstreamer -gtk2 -oss -tdb -udev" ABI_X86="(64) -32 (-x32)" 114 KiB
[binary  N     ] media-sound/alsa-utils-1.2.7-r1-1:0.9::gentoo  USE="libsamplerate ncurses nls -bat -doc -ieee1394 (-selinux)" 1,292 KiB
[binary  N     ] dev-cpp/atkmm-2.28.3-1::gentoo  USE="-gtk-doc" ABI_X86="(64) -32 (-x32)" 166 KiB
[binary  N     ] dev-cpp/pangomm-2.46.3-1:1.4::gentoo  USE="-gtk-doc" ABI_X86="(64) -32 (-x32)" 169 KiB
[binary  N     ] dev-cpp/gtkmm-3.24.7-1:3.0::gentoo  USE="X (-aqua) -gtk-doc -test -wayland" ABI_X86="(64) -32 (-x32)" 2,112 KiB
[binary  N     ] media-sound/pavucontrol-5.0-r1-1::gentoo  USE="nls" 235 KiB

Total: 12 packages (12 new, 12 binaries), Size of downloads: 7,810 KiB
Top
irets
Apprentice
Apprentice
User avatar
Posts: 241
Joined: Tue Dec 17, 2019 12:57 pm

  • Quote

Post by irets » Wed Dec 14, 2022 9:09 pm

As a test, I emerged yt-dlp inside the chroot and then ran the same command on my laptop afterwards to be greeted with all the same packages on the merge queue, but in binary form!
This is exactly how I wanted it to be.

Neddy, I'll keep that -K trick in mind.

Thank you to everyone who took their time to write and to assist me in this thread.

Marking as [SOLVED]. :)
Top
Post Reply

13 posts • Page 1 of 1

Return to “Installing Gentoo”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic