[Error] Cannot build any aports with Alpine Image
- Lingua principale
- Go
- Stelle
- 13k
- Fork
- 541
- Merge medio
- 20h 47m
- PR unite (30g)
- 4
Descrizione
Please, before opening a bug:
- make sure you've read the documentation.
- Ensure there isn't already an open issue about this.
- Ensure there isn't already a closed/resolved issue about this.
**Describe the bug**
When trying to build any [aports](https://gitlab.alpinelinux.org/alpine/aports) inside the Alpine, i get an error like the following:
```
>>> wild: Entering fakeroot...
grep: error while loading shared libraries: libc.musl-x86_64.so.1: cannot open shared object file: No such file or directory
>>> ERROR: wild*: No such function set_source_date
>>> ERROR: wild: rootpkg failed
```
**To Reproduce**
1. Assemble and enter the following distrobox:
```
[alpine]
additional_packages=git abuild abuild-rootbld
image=alpine:edge
unshare_groups=true # Needed to install packages with abuild
```
2. Clone [aports](https://gitlab.alpinelinux.org/alpine/aports) and cd into it
3. Generate and install abuild keys with `abuild-keygen -a -i`
4. Add the current user to the abuild group (` sudo addgroup $(whoami) abuild`)
5. cd into any aport directory (e.g. `community/wild`) and run `abuild -r`
6. See issue after package builds and tests pass (but crucially, before the install phase)**Expected behavior**
For this error to not occur, and for abuild to enter the fakeroot successfully.
**Logs**
Verbose `abuild -r`:
```
+ trap - EXIT
+ runpart rootpkg
+ local 'part=rootpkg'
+ is_function rootpkg
+ type rootpkg
+ head -n 1
+ grep -E -q 'is a (shell )?function'
+ '[' -n ]
+ trap 'die '"'"'rootpkg failed'"'" EXIT
+ rootpkg
+ cd /home/me/Repositories/aports/community/wild
+ rm -rf /home/me/Repositories/aports/community/wild/pkg/wild
+ do_fakeroot /usr/bin/abuild -v set_source_date package prepare_subpackages prepare_package create_apks
+ '[' -n fakeroot ]
+ msg 'Entering fakeroot...'
+ '[' -n ]
+ local 'prompt=>>>'
+ local 'fake='
+ local 'name=wild'
+ printf '>>> wild: %s\n' 'Entering fakeroot...'
>>> wild: Entering fakeroot...
+ fakeroot -- /usr/bin/abuild -v set_source_date package prepare_subpackages prepare_package create_apks
+ getopts :AcC:dD:fFhkKmnP:qrs:vV opt
+ shift 1
+ id -u
+ '[' 0 -eq 0 ]
+ '[' -z 1993915894 ]
+ '[' -n ]
+ '[' -f ./APKBUILD ]
+ readlink -f ./APKBUILD
+ APKBUILD=/home/me/Repositories/aports/community/wild/APKBUILD
+ startdir=/home/me/Repositories/aports/community/wild
+ srcdir=/home/me/Repositories/aports/community/wild/src
+ pkgbasedir=/home/me/Repositories/aports/community/wild/pkg
+ tmpdir=/home/me/Repositories/aports/community/wild/tmp
+ repo=/home/me/Repositories/aports/community
+ repo=community
+ aportsgit=/home/me/Repositories/aports/community/wild
+ repo_template=/home/me/Repositories/aports/community/wild/../.rootbld-repositories
+ SRCDEST=/var/cache/distfiles
+ BUILD_ROOT=
+ export CC CXX
+ cd /home/me/Repositories/aports/community/wild
+ . /home/me/Repositories/aports/community/wild/APKBUILD
+ maintainer='Matthias Ahouansou '
+ pkgname=wild
+ pkgver=0.8.0
+ pkgrel=0
+ pkgdesc='Very fast linker for Linux'
+ url=https://github.com/davidlattimore/wild
+ arch='x86_64 aarch64 loongarch64 riscv64'
+ license='MIT OR Apache-2.0'
+ makedepends=cargo-auditable
+ checkdepends='
bash
cmd:clang-format
lld
'
+ depends=clang
+ subpackages=wild-doc
+ source='
wild-0.8.0.tar.gz::https://github.com/davidlattimore/wild/archive/refs/tags/0.8.0.tar.gz
'
+ options=net
+ sha512sums='
dc88b41cdfbbdbff69c4dedf121e30dc5f3543bfab0eb53ebcc35590a200582d2157f752effd0750d9862addd92252dc1e61e60b545a5bb9dcff4a59adcd9217 wild-0.8.0.tar.gz
'
+ builddir=/home/me/Repositories/aports/community/wild/src/wild-0.8.0
+ '[' -z /home/me/packages/ ]
+ export REPODEST SRCDEST
+ '[' -z ]
+ pkgarch=x86_64
+ list_has noarch x86_64 aarch64 loongarch64 riscv64
+ local 'needle=noarch'
+ local i
+ shift
+ '[' noarch '=' x86_64 ]
+ '[' noarch '=' '!x86_64' ]
+ '[' noarch '=' aarch64 ]
+ '[' noarch '=' '!aarch64' ]
+ '[' noarch '=' loongarch64 ]
+ '[' noarch '=' '!loongarch64' ]
+ '[' noarch '=' riscv64 ]
+ '[' noarch '=' '!riscv64' ]
+ return 1
+ '[' -n ]
+ '[' -n ]
+ subpackage_types_has dbg
+ local i
+ local '_name=wild-doc'
+ '[' dbg '=' doc ]
+ return 1
+ export 'GOCACHE=/home/me/Repositories/aports/community/wild/tmp/go'
+ export 'GOMODCACHE=/home/me/Repositories/aports/community/wild/tmp/go'
+ export 'GOTMPDIR=/home/me/Repositories/aports/community/wild/tmp'
+ export 'CARGO_HOME=/home/me/Repositories/aports/community/wild/tmp/cargo'
+ '[' -n ]
+ allpackages='wild wild-doc'
+ apkbuild_arch='x86_64 aarch64 loongarch64 riscv64'
+ pkgdir=/home/me/Repositories/aports/community/wild/pkg/wild
+ controldir=/home/me/Repositories/aports/community/wild/pkg/.control.wild
+ sumalgo=sha512
+ '[' -z '
dc88b41cdfbbdbff69c4dedf121e30dc5f3543bfab0eb53ebcc35590a200582d2157f752effd0750d9862addd92252dc1e61e60b545a5bb9dcff4a59adcd9217 wild-0.8.0.tar.gz
' ]
+ trap 'die "Aborted by user"' INT
+ '[' -z ]
+ set_xterm_title 'abuild: wild'
+ '[' xterm-256color '=' xterm ]
+ '[' -z set_source_date ]
+ '[' 5 -gt 0 ]
+ runpart set_source_date
+ local 'part=set_source_date'
+ is_function set_source_date
+ type set_source_date
+ head -n 1
+ grep -E -q 'is a (shell )?function'
grep: error while loading shared libraries: libc.musl-x86_64.so.1: cannot open shared object file: No such file or directory
+ die 'No such function set_source_date'
+ trap - EXIT
+ error 'No such function set_source_date'
+ local 'prompt=>>> ERROR:'
+ local 'fake=*'
+ local 'name=wild'
+ printf '>>> ERROR: wild*: %s\n' 'No such function set_source_date'
>>> ERROR: wild*: No such function set_source_date
+ logcmd 'ERROR: wild: No such function set_source_date'
+ true 'ERROR: wild: No such function set_source_date'
+ return 0
+ cleanup bldroot deps
+ local 'i='
+ '[' -z ]
+ set_xterm_title
+ '[' xterm-256color '=' xterm ]
+ '[' -n ]
+ '[' ]
+ '[' -n ]
+ exit 1
+ die 'rootpkg failed'
+ trap - EXIT
+ error 'rootpkg failed'
+ local 'prompt=>>> ERROR:'
+ local 'fake='
+ local 'name=wild'
+ printf '>>> ERROR: wild: %s\n' 'rootpkg failed'
>>> ERROR: wild: rootpkg failed
+ logcmd 'ERROR: wild: rootpkg failed'
+ true 'ERROR: wild: rootpkg failed'
+ return 0
+ cleanup bldroot deps
+ local 'i='
+ '[' -z ]
+ set_xterm_title
+ '[' xterm-256color '=' xterm ]
+ '[' -n ]
+ '[' ]
+ '[' -n '.makedepends-wild ' ]
+ msg 'Uninstalling dependencies...'
+ '[' -n ]
+ local 'prompt=>>>'
+ local 'fake='
+ local 'name=wild'
+ printf '>>> wild: %s\n' 'Uninstalling dependencies...'
>>> wild: Uninstalling dependencies...
+ undeps
+ local '_quiet='
+ abuild-apk --no-interactive del --wait 30 .makedepends-wild
( 1/42) Purging .makedepends-wild (20260118.201704)
( 2/42) Purging build-base (0.5-r3)
( 3/42) Purging file-doc (5.46-r2)
( 4/42) Purging file (5.46-r2)
( 5/42) Purging g++ (15.2.0-r2)
( 6/42) Purging make-doc (4.4.1-r3)
( 7/42) Purging make (4.4.1-r3)
( 8/42) Purging cargo-auditable-doc (0.7.2-r0)
( 9/42) Purging cargo-auditable (0.7.2-r0)
(10/42) Purging binutils-doc (2.45.1-r1)
(11/42) Purging cargo-doc (1.92.0-r0)
(12/42) Purging cargo-bash-completions (1.92.0-r0)
(13/42) Purging cargo (1.92.0-r0)
(14/42) Purging rust-doc (1.92.0-r0)
(15/42) Purging rust (1.92.0-r0)
(16/42) Purging clang21-bash-completion (21.1.8-r0)
(17/42) Purging clang21-doc (21.1.8-r0)
(18/42) Purging clang21-extra-tools (21.1.8-r0)
(19/42) Purging clang21 (21.1.8-r0)
(20/42) Purging fortify-headers (1.1-r5)
(21/42) Purging gcc-doc (15.2.0-r2)
(22/42) Purging gcc (15.2.0-r2)
(23/42) Purging binutils (2.45.1-r1)
(24/42) Purging libatomic (15.2.0-r2)
(25/42) Purging libgomp (15.2.0-r2)
(26/42) Purging libstdc++-dev (15.2.0-r2)
(27/42) Purging llvm21-linker-tools (21.1.8-r0)
(28/42) Purging musl-dev (1.2.5-r21)
(29/42) Purging clang21-libclang (21.1.8-r0)
(30/42) Purging clang21-headers (21.1.8-r0)
(31/42) Purging clang21-libs (21.1.8-r0)
(32/42) Purging isl26 (0.26-r1)
(33/42) Purging jansson (2.14.1-r0)
(34/42) Purging libmagic (5.46-r2)
(35/42) Purging lld21-doc (21.1.8-r0)
(36/42) Purging lld21 (21.1.8-r0)
(37/42) Purging lld21-libs (21.1.8-r0)
(38/42) Purging mpc1-doc (1.3.1-r1)
(39/42) Purging mpc1 (1.3.1-r1)
(40/42) Purging mpfr4-doc (4.2.2-r0)
(41/42) Purging mpfr4 (4.2.2-r0)
(42/42) Purging scudo-malloc (21.1.8-r0)
Executing busybox-1.37.0-r31.trigger
OK: 536.4 MiB in 410 packages
+ '[' -n ]
+ exit 1
```
`podman logs --latest`
[podman-logs.txt](https://github.com/user-attachments/files/24698354/podman-logs.txt)
**Desktop (please complete the following information):**
- Are you using podman, docker or lilipod? podman
- Which version or podman, docker or lilipod?
- Which version of distrobox? 5.7.0
- Which host distribution? NixOS unstable
- How did you install distrobox? home-manager (nixpkgs)
**Additional context**
`abuild rootbld` uses a chroot, which for some reason leads to this issue not occuring (unlike `abuild -r`)
Guida per i contributori
Apri la guida per i contributori
Valutazione
Questa issue non è ancora stata valutata.