Package Details: pacman-static 6.1.0-8

Git Clone URL: https://aur.archlinux.org/pacman-static.git (read-only, click to copy)
Package Base: pacman-static
Description: Statically-compiled pacman (to fix or install systems without libc)
Upstream URL: https://www.archlinux.org/pacman/
Licenses: GPL
Submitter: mazieres
Maintainer: Morganamilo (andreas_baumann)
Last Packager: andreas_baumann
Votes: 45
Popularity: 1.89
First Submitted: 2013-01-09 02:17 (UTC)
Last Updated: 2024-05-16 06:27 (UTC)

Dependencies (5)

Required by (0)

Sources (33)

Pinned Comments

Morganamilo commented on 2022-02-20 18:30 (UTC)

There's now a custom repo and binaries again. Though only for x86_64 currently.

Custom Repo
[pacman-static]
SigLevel = Required
Server = https://pkgbuild.com/~morganamilo/$repo/$arch
Pre compiled binaries

https://pkgbuild.com/~morganamilo/pacman-static/x86_64/bin/

Latest Comments

« First ‹ Previous 1 .. 3 4 5 6 7 8 9 10 11 Next › Last »

eschwartz commented on 2021-04-13 13:19 (UTC) (edited on 2021-04-13 13:24 (UTC) by eschwartz)

That's... plausible. I don't generally regenerate my build chroot, so I might have a makepkg.conf.pacnew that needs merging.

(And yes, bzip2 most likely ignores CPPFLAGS the same way it ignores CC and CFLAGS.)

I'll have to check tonight.

oi_wtf commented on 2021-04-13 12:29 (UTC)

Maybe CFLAGS are different? when Googling fprintf_chk I saw mentions of *_chk versions of functions being ones that checks for stack overflows... The incompatibility seems to come from musl implementing this differently... as mentioned at: https://stackoverflow.com/a/55246403/1563584

so this made me remember I recently merged my makepkg.conf.pacnew which moved -D_FORTIFY_SOURCE=2 from CPPFLAGS to CFLAGS. (I've got [testing] enabled.) Maybe that caused it to be actually used by gcc and that made the glibc-compiled library incompatible with musl-libc-compiled stuff?

eschwartz commented on 2021-04-13 11:33 (UTC)

Wow! That is a pretty bad oversight and you're entirely right that this cannot be allowed to build the way it is. I'll push an update soon.

I wonder, why it actually built successfully for me though, every single time I ever build it! :/ musl does try to reduce incompatibilities with glibc ABI, but without any guarantees... but we're both building for x86_64 so we "should" be getting the same results. Weird.

oi_wtf commented on 2021-04-13 09:54 (UTC)

Oh, found the reason!

Line 1673 in my original makepkg log: https://paste.ubuntu.com/p/QTqPyMXXxP/

bzip2's make was using gcc not musl-gcc to build libbz2.a! And mixing glibc and musl libc is obviously a really bad idea...

So it seems bz2's does not care what the CC env var is set to. So I added a sed into the PKGBUILD just before make libbz2.a: sed -i "s|CC=gcc|CC=${CC}|g" Makefile and that fixed the build!

oi_wtf commented on 2021-04-13 09:24 (UTC)

So, since that checking for BZ2_bzDecompressInit in -lbz2... no is weird, I went and looked at src/libarchive-3.5.1/config.log and there was:

https://paste.ubuntu.com/p/jBq8WDB872/

some problem with fprintf and/or stdio headers? sounds like musl-libc chokes on something, or maybe configure should use musl's stdio.h, instead of the one from glibc?

After all:

% LANG= pacman -Qo /usr/include/bits/stdio2.h
/usr/include/bits/stdio2.h is owned by glibc 2.33-4

oi_wtf commented on 2021-04-13 07:10 (UTC)

on the other hand, there is also:

% objdump -t src/temp/usr/lib/libbz2.a | grep BZ2_bzDec
0000000000000d90 g     F .text  0000000000000104 BZ2_bzDecompressInit
0000000000000ee0 g     F .text  0000000000000f55 BZ2_bzDecompress
0000000000001e40 g     F .text  000000000000009d BZ2_bzDecompressEnd

so no idea why libarchive's configure thinks libbz2 is missing that symbol... Maybe it picks up a different/wrong libbz2 ? The systems? But even that has those decompress symbols:

% objdump -T /usr/lib/libbz2.so | grep BZ2_bzDec
000000000000bf30 g    DF .text  0000000000000104  Base        BZ2_bzDecompressInit
000000000000c080 g    DF .text  0000000000000f6f  Base        BZ2_bzDecompress
000000000000cff0 g    DF .text  0000000000000095  Base        BZ2_bzDecompressEnd

eschwartz commented on 2021-04-12 16:18 (UTC)

That's weird. And look at the libarchive configure output:

checking bzlib.h usability... yes
checking bzlib.h presence... yes
checking for bzlib.h... yes
checking for BZ2_bzDecompressInit in -lbz2... no

oi_wtf commented on 2021-04-12 14:55 (UTC)

I'm getting linker errors in regarding libarchive and bzip2 with 5.2.2-4. But both didn't change since -3, correct? So I've got no idea what caused the problem... I did start with a clean checkout (no src/ or pkg/) and tried both makepkg and makechrootpkg... same errors.

I did notice there's no -lbz2 in the linker command, but I saw no obvious errors in ./configure output...

libtool: link: musl-gcc -pedantic -D_GNU_SOURCE -Wall -I/home/bp/dev/arch/aur/pacman-static/src/temp/usr/include -DLIBARCHIVE_STATIC -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2,-D_GLIBCXX_ASSERTIONS -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -static -Wl,-O1 -Wl,--sort-common -Wl,--as-needed -Wl,-z -Wl,relro -Wl,-z -Wl,now -o testpkg testpkg.o  ../../lib/libalpm/.libs/libalpm.a -L/home/bp/dev/arch/aur/pacman-static/src/temp/usr/lib -lgpgme -lassuan -lgpg-error -larchive -llzma -lcurl -lcares -lnghttp2 -lssl -lzstd -lz -lcrypto -ldl -lm -pthread
/usr/bin/ld: /home/bp/dev/arch/aur/pacman-static/src/temp/usr/lib/libarchive.a(archive_read_support_filter_bzip2.o): in function `bzip2_filter_read':
archive_read_support_filter_bzip2.c:(.text+0x3ee): undefined reference to `BZ2_bzDecompressInit'
/usr/bin/ld: archive_read_support_filter_bzip2.c:(.text+0x414): undefined reference to `BZ2_bzDecompressInit'
/usr/bin/ld: archive_read_support_filter_bzip2.c:(.text+0x58d): undefined reference to `BZ2_bzDecompress'
/usr/bin/ld: archive_read_support_filter_bzip2.c:(.text+0x5cf): undefined reference to `BZ2_bzDecompressEnd'
/usr/bin/ld: /home/bp/dev/arch/aur/pacman-static/src/temp/usr/lib/libarchive.a(archive_read_support_filter_bzip2.o): in function `bzip2_filter_close':
archive_read_support_filter_bzip2.c:(.text+0x6bd): undefined reference to `BZ2_bzDecompressEnd'
/usr/bin/ld: /home/bp/dev/arch/aur/pacman-static/src/temp/usr/lib/libarchive.a(archive_read_support_format_zip.o): in function `zipx_bzip2_init':
archive_read_support_format_zip.c:(.text+0x41a3): undefined reference to `BZ2_bzDecompressEnd'
/usr/bin/ld: archive_read_support_format_zip.c:(.text+0x41e6): undefined reference to `BZ2_bzDecompressInit'
/usr/bin/ld: /home/bp/dev/arch/aur/pacman-static/src/temp/usr/lib/libarchive.a(archive_read_support_format_zip.o): in function `zip_read_data_zipx_bzip2':
archive_read_support_format_zip.c:(.text+0x4447): undefined reference to `BZ2_bzDecompress'
/usr/bin/ld: archive_read_support_format_zip.c:(.text+0x4468): undefined reference to `BZ2_bzDecompressEnd'
/usr/bin/ld: /home/bp/dev/arch/aur/pacman-static/src/temp/usr/lib/libarchive.a(archive_read_support_format_zip.o): in function `archive_read_format_zip_cleanup':
archive_read_support_format_zip.c:(.text+0x6139): undefined reference to `BZ2_bzDecompressEnd'
/usr/bin/ld: /home/bp/dev/arch/aur/pacman-static/src/temp/usr/lib/libarchive.a(archive_read_support_format_7zip.o): in function `init_decompression':
archive_read_support_format_7zip.c:(.text+0x1c3f): undefined reference to `BZ2_bzDecompressEnd'
/usr/bin/ld: archive_read_support_format_7zip.c:(.text+0x1c6f): undefined reference to `BZ2_bzDecompressInit'
/usr/bin/ld: archive_read_support_format_7zip.c:(.text+0x1c9d): undefined reference to `BZ2_bzDecompressInit'
/usr/bin/ld: /home/bp/dev/arch/aur/pacman-static/src/temp/usr/lib/libarchive.a(archive_read_support_format_7zip.o): in function `decompress':
archive_read_support_format_7zip.c:(.text+0x2709): undefined reference to `BZ2_bzDecompress'
/usr/bin/ld: archive_read_support_format_7zip.c:(.text+0x2731): undefined reference to `BZ2_bzDecompressEnd'
/usr/bin/ld: /home/bp/dev/arch/aur/pacman-static/src/temp/usr/lib/libarchive.a(archive_read_support_format_7zip.o): in function `free_decompression':
archive_read_support_format_7zip.c:(.text+0x2ec8): undefined reference to `BZ2_bzDecompressEnd'
collect2: error: ld returned 1 exit status
make[2]: *** [Makefile:470: testpkg] Error 1
make[1]: *** [Makefile:993: all-recursive] Error 1
make: *** [Makefile:902: all] Error 2
==> ERROR: A failure occurred in build().
    Aborting...

Full log: https://paste.ubuntu.com/p/QTqPyMXXxP/

gnaggnoyil commented on 2021-03-04 12:13 (UTC) (edited on 2021-03-04 12:14 (UTC) by gnaggnoyil)

Does this package support aur helpers? Or it must be used under devtools? I tried using yay -Syu pacman-static and it fails when building libgpg:

libtool: link: ranlib .libs/libgpg-error.a
libtool: link: ( cd ".libs" && rm -f "libgpg-error.la" && ln -s "../libgpg-error.la" "libgpg-error.la" )
/bin/sh ../libtool  --tag=CC   --mode=link musl-gcc  -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -Wall -Wpointer-arith -Wno-psabi -fvisibility=hidden  -Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now -static -o gpg-error gpg_error-strsource-sym.o gpg_error-strerror-sym.o gpg_error-gpg-error.o libgpg-error.la
libtool: link: musl-gcc -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -Wall -Wpointer-arith -Wno-psabi -fvisibility=hidden -Wl,-O1 -Wl,--sort-common -Wl,--as-needed -Wl,-z -Wl,relro -Wl,-z -Wl,now -o gpg-error gpg_error-strsource-sym.o gpg_error-strerror-sym.o gpg_error-gpg-error.o  ./.libs/libgpg-error.a
no
***  Please report to <https://bugs.gnupg.org> with gpg-error-config-test.log
make[1]: *** [Makefile:1767: gpg-error-config] Error 1
make[1]: Leaving directory '/home/gnaggnoyil/.cache/yay/pacman-static/src/libgpg-error-1.41/src'
make: *** [Makefile:692: all] Error 2
make: Leaving directory '/home/gnaggnoyil/.cache/yay/pacman-static/src/libgpg-error-1.41/src'

PedroHLC commented on 2020-08-11 15:29 (UTC)

For building, Andrew's key is throwing "keyserver receive failed: General error" with HKPS's keyserver. I had to use "hkp://p80.pool.sks-keyservers.net:80" to import it.