On Sat, Aug 29, 2009 at 8:29 PM, Thomas Bächler<thomas@archlinux.org> wrote:
Xavier schrieb:
it is written in the pkgbuild : # pacman.static build fails unless we keep the libtool files (or unless we link # the missing symbols inside the libarchive .a static lib, but that is dirty) options=(libtool)
though pacman.static is no longer in pacman package, but afaik there is a pacman-static package on aur.
it seems there are also a few other packages depending on libarchive, and I don't know about them. But I don't think doing static build is the common case.
Why does it work for other libraries then, but not for libarchive? We barely have .la files on the system.
According to JGC, a proper way to build statically without .la file is to use pkgconfig. but libarchive does not provide a pkgconfig file either. I tried to write one, but as I have no experience and knowledge about this stuff, I am hesitant to send this work to libarchive maintainers. --------------------------------------------------------------------------- here is the automatically generated libarchive.pc file : prefix=/usr exec_prefix=${prefix} libdir=${exec_prefix}/lib includedir=${prefix}/include Name: libarchive Description: library that can create and read several streaming archive formats Version: 2.7.1 Libs: -larchive Libs.private: -lacl -lattr -lcrypto -llzma -lbz2 -lz and here is the libarchive patch to generate it : diff -uNr libarchive-2.7.1/Makefile.am libarchive-2.7.1-new/Makefile.am --- libarchive-2.7.1/Makefile.am 2009-07-21 17:05:40.000000000 +0200 +++ libarchive-2.7.1-new/Makefile.am 2009-08-30 18:39:47.000000000 +0200 @@ -200,6 +200,10 @@ libarchive/README \ $(libarchive_man_MANS) +# pkgconfig +pkgconfigdir = $(libdir)/pkgconfig +pkgconfig_DATA = libarchive.pc + # # # libarchive_test program diff -uNr libarchive-2.7.1/configure.ac libarchive-2.7.1-new/configure.ac --- libarchive-2.7.1/configure.ac 2009-08-05 07:22:16.000000000 +0200 +++ libarchive-2.7.1-new/configure.ac 2009-08-30 18:43:30.000000000 +0200 @@ -64,6 +64,7 @@ AC_CONFIG_HEADERS([config.h]) AC_CONFIG_FILES([Makefile]) +AC_CONFIG_FILES([libarchive.pc]) # Check for host type AC_CANONICAL_HOST --- libarchive-2.7.1/libarchive.pc.in 1970-01-01 01:00:00.000000000 +0100 +++ libarchive-2.7.1-new/libarchive.pc.in 2009-08-30 18:45:05.000000000 +0200 @@ -0,0 +1,10 @@ +prefix=@prefix@ +exec_prefix=@exec_prefix@ +libdir=@libdir@ +includedir=@includedir@ + +Name: libarchive +Description: library that can create and read several streaming archive formats +Version: @VERSION@ +Libs: -larchive +Libs.private: @LIBS@