You are not logged in.

#1 2020-07-07 21:26:10

vr4b4c
Member
Registered: 2008-12-30
Posts: 37

Building in a clean chroot problem with strip and download

I followed this wiki to create chroot enviroment https://wiki.archlinux.org/index.php/De … ean_chroot , this process went fine, but I am unable to build any packages, I am always getting the following error messages:

==> ERROR: Cannot find the strip binary required for object file stripping.
==> ERROR: Could not download sources.

I even tried the Convenience_way https://wiki.archlinux.org/index.php/De … nience_way

~/vdr/vdr4arch/vdr-git $ ls
PKGBUILD  vdr.install
~/vdr/vdr4arch/vdr-git $ extra-x86_64-build
:: Synchronizing package databases...
 core is up to date
 extra is up to date
 community is up to date
:: Starting full system upgrade...
 there is nothing to do
==> Building in chroot for [extra] (x86_64)...
==> Synchronizing chroot copy [/var/lib/archbuild/extra-x86_64/root] -> [crow]...done
==> ERROR: Cannot find the strip binary required for object file stripping.
==> ERROR: Could not download sources.
~/vdr/vdr4arch/vdr-git $

I tried also other packages, but without luck. Seems I cannot compile any packages.

On IRC I was asked if the /opt/ or /var separate filesystem are, and they are indeed:

$ mount | grep vg00
/dev/mapper/vg00-lv_root on / type ext4 (rw,relatime)
/dev/mapper/vg00-lv_home on /home type ext4 (rw,relatime)
/dev/mapper/vg00-lv_opt on /opt type ext4 (rw,relatime)
/dev/mapper/vg00-lv_var on /var type ext4 (rw,relatime)
/dev/mapper/vg00-lv_var_log on /var/log type ext4 (rw,relatime)
$

Offline

#2 2020-07-07 23:25:00

Scimmia
Fellow
Registered: 2012-09-01
Posts: 11,553

Re: Building in a clean chroot problem with strip and download

Delete the chroot (/var/lib/archbuild/*) and try again. You should see it installing all of base-devel, including binutils which has the strip binary.

Offline

#3 2020-07-08 01:06:24

eschwartz
Fellow
Registered: 2014-08-08
Posts: 4,097

Re: Building in a clean chroot problem with strip and download

Source downloading happens outside the chroot, not inside it. You must be able to run makepg --verifysource -f *before* running makechrootpkg. If you cannot, then makechrootpkg will fail too, as one of the first things it does is drop permissions back to your user in order to run makepg --verifysource -f.

Last edited by eschwartz (2020-07-08 01:21:11)


Managing AUR repos The Right Way -- aurpublish (now a standalone tool)

Offline

#4 2020-07-08 04:16:31

vr4b4c
Member
Registered: 2008-12-30
Posts: 37

Re: Building in a clean chroot problem with strip and download

@Scimmia this with "extra-x86_64-build" after the Classic way of chroot did not work. First time the script was installing base-devel to /var/lib/archbuild/* second time it just checks for updates. But I did that again, saw message about installing base-devel but still end error is like that in first post.

@eschwartz
In that same directory (where PKGBUILD file is) the makepkg --verifysource -f pass the check and finish successfully:

 makepkg --verifysource -f
==> Making package: vdr-git 2.4.1.r6.g930c2cd-1 (2020-07-08T06:14:42 CEST)
==> Retrieving sources...
  -> Updating vdr-git git repo...
Fetching origin
Auto packing the repository in background for optimum performance.
See "git help gc" for manual housekeeping.
  -> Found vdr-MainMenuHooks.patch
  -> Found 00-vdr.conf
  -> Found 50-hello.conf
  -> Found 50-pictures.conf
  -> Found 60-create-dvb-device-units.rules
  -> Found gen-sddropin
  -> Found shutdown.sh
  -> Found shutdown-wrapper.c
  -> Found vdr.service
  -> Found vdr.sysuser
==> Validating source files with md5sums...
    vdr-git ... Skipped
    vdr-MainMenuHooks.patch ... Passed
    00-vdr.conf ... Passed
    50-hello.conf ... Passed
    50-pictures.conf ... Passed
    60-create-dvb-device-units.rules ... Passed
    gen-sddropin ... Passed
    shutdown.sh ... Passed
    shutdown-wrapper.c ... Passed
    vdr.service ... Passed
    vdr.sysuser ... Passed
~/vdr/vdr4arch/vdr-git $

also creating that same package outside the chroot env works fine

makepkg -sC
....
==> Finished making: vdr-git 2.4.3.r0.ga526eee1-1 (2020-07-08T06:19:21 CEST)

Last edited by vr4b4c (2020-07-08 04:21:25)

Offline

#5 2020-07-08 04:31:25

eschwartz
Fellow
Registered: 2014-08-08
Posts: 4,097

Re: Building in a clean chroot problem with strip and download

Well, it is failing to run:

sudo -u "$makepkg_user" --preserve-env=GNUPGHOME \
	env SRCDEST="$SRCDEST" BUILDDIR="$WORKDIR" \
	makepkg --config="$copydir/etc/makepkg.conf" --verifysource -o "${verifysource_args[@]}" ||
	die "Could not download sources."

Did you disable stripping in /etc/makepkg.conf and uninstall the "binutils" package? The temporary makepkg.conf from the chroot will re-enable stripping...


Managing AUR repos The Right Way -- aurpublish (now a standalone tool)

Offline

#6 2020-07-08 06:18:27

vr4b4c
Member
Registered: 2008-12-30
Posts: 37

Re: Building in a clean chroot problem with strip and download

I think that I did not changed the /etc/makepkg.conf

$ grep "OPTIONS=" /etc/makepkg.conf
# Default: OPTIONS=(!strip docs libtool staticlibs emptydirs !zipman !purge !debug)
OPTIONS=(strip docs !libtool !staticlibs emptydirs zipman purge !debug)
$

binutils package is installed local and also inside chroot.

Offline

#7 2020-07-08 08:03:35

a821
Member
Registered: 2012-10-31
Posts: 381

Re: Building in a clean chroot problem with strip and download

vr4b4c wrote:

@Scimmia this with "extra-x86_64-build" after the Classic way of chroot did not work. First time the script was installing base-devel to /var/lib/archbuild/* second time it just checks for updates. But I did that again, saw message about installing base-devel but still end error is like that in first post.

Post the full output. Also post `/etc/makepkg.conf`

Offline

#8 2020-07-08 09:44:44

vr4b4c
Member
Registered: 2008-12-30
Posts: 37

Re: Building in a clean chroot problem with strip and download

here the whole file

https://bpa.st/5BJA
https://bpa.st/F54Q

Last edited by vr4b4c (2020-07-08 09:48:32)

Offline

#9 2020-07-08 10:54:32

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,919

Re: Building in a clean chroot problem with strip and download

That pastebin service truncates longer lines, see if you can configure it to not do that (or use another service).

==> ERROR: Cannot find the git package needed to handle git sources.

Add git to makedepends array.



perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
        LANGUAGE = (unset),
        LC_ALL = (unset),
        LC_TIME = "en_DK.utf8",
        LC_COLLATE = "C",
        LC_NUMERIC = "en_DK.utf8",
        LANG = "C"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
(2/3) Updating the info directory file...
(3/3) Rebuilding certificate stores...
Initializing machine ID from random generator.
Generating locales...
  en_US.UTF-8... done
  de_DE.UTF-8... done
Generation complete.

Check the locale settings on your system, https://wiki.archlinux.org/index.php/Lo … the_locale


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#10 2020-07-08 17:39:58

vr4b4c
Member
Registered: 2008-12-30
Posts: 37

Re: Building in a clean chroot problem with strip and download

@Lone_Wolf thanks about git hint for makedependens array, but that one was just an random packages, also other without git would fail.

Regarding locale settings, here i have three locales enabled and configured, not sure why the "en_DK.utf8" is not in chroot env and where from the "de_DE.utf8" is comming from.

$ cat /etc/locale.conf
LANG=en_US.UTF-8
LC_COLLATE=C
LC_DATE=en_DK.utf8
LC_NUMERIC=en_DK.utf8
LC_TIME=en_DK.utf8
$ locale
LANG=en_US.UTF-8
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC=en_DK.utf8
LC_TIME=en_DK.utf8
LC_COLLATE=C
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=
$ localedef --list-archive
de_AT.utf8
en_DK.utf8
en_US.utf8
$

Offline

#11 2020-07-08 17:56:14

eschwartz
Fellow
Registered: 2014-08-08
Posts: 4,097

Re: Building in a clean chroot problem with strip and download

Your new error successfully downloaded sources and only failed inside the chroot. It's a completely separate problem unrelated to this thread.


Managing AUR repos The Right Way -- aurpublish (now a standalone tool)

Offline

#12 2020-07-08 18:33:41

vr4b4c
Member
Registered: 2008-12-30
Posts: 37

Re: Building in a clean chroot problem with strip and download

I found out that if I don't have "base-devel" installed outside the chroot the download will not work:

$ extra-x86_64-build
:: Synchronizing package databases...
 core is up to date
 extra is up to date
 community                                                       5.0 MiB  14.9 MiB/s 00:00 [####################################################] 100%
:: Starting full system upgrade...
 there is nothing to do
==> Building in chroot for [extra] (x86_64)...
==> Synchronizing chroot copy [/var/lib/archbuild/extra-x86_64/root] -> [crow]...done
==> ERROR: Cannot find the strip binary required for object file stripping.
==> ERROR: Could not download sources.
$ makepkg --verifysource -f
==> ERROR: Cannot find the strip binary required for object file stripping.
$

If I install base-devel or just binutils (which installs elfutils and  libmicrohttpd) I am able to download and compile inside chroot:

https://bpa.st/AIXA

Offline

#13 2020-07-08 19:01:27

eschwartz
Fellow
Registered: 2014-08-08
Posts: 4,097

Re: Building in a clean chroot problem with strip and download

vr4b4c wrote:

binutils package is installed local and also inside chroot.

Now you say it wasn't installed after all?

vr4b4c wrote:

If I install base-devel or just binutils (which installs elfutils and  libmicrohttpd)

Is this a problem? Had you previously decided to uninstall it because you did not want these installed?


Managing AUR repos The Right Way -- aurpublish (now a standalone tool)

Offline

#14 2020-07-08 19:20:08

vr4b4c
Member
Registered: 2008-12-30
Posts: 37

Re: Building in a clean chroot problem with strip and download

I wrote that for compiling outside chroot (to test if packages compile at all) I did installed base-devel (after I tried both way to compile package in chroot), which is not desired ( I would like to have this an clean install and only compiling in chroot), as I trough chroot does not need anything outside but the "devtools" package. Is my assumption right?
If base-devel is also needed outside chroot env then thats fine also, just devtools did not installed these by itself.

Offline

#15 2020-07-08 19:23:06

eschwartz
Fellow
Registered: 2014-08-08
Posts: 4,097

Re: Building in a clean chroot problem with strip and download

I don't care what you thought.

I care what you said. You *said* that you had, in fact, installed binutils.

vr4b4c wrote:

If base-devel is also needed outside chroot env then thats fine also, just devtools did not installed these by itself.

base-devel is a group and cannot be a dependency of a package.


Managing AUR repos The Right Way -- aurpublish (now a standalone tool)

Offline

#16 2020-07-08 19:37:32

vr4b4c
Member
Registered: 2008-12-30
Posts: 37

Re: Building in a clean chroot problem with strip and download

eschwartz wrote:

I don't care what you thought.
I care what you said. You *said* that you had, in fact, installed binutils.

I was wrong, I installed base-devel outside the chroot after I tried both ways to compile inside the chroot environment. And when you asked if I did uninstalled binutils package, i verified if it is installed and it was, and that's reason I wrote that is installed inside the chroot and also outside.

But then I removed all packages from base-devel (the ones which are installed additionally "elfutils guile libmicrohttpd libmpc autoconf automake binutils bison fakeroot flex gcc groff m4 make patch pkgconf which" ) after testing if packages compiles fine outside the chroot environment, and saw then again that chroot env gives me same error as when starting this thread.

So binutils is a must for chroot along with devtools?

Last edited by vr4b4c (2020-07-08 19:40:09)

Offline

#17 2020-07-08 20:02:16

eschwartz
Fellow
Registered: 2014-08-08
Posts: 4,097

Re: Building in a clean chroot problem with strip and download

Parts of base-devel are requirements for running makepkg. The parts of base-devel which aren't requirements for running makepkg, are implicit requirements for building packages.

e.g. makepkg checks for strip, because it internally uses strip. But makepkg doesn't check for gcc, because it doesn't use it internally... even though as a general rule everything needs the compiler in order to, well, compile.

tl;dr if you want to be able to run makepkg, install base-devel. If you know what you're doing and you've read the makepkg source code, you might be able to remove some, but not all, of those packages... but then most PKGBUILDs will fail in prepare() or build() due to missing programs.


Managing AUR repos The Right Way -- aurpublish (now a standalone tool)

Offline

Board footer

Powered by FluxBB