Package Details: pacman-static 7.0.0.r6.gc685ae6-12

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-2.0-or-later
Submitter: mazieres
Maintainer: Morganamilo (andreas_baumann)
Last Packager: andreas_baumann
Votes: 58
Popularity: 1.68
First Submitted: 2013-01-09 02:17 (UTC)
Last Updated: 2024-12-19 07:58 (UTC)

Dependencies (5)

Required by (0)

Sources (26)

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 .. 6 7 8 9 10 11 12 13 14 Next › Last »

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.

eschwartz commented on 2019-10-10 04:47 (UTC)

... or you could specify --nodeps twice, as the manpage says you should do.

moe_narrow commented on 2019-10-09 17:04 (UTC)

@eschwartz I noted the behavior was as intended with pacman downloading only the specified package, while pacman-static was downloading all the dependencies; but perhaps it was because I already had the dependencies on the other system. I have managed to work around this, in any case, using a chroot to an archlinux rootfs in the target non-archlinux system.

I must say, I love pacman-static. Thank you for contributing and maintaining this.

eschwartz commented on 2019-10-06 01:30 (UTC)

@moe_narrow,

1) According to the pacman manpage, the behavior you are seeing is correct and intended.

2) Even if it were a bug, do you see the same behavior with core/pacman? If so, then it isn't specific to this static build and you should discuss it somewhere more general than this page... like the pacman bug tracker.