void-linux/xbps

Unable to build xbps

dnkmmr69420 opened this issue · 4 comments

here is the log

[vm@archlinux ~]$ distrobox create -i archlinux:latest -n xbps-install
Creating 'xbps-install' using image archlinux:latest [ OK ]
Distrobox 'xbps-install' successfully created.
To enter, run:

distrobox enter xbps-install

xbps-install
[vm@archlinux ~]$ distrobox enter xbps-install
Container xbps-install is not running.
Starting container xbps-install
run this command to follow along:

podman logs -f xbps-install

Starting container... [ OK ]
Installing basic packages... [ OK ]
Setting up read-only mounts... [ OK ]
Setting up read-write mounts... [ OK ]
Setting up host's sockets integration... [ OK ]
Integrating host's themes, icons, fonts... [ OK ]
Setting up package manager exceptions... [ OK ]
Setting up pacman exceptions... [ OK ]
Setting up pacman hooks... [ OK ]
Setting up sudo... [ OK ]
Setting up groups... [ OK ]
Setting up users... [ OK ]
Setting up sudo... [ OK ]
Setting up groups... [ OK ]
Setting up users... [ OK ]
Executing init hooks... [ OK ]

Container Setup Complete!
[vm@xbps-install ~]$ sudo pacman -S base-devel
:: There are 26 members in group base-devel:
:: Repository core

  1. archlinux-keyring 2) autoconf 3) automake 4) binutils 5) bison
  2. debugedit 7) fakeroot 8) file 9) findutils 10) flex 11) gawk
  3. gcc 13) gettext 14) grep 15) groff 16) gzip 17) libtool 18) m4
  4. make 20) pacman 21) patch 22) pkgconf 23) sed 24) sudo 25) texinfo
  5. which

Enter a selection (default=all):
warning: archlinux-keyring-20221220-1 is up to date -- reinstalling
warning: file-5.44-1 is up to date -- reinstalling
warning: findutils-4.9.0-2 is up to date -- reinstalling
warning: gawk-5.2.1-1 is up to date -- reinstalling
warning: gettext-0.21.1-2 is up to date -- reinstalling
warning: grep-3.8-2 is up to date -- reinstalling
warning: gzip-1.12-1 is up to date -- reinstalling
warning: pacman-6.0.2-5 is up to date -- reinstalling
warning: sed-4.9-1 is up to date -- reinstalling
warning: sudo-1.9.12.p2-1 is up to date -- reinstalling
resolving dependencies...
looking for conflicting packages...

warning: insufficient columns available for table display
Packages (33) db5.3-5.3.28-2 gc-8.2.2-1 guile-3.0.9-1 jansson-2.14-2
libisl-0.25-1 libmpc-1.3.1-1 perl-5.36.0-3
archlinux-keyring-20221220-1 autoconf-2.71-1 automake-1.16.5-1
binutils-2.40-2 bison-3.8.2-4 debugedit-5.0-4
fakeroot-1.30.1-1 file-5.44-1 findutils-4.9.0-2 flex-2.6.4-4
gawk-5.2.1-1 gcc-12.2.1-1 gettext-0.21.1-2 grep-3.8-2
groff-1.22.4-7 gzip-1.12-1 libtool-2.4.7+4+g1ec8fa28-1
m4-1.4.19-2 make-4.4-1 pacman-6.0.2-5 patch-2.7.6-8
pkgconf-1.8.0-1 sed-4.9-1 sudo-1.9.12.p2-1 texinfo-7.0.2-1
which-2.21-5

Total Download Size: 91.12 MiB
Total Installed Size: 398.70 MiB
Net Upgrade Size: 364.19 MiB

:: Proceed with installation? [Y/n] y
:: Retrieving packages...
groff-1.22.4-7-x... 2.2 MiB 710 KiB/s 00:03 [######################] 100%
gettext-0.21.1-2... 1823.1 KiB 1215 KiB/s 00:02 [######################] 100%
binutils-2.40-2-... 7.1 MiB 1529 KiB/s 00:05 [######################] 100%
perl-5.36.0-3-x86_64 15.6 MiB 2.94 MiB/s 00:05 [######################] 100%
guile-3.0.9-1-x86_64 8.1 MiB 1321 KiB/s 00:06 [######################] 100%
texinfo-7.0.2-1-... 1607.5 KiB 1051 KiB/s 00:02 [######################] 100%
gawk-5.2.1-1-x86_64 1246.2 KiB 556 KiB/s 00:02 [######################] 100%
db5.3-5.3.28-2-x... 1229.3 KiB 732 KiB/s 00:02 [######################] 100%
gcc-12.2.1-1-x86_64 44.6 MiB 5.59 MiB/s 00:08 [######################] 100%
archlinux-keyrin... 1153.7 KiB 954 KiB/s 00:01 [######################] 100%
pacman-6.0.2-5-x... 924.1 KiB 777 KiB/s 00:01 [######################] 100%
libisl-0.25-1-x86_64 852.1 KiB 1053 KiB/s 00:01 [######################] 100%
bison-3.8.2-4-x86_64 769.8 KiB 1149 KiB/s 00:01 [######################] 100%
autoconf-2.71-1-any 645.2 KiB 768 KiB/s 00:01 [######################] 100%
automake-1.16.5-... 612.8 KiB 973 KiB/s 00:01 [######################] 100%
make-4.4-1-x86_64 519.2 KiB 1180 KiB/s 00:00 [######################] 100%
libtool-2.4.7+4+... 412.4 KiB 1031 KiB/s 00:00 [######################] 100%
file-5.44-1-x86_64 385.2 KiB 1041 KiB/s 00:00 [######################] 100%
flex-2.6.4-4-x86_64 307.7 KiB 1026 KiB/s 00:00 [######################] 100%
m4-1.4.19-2-x86_64 246.0 KiB 984 KiB/s 00:00 [######################] 100%
gc-8.2.2-1-x86_64 233.2 KiB 1060 KiB/s 00:00 [######################] 100%
grep-3.8-2-x86_64 229.9 KiB 1095 KiB/s 00:00 [######################] 100%
sed-4.9-1-x86_64 210.7 KiB 1053 KiB/s 00:00 [######################] 100%
patch-2.7.6-8-x86_64 92.5 KiB 617 KiB/s 00:00 [######################] 100%
libmpc-1.3.1-1-x... 84.2 KiB 602 KiB/s 00:00 [######################] 100%
gzip-1.12-1-x86_64 79.6 KiB 796 KiB/s 00:00 [######################] 100%
fakeroot-1.30.1-... 69.6 KiB 535 KiB/s 00:00 [######################] 100%
pkgconf-1.8.0-1-... 57.6 KiB 576 KiB/s 00:00 [######################] 100%
jansson-2.14-2-x... 51.7 KiB 470 KiB/s 00:00 [######################] 100%
debugedit-5.0-4-... 43.8 KiB 486 KiB/s 00:00 [######################] 100%
which-2.21-5-x86_64 15.8 KiB 144 KiB/s 00:00 [######################] 100%
Total (31/31) 91.1 MiB 8.75 MiB/s 00:10 [######################] 100%
(33/33) checking keys in keyring [######################] 100%
(33/33) checking package integrity [######################] 100%
(33/33) loading package files [######################] 100%
(33/33) checking for file conflicts [######################] 100%
:: Running pre-transaction hooks...
(1/1) Distrobox hook 00_distrobox_pre_hook...
:: Processing package changes...
( 1/33) reinstalling gettext [######################] 100%
( 2/33) reinstalling gawk [######################] 100%
( 3/33) reinstalling grep [######################] 100%
( 4/33) reinstalling findutils [######################] 100%
( 5/33) reinstalling pacman [######################] 100%
( 6/33) reinstalling archlinux-keyring [######################] 100%
==> ERROR: There is no secret key available to sign with.
==> Use 'pacman-key --init' to generate a default secret key.
==> Updating trust database...
gpg: next trustdb check due at 2023-04-21
( 7/33) installing m4 [######################] 100%
( 8/33) installing db5.3 [######################] 100%
( 9/33) installing perl [######################] 100%
(10/33) installing autoconf [######################] 100%
(11/33) installing automake [######################] 100%
(12/33) installing jansson [######################] 100%
(13/33) installing binutils [######################] 100%
Optional dependencies for binutils
debuginfod: for debuginfod server/client functionality
(14/33) installing bison [######################] 100%
(15/33) installing debugedit [######################] 100%
(16/33) reinstalling sed [######################] 100%
(17/33) reinstalling file [######################] 100%
(18/33) installing fakeroot [######################] 100%
(19/33) installing flex [######################] 100%
(20/33) installing libmpc [######################] 100%
(21/33) installing libisl [######################] 100%
(22/33) installing gcc [######################] 100%
Optional dependencies for gcc
lib32-gcc-libs: for generating code for 32-bit ABI
(23/33) installing groff [######################] 100%
Optional dependencies for groff
netpbm: for use together with man -H command interaction in browsers
psutils: for use together with man -H command interaction in browsers
libxaw: for gxditview
perl-file-homedir: for use with glilypond
(24/33) reinstalling gzip [######################] 100%
(25/33) installing libtool [######################] 100%
(26/33) installing gc [######################] 100%
(27/33) installing guile [######################] 100%
(28/33) installing make [######################] 100%
(29/33) installing patch [######################] 100%
Optional dependencies for patch
ed: for patch -e functionality
(30/33) installing pkgconf [######################] 100%
(31/33) reinstalling sudo [######################] 100%
(32/33) installing texinfo [######################] 100%
(33/33) installing which [######################] 100%
:: Running post-transaction hooks...
(1/7) Distrobox hook 01_distrobox_post_hook...
(2/7) Distrobox hook 02_distrobox_post_hook...
(3/7) Reloading system manager configuration...
(4/7) Creating temporary files...
(5/7) Arming ConditionNeedsUpdate...
(6/7) Warn about old perl modules
(7/7) Updating the info directory file...
[vm@xbps-install ~]$ sudo pacman -S clang gcc pcc tcc openssl zlib pkgconf
warning: gcc-12.2.1-1 is up to date -- reinstalling
error: target not found: pcc
warning: openssl-3.0.7-4 is up to date -- reinstalling
warning: zlib-1:1.2.13-2 is up to date -- reinstalling
warning: pkgconf-1.8.0-1 is up to date -- reinstalling
[vm@xbps-install ~]$ sudo pacman -S clang
resolving dependencies...
looking for conflicting packages...

Package (2) New Version Net Change Download Size

extra/compiler-rt 15.0.7-1 39.45 MiB 3.22 MiB
extra/clang 15.0.7-1 194.61 MiB 39.25 MiB

Total Download Size: 42.47 MiB
Total Installed Size: 234.06 MiB

:: Proceed with installation? [Y/n] y
:: Retrieving packages...
compiler-rt-15.0... 3.2 MiB 2.15 MiB/s 00:02 [######################] 100%
clang-15.0.7-1-x... 39.3 MiB 6.53 MiB/s 00:06 [######################] 100%
Total (2/2) 42.5 MiB 6.97 MiB/s 00:06 [######################] 100%
(2/2) checking keys in keyring [######################] 100%
(2/2) checking package integrity [######################] 100%
(2/2) loading package files [######################] 100%
(2/2) checking for file conflicts [######################] 100%
:: Running pre-transaction hooks...
(1/1) Distrobox hook 00_distrobox_pre_hook...
:: Processing package changes...
(1/2) installing compiler-rt [######################] 100%
(2/2) installing clang [######################] 100%
Optional dependencies for clang
openmp: OpenMP support in clang with -fopenmp
python: for scan-view and git-clang-format
llvm: referenced by some clang headers
:: Running post-transaction hooks...
(1/3) Distrobox hook 01_distrobox_post_hook...
(2/3) Distrobox hook 02_distrobox_post_hook...
(3/3) Arming ConditionNeedsUpdate...
[vm@xbps-install ~]$ sudo pacman -S libarchive
warning: libarchive-3.6.2-2 is up to date -- reinstalling
resolving dependencies...
looking for conflicting packages...

Package (1) Old Version New Version Net Change Download Size

core/libarchive 3.6.2-2 3.6.2-2 0.00 MiB 0.51 MiB

Total Download Size: 0.51 MiB
Total Installed Size: 1.12 MiB
Net Upgrade Size: 0.00 MiB

:: Proceed with installation? [Y/n] y
:: Retrieving packages...
libarchive-3.6.2... 522.3 KiB 432 KiB/s 00:01 [######################] 100%
(1/1) checking keys in keyring [######################] 100%
(1/1) checking package integrity [######################] 100%
(1/1) loading package files [######################] 100%
(1/1) checking for file conflicts [######################] 100%
:: Running pre-transaction hooks...
(1/1) Distrobox hook 00_distrobox_pre_hook...
:: Processing package changes...
(1/1) reinstalling libarchive [######################] 100%
:: Running post-transaction hooks...
(1/3) Distrobox hook 01_distrobox_post_hook...
(2/3) Distrobox hook 02_distrobox_post_hook...
(3/3) Arming ConditionNeedsUpdate...
[vm@xbps-install ~]$ git clone https://github.com/void-linux/xbps
bash: git: command not found
[vm@xbps-install ~]$ sudo pacman -S git
resolving dependencies...
looking for conflicting packages...

Package (4) New Version Net Change Download Size

extra/perl-error 0.17029-4 0.04 MiB 0.02 MiB
extra/perl-mailtools 2.21-6 0.11 MiB 0.06 MiB
extra/perl-timedate 2.33-4 0.08 MiB 0.03 MiB
extra/git 2.39.1-1 37.41 MiB 6.58 MiB

Total Download Size: 6.69 MiB
Total Installed Size: 37.64 MiB

:: Proceed with installation? [Y/n] y
:: Retrieving packages...
perl-timedate-2.... 35.8 KiB 99.4 KiB/s 00:00 [######################] 100%
perl-error-0.170... 21.8 KiB 58.9 KiB/s 00:00 [######################] 100%
perl-mailtools-2... 62.2 KiB 138 KiB/s 00:00 [######################] 100%
git-2.39.1-1-x86_64 6.6 MiB 2.16 MiB/s 00:03 [######################] 100%
Total (4/4) 6.7 MiB 2.15 MiB/s 00:03 [######################] 100%
(4/4) checking keys in keyring [######################] 100%
(4/4) checking package integrity [######################] 100%
(4/4) loading package files [######################] 100%
(4/4) checking for file conflicts [######################] 100%
:: Running pre-transaction hooks...
(1/1) Distrobox hook 00_distrobox_pre_hook...
:: Processing package changes...
(1/4) installing perl-error [######################] 100%
(2/4) installing perl-timedate [######################] 100%
(3/4) installing perl-mailtools [######################] 100%
(4/4) installing git [######################] 100%
Optional dependencies for git
tk: gitk and git gui
perl-libwww: git svn
perl-term-readkey: git svn and interactive.singlekey setting
perl-io-socket-ssl: git send-email TLS support
perl-authen-sasl: git send-email TLS support
perl-mediawiki-api: git mediawiki support
perl-datetime-format-iso8601: git mediawiki support
perl-lwp-protocol-https: git mediawiki https support
perl-cgi: gitweb (web interface) support
python: git svn & git p4
subversion: git svn
org.freedesktop.secrets: keyring credential helper
libsecret: libsecret credential helper [installed]
:: Running post-transaction hooks...
(1/6) Distrobox hook 01_distrobox_post_hook...
(2/6) Distrobox hook 02_distrobox_post_hook...
(3/6) Creating system user accounts...
(4/6) Reloading system manager configuration...
(5/6) Arming ConditionNeedsUpdate...
(6/6) Warn about old perl modules
[vm@xbps-install ~]$ git clone https://github.com/void-linux/xbps
Cloning into 'xbps'...
remote: Enumerating objects: 23409, done.
remote: Counting objects: 100% (232/232), done.
remote: Compressing objects: 100% (133/133), done.
remote: Total 23409 (delta 101), reused 202 (delta 88), pack-reused 23177
Receiving objects: 100% (23409/23409), 9.92 MiB | 3.22 MiB/s, done.
Resolving deltas: 100% (15006/15006), done.
[vm@xbps-install ~]$ cd xbps
[vm@xbps-install xbps]$ ./configure --enable-rpath --prefix=/home/vm/xbps-prefix/usr --sysconfdir=/home/vm/xbps-prefix/etc
Configuring xbps for ... linux
Looking for compiler ... gcc
Building with debugging symbols.
Checking if gcc supports -Wl,--no-as-needed ... yes.
Checking if gcc supports -Wall ... yes.
Checking if gcc supports -Wextra ... yes.
Checking if gcc supports -Werror ... yes.
Checking if gcc supports -Wshadow ... yes.
Checking if gcc supports -Wformat=2 ... yes.
Checking if gcc supports -Wmissing-prototypes ... yes.
Checking if gcc supports -Wmissing-declarations ... yes.
Checking if gcc supports -Wnested-externs ... yes.
Checking if gcc supports -Wvla ... yes.
Checking if gcc supports -Woverlength-strings ... yes.
Checking if gcc supports -Wunsafe-loop-optimizations ... yes.
Checking if gcc supports -Wundef ... yes.
Checking if gcc supports -Wsign-compare ... yes.
Checking if gcc supports -Wmissing-include-dirs ... yes.
Checking if gcc supports -Wold-style-definition ... yes.
Checking if gcc supports -Winit-self ... yes.
Checking if gcc supports -Wredundant-decls ... yes.
Checking if gcc supports -Wfloat-equal ... yes.
Checking if gcc supports -Wmissing-noreturn ... yes.
Checking if gcc supports -Wcast-align ... yes.
Checking if gcc supports -Wcast-qual ... yes.
Checking if gcc supports -Wpointer-arith ... yes.
Checking if gcc supports -Wcomment ... yes.
Checking if gcc supports -Wdeclaration-after-statement ... yes.
Checking if gcc supports -Wwrite-strings ... yes.
Checking if gcc supports -Wstack-protector ... yes.
Checking if gcc supports -fPIC ... yes.
Checking if gcc supports -finline-functions ... yes.
Checking if gcc supports -fstack-protector-strong ... yes.
Checking if gcc supports -fvisibility=default ... yes.
Checking if gcc supports -Wl,--export-dynamic ... yes.
Checking if gcc supports -Wl,-z,relro,-z,now ... yes.
Checking if gcc supports -fPIE ... yes.
Checking if gcc supports -pie ... yes.
Checking if gcc supports -std=c99 ... yes.
Checking for GCC atomic builtins ... yes.
Checking for vasprintf() ... yes.
Checking for strcasestr() ... yes.
Checking for strlcpy() ... no.
Checking for strlcat() ... no.
Checking for strnstr() ... no.
Checking for humanize_number() ... no.
Checking for rb_tree_init() ... no.
Checking for fdatasync() ... yes.
Checking for clock_gettime() ... yes.
Checking for InflateInit2() ... yes.
Checking for pkg-config ... yes
Checking for libarchive >= 3.3.3 via pkg-config ... found version 3.6.2.
Checking for libssl via pkg-config ... found OpenSSL version 3.0.7.

XBPS has been configured with the following options:

PREFIX = /home/vm/xbps-prefix/usr
EPREFIX = /home/vm/xbps-prefix/usr
BINDIR = /home/vm/xbps-prefix/usr/bin
LIBDIR = /home/vm/xbps-prefix/usr/lib
INCLUDEDIR = /home/vm/xbps-prefix/usr/include
SHAREDIR = /home/vm/xbps-prefix/usr/share
MANDIR = /home/vm/xbps-prefix/usr/share/man
ETCDIR = /home/vm/xbps-prefix/etc/xbps.d
DBDIR = /var/db/xbps
CFLAGS =
LDFLAGS =

Build API documentation = no
Build Kyua test suite = no
Build programs as PIE = yes
Build static programs = no
Build with LTO =
Build with debugging = yes
Build with full debug =
Symbol visibility = yes
Build with rpath = yes

You can now run make && make install clean.

[vm@xbps-install xbps]$ make
make[1]: Entering directory '/home/vm/xbps/include'
sed -e "s|@@Version@@|0.60|g" xbps.h.in > xbps.h
make[1]: Leaving directory '/home/vm/xbps/include'
make[1]: Entering directory '/home/vm/xbps/lib'
[GEN] fetch/ftperr.h
[GEN] fetch/httperr.h
[CC] fetch/common.o
[CC] fetch/fetch.o
[CC] fetch/file.o
[CC] fetch/ftp.o
[CC] fetch/http.o
[CC] portableproplib/rb.o
[CC] portableproplib/prop_array.o
[CC] portableproplib/prop_bool.o
[CC] portableproplib/prop_dictionary.o
[CC] portableproplib/prop_ingest.o
[CC] portableproplib/prop_object.o
[CC] portableproplib/prop_stack.o
[CC] portableproplib/prop_string.o
[CC] portableproplib/prop_array_util.o
[CC] portableproplib/prop_number.o
[CC] portableproplib/prop_dictionary_util.o
[CC] portableproplib/prop_zlib.o
[CC] portableproplib/prop_data.o
[CC] package_configure.o
[CC] package_config_files.o
[CC] package_orphans.o
[CC] package_remove.o
[CC] package_state.o
[CC] package_msg.o
[CC] package_unpack.o
[CC] package_register.o
[CC] package_script.o
[CC] verifysig.o
verifysig.c: In function ‘rsa_verify_hash’:
verifysig.c:59:9: error: ‘PEM_read_bio_RSA_PUBKEY’ is deprecated: Since OpenSSL 3.0 [-Werror=deprecated-declarations]
59 | rsa = PEM_read_bio_RSA_PUBKEY(bio, NULL, NULL, NULL);
| ^~~
In file included from /usr/include/openssl/ssl.h:36,
from verifysig.c:38:
/usr/include/openssl/pem.h:449:1: note: declared here
449 | DECLARE_PEM_rw_attr(OSSL_DEPRECATEDIN_3_0, RSA_PUBKEY, RSA)
| ^~~~~~~~~~~~~~~~~~~
verifysig.c:66:9: error: ‘RSA_verify’ is deprecated: Since OpenSSL 3.0 [-Werror=deprecated-declarations]
66 | rv = RSA_verify(NID_sha1, sha256, SHA256_DIGEST_LENGTH, sig, siglen, rsa);
| ^~
In file included from verifysig.c:37:
/usr/include/openssl/rsa.h:351:27: note: declared here
351 | OSSL_DEPRECATEDIN_3_0 int RSA_verify(int type, const unsigned char *m,
| ^~~~~~~~~~
verifysig.c:67:9: error: ‘RSA_free’ is deprecated: Since OpenSSL 3.0 [-Werror=deprecated-declarations]
67 | RSA_free(rsa);
| ^~~~~~~~
/usr/include/openssl/rsa.h:293:28: note: declared here
293 | OSSL_DEPRECATEDIN_3_0 void RSA_free(RSA *r);
| ^~~~~~~~
cc1: all warnings being treated as errors
make[1]: *** [Makefile:81: verifysig.o] Error 1
make[1]: Leaving directory '/home/vm/xbps/lib'
make: *** [Makefile:15: all] Error 1

Apparently the -Werror is turned on and it treats warnings as errors.

They are warnings from openssl because xbps is using library functions from a previous version of openssl which are now deprecated(in version 3.0) as they are considered not secure(for cryptographic use) and new safe alternatives are introduced(in version 3.0).

I am not 100% sure but the checks are probably regarding file integrity and not for security purposes.

Which means that you can ignore these warnings. I am not aware of the method you are using to build it but you should somehow disable the -Werror option.

xbps currently fails to verify signatures with openssl 3.0, so even if you remove -Werror, this won't work

dkwo commented

Perhaps mention openssl 3 in the title?