[arch-dev-public] libarchive, pacman, and libtool-slaying
I'm sending this to two lists to see who can offer some insight, as I tried and failed earlier to get pacman to correctly build with a newer version of libarchive. I think it may deal with having la files in the package, but I am not sure so I'll outline what I've tried and know so far. Libarchive website: http://people.freebsd.org/~kientzle/libarchive/ Current version: 2.2.3 Current Arch Linux version: 1.3.1-2 As you can see, we are a ways behind. I up-ed the PKGBUILD for libarchive, rebuilt it without problems (as far as I can tell), and then pacman -U <new libarchive> and tried to compile pacman. The ldd output showed that it correctly linked against the new libarchive.so.2, but it had somehow also linked against libarchive.so.1. I tried rebuilding libarchive using options=(!libtool), but that didn't seem to fix anything- it actually just spit some more errors saying libarchive was missing la files and such. OK, long explanation, but it comes down to this: 1. How can we get pacman to compile with libarchive without needing the la files? libdownload seems to work fine without them, etc. 2. Where is this mysterious link to libarchive.so.1 coming from when it isn't even present on my system anymore? This applies to both the most recent CVS release and our GIT tree at projects.al.org. -Dan
On Tue, 19 Jun 2007 18:21:53 -0400 "Dan McGee" <dpmcgee@gmail.com> wrote:
2. Where is this mysterious link to libarchive.so.1 coming from when it isn't even present on my system anymore?
Did you check the output of ldd libalpm.so and ldd pacman differently? One may be linking against .1, the other against .2 - I've had wierdness like that happen to me on other apps before and since pacman links in alpm, if they're both depending on different versions both may show up in the output. Essentially, what I mean is run ldd on each .so file in the output of $(ldd pacman) and see if it's pulled in as a dep of one of those. -- Travis
On Tue, Jun 19, 2007 at 07:28:18PM -0400, Travis Willard wrote:
On Tue, 19 Jun 2007 18:21:53 -0400 "Dan McGee" <dpmcgee@gmail.com> wrote:
2. Where is this mysterious link to libarchive.so.1 coming from when it isn't even present on my system anymore?
Did you check the output of ldd libalpm.so and ldd pacman differently? One may be linking against .1, the other against .2 - I've had wierdness like that happen to me on other apps before and since pacman links in alpm, if they're both depending on different versions both may show up in the output.
Essentially, what I mean is run ldd on each .so file in the output of $(ldd pacman) and see if it's pulled in as a dep of one of those.
You could use ldd like that or you could try readelf -d <file>. It will give you only the links needed by that file and not its dependencies dependencies. It's what namcap uses. Jason
On 6/19/07, Jason Chu <jason@archlinux.org> wrote:
On Tue, Jun 19, 2007 at 07:28:18PM -0400, Travis Willard wrote:
On Tue, 19 Jun 2007 18:21:53 -0400 "Dan McGee" <dpmcgee@gmail.com> wrote:
2. Where is this mysterious link to libarchive.so.1 coming from when it isn't even present on my system anymore?
Did you check the output of ldd libalpm.so and ldd pacman differently? One may be linking against .1, the other against .2 - I've had wierdness like that happen to me on other apps before and since pacman links in alpm, if they're both depending on different versions both may show up in the output.
Essentially, what I mean is run ldd on each .so file in the output of $(ldd pacman) and see if it's pulled in as a dep of one of those.
You could use ldd like that or you could try readelf -d <file>. It will give you only the links needed by that file and not its dependencies dependencies. It's what namcap uses.
Jason
_______________________________________________ arch-dev-public mailing list arch-dev-public@archlinux.org http://archlinux.org/mailman/listinfo/arch-dev-public
OK- if I bootstrap build it a bit, I definitely get rid of the weird libarchive.so.1 dependency. I think it was do to LD_LIBRARY_PATH and some resolving issues in finding the library. However, this brings us to part 2. pacman (dynamically linked) builds fine without libtool archive files, but pacman.static now fails to build, with the following output coming during its linking stage: /usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libarchive.a(libarchive_la-archive_read_support_compression_bzip2.o): In function `init': (.text+0x136): undefined reference to `BZ2_bzDecompressInit' /usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libarchive.a(libarchive_la-archive_read_support_compression_bzip2.o): In function `init': (.text+0x16c): undefined reference to `BZ2_bzDecompressInit' /usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libarchive.a(libarchive_la-archive_read_support_compression_bzip2.o): In function `finish': (.text+0x2b1): undefined reference to `BZ2_bzDecompressEnd' /usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libarchive.a(libarchive_la-archive_read_support_compression_bzip2.o): In function `read_ahead': (.text+0x414): undefined reference to `BZ2_bzDecompress' /usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libarchive.a(libarchive_la-archive_read_support_compression_gzip.o): In function `init': (.text+0xe0): undefined reference to `crc32' /usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libarchive.a(libarchive_la-archive_read_support_compression_gzip.o): In function `init': (.text+0x161): undefined reference to `inflateInit2_' /usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libarchive.a(libarchive_la-archive_read_support_compression_gzip.o): In function `finish': (.text+0x2b1): undefined reference to `inflateEnd' /usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libarchive.a(libarchive_la-archive_read_support_compression_gzip.o): In function `read_ahead': (.text+0x4f4): undefined reference to `inflate' /usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libarchive.a(libarchive_la-archive_read_support_compression_gzip.o): In function `read_ahead': (.text+0x50f): undefined reference to `crc32' /usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libarchive.a(libarchive_la-archive_read_support_format_zip.o): In function `archive_read_format_zip_cleanup': (.text+0x293): undefined reference to `inflateEnd' /usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libarchive.a(libarchive_la-archive_read_support_format_zip.o): In function `archive_read_format_zip_read_data': (.text+0x432): undefined reference to `inflateReset' /usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libarchive.a(libarchive_la-archive_read_support_format_zip.o): In function `archive_read_format_zip_read_data': (.text+0x4ac): undefined reference to `inflate' /usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libarchive.a(libarchive_la-archive_read_support_format_zip.o): In function `archive_read_format_zip_read_data': (.text+0x587): undefined reference to `inflateInit2_' /usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libarchive.a(libarchive_la-archive_write_disk.o): In function `set_acl': (.text+0x3e6): undefined reference to `acl_init' /usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libarchive.a(libarchive_la-archive_write_disk.o): In function `set_acl': (.text+0x435): undefined reference to `acl_create_entry' /usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libarchive.a(libarchive_la-archive_write_disk.o): In function `set_acl': (.text+0x45c): undefined reference to `acl_set_tag_type' /usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libarchive.a(libarchive_la-archive_write_disk.o): In function `set_acl': (.text+0x46e): undefined reference to `acl_get_permset' /usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libarchive.a(libarchive_la-archive_write_disk.o): In function `set_acl': (.text+0x479): undefined reference to `acl_clear_perms' /usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libarchive.a(libarchive_la-archive_write_disk.o): In function `set_acl': (.text+0x4aa): undefined reference to `acl_add_perm' /usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libarchive.a(libarchive_la-archive_write_disk.o): In function `set_acl': (.text+0x4c2): undefined reference to `acl_set_tag_type' /usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libarchive.a(libarchive_la-archive_write_disk.o): In function `set_acl': (.text+0x4d7): undefined reference to `acl_set_tag_type' /usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libarchive.a(libarchive_la-archive_write_disk.o): In function `set_acl': (.text+0x503): undefined reference to `acl_set_qualifier' /usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libarchive.a(libarchive_la-archive_write_disk.o): In function `set_acl': (.text+0x51b): undefined reference to `acl_set_tag_type' /usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libarchive.a(libarchive_la-archive_write_disk.o): In function `set_acl': (.text+0x533): undefined reference to `acl_set_tag_type' /usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libarchive.a(libarchive_la-archive_write_disk.o): In function `set_acl': (.text+0x55f): undefined reference to `acl_set_qualifier' /usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libarchive.a(libarchive_la-archive_write_disk.o): In function `set_acl': (.text+0x577): undefined reference to `acl_set_tag_type' /usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libarchive.a(libarchive_la-archive_write_disk.o): In function `set_acl': (.text+0x58f): undefined reference to `acl_add_perm' /usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libarchive.a(libarchive_la-archive_write_disk.o): In function `set_acl': (.text+0x5a7): undefined reference to `acl_add_perm' /usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libarchive.a(libarchive_la-archive_write_disk.o): In function `set_acl': (.text+0x5dc): undefined reference to `acl_set_file' /usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libarchive.a(libarchive_la-archive_write_disk.o): In function `set_acl': (.text+0x5ed): undefined reference to `acl_free' /usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libarchive.a(libarchive_la-archive_write_disk.o): In function `set_acl': (.text+0x609): undefined reference to `acl_set_fd' collect2: ld returned 1 exit status make[3]: *** [pacman.static] Error 1 make[3]: Leaving directory `/home/dmcgee/projects/repos/arch/build/base/pacman/src/pacman-3.0.5/src/pacman' make[2]: *** [all-recursive] Error 1 make[2]: Leaving directory `/home/dmcgee/projects/repos/arch/build/base/pacman/src/pacman-3.0.5/src/pacman' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/home/dmcgee/projects/repos/arch/build/base/pacman/src/pacman-3.0.5' make: *** [all] Error 2 ==> ERROR: Build Failed. Aborting... Any suggestions? I'd really like to be able to package libarchive without libtool files. -Dan
On Tue, 2007-06-19 at 20:36 -0400, Dan McGee wrote:
OK- if I bootstrap build it a bit, I definitely get rid of the weird libarchive.so.1 dependency. I think it was do to LD_LIBRARY_PATH and some resolving issues in finding the library. However, this brings us to part 2. pacman (dynamically linked) builds fine without libtool archive files, but pacman.static now fails to build, with the following output coming during its linking stage: /usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libarchive.a(libarchive_la-archive_read_support_compression_bzip2.o): In function `init': (.text+0x136): undefined reference to `BZ2_bzDecompressInit' /usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libarchive.a(libarchive_la-archive_read_support_compression_bzip2.o): In function `init': (.text+0x16c): undefined reference to `BZ2_bzDecompressInit' /usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libarchive.a(libarchive_la-archive_read_support_compression_bzip2.o): In function `finish': (.text+0x2b1): undefined reference to `BZ2_bzDecompressEnd' /usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libarchive.a(libarchive_la-archive_read_support_compression_bzip2.o): In function `read_ahead': (.text+0x414): undefined reference to `BZ2_bzDecompress' /usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libarchive.a(libarchive_la-archive_read_support_compression_gzip.o): In function `init': (.text+0xe0): undefined reference to `crc32' /usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libarchive.a(libarchive_la-archive_read_support_compression_gzip.o): In function `init': (.text+0x161): undefined reference to `inflateInit2_' /usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libarchive.a(libarchive_la-archive_read_support_compression_gzip.o): In function `finish': (.text+0x2b1): undefined reference to `inflateEnd' /usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libarchive.a(libarchive_la-archive_read_support_compression_gzip.o): In function `read_ahead': (.text+0x4f4): undefined reference to `inflate' /usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libarchive.a(libarchive_la-archive_read_support_compression_gzip.o): In function `read_ahead': (.text+0x50f): undefined reference to `crc32' /usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libarchive.a(libarchive_la-archive_read_support_format_zip.o): In function `archive_read_format_zip_cleanup': (.text+0x293): undefined reference to `inflateEnd' /usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libarchive.a(libarchive_la-archive_read_support_format_zip.o): In function `archive_read_format_zip_read_data': (.text+0x432): undefined reference to `inflateReset' /usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libarchive.a(libarchive_la-archive_read_support_format_zip.o): In function `archive_read_format_zip_read_data': (.text+0x4ac): undefined reference to `inflate' /usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libarchive.a(libarchive_la-archive_read_support_format_zip.o): In function `archive_read_format_zip_read_data': (.text+0x587): undefined reference to `inflateInit2_' /usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libarchive.a(libarchive_la-archive_write_disk.o): In function `set_acl': (.text+0x3e6): undefined reference to `acl_init' /usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libarchive.a(libarchive_la-archive_write_disk.o): In function `set_acl': (.text+0x435): undefined reference to `acl_create_entry' /usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libarchive.a(libarchive_la-archive_write_disk.o): In function `set_acl': (.text+0x45c): undefined reference to `acl_set_tag_type' /usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libarchive.a(libarchive_la-archive_write_disk.o): In function `set_acl': (.text+0x46e): undefined reference to `acl_get_permset' /usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libarchive.a(libarchive_la-archive_write_disk.o): In function `set_acl': (.text+0x479): undefined reference to `acl_clear_perms' /usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libarchive.a(libarchive_la-archive_write_disk.o): In function `set_acl': (.text+0x4aa): undefined reference to `acl_add_perm' /usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libarchive.a(libarchive_la-archive_write_disk.o): In function `set_acl': (.text+0x4c2): undefined reference to `acl_set_tag_type' /usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libarchive.a(libarchive_la-archive_write_disk.o): In function `set_acl': (.text+0x4d7): undefined reference to `acl_set_tag_type' /usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libarchive.a(libarchive_la-archive_write_disk.o): In function `set_acl': (.text+0x503): undefined reference to `acl_set_qualifier' /usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libarchive.a(libarchive_la-archive_write_disk.o): In function `set_acl': (.text+0x51b): undefined reference to `acl_set_tag_type' /usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libarchive.a(libarchive_la-archive_write_disk.o): In function `set_acl': (.text+0x533): undefined reference to `acl_set_tag_type' /usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libarchive.a(libarchive_la-archive_write_disk.o): In function `set_acl': (.text+0x55f): undefined reference to `acl_set_qualifier' /usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libarchive.a(libarchive_la-archive_write_disk.o): In function `set_acl': (.text+0x577): undefined reference to `acl_set_tag_type' /usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libarchive.a(libarchive_la-archive_write_disk.o): In function `set_acl': (.text+0x58f): undefined reference to `acl_add_perm' /usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libarchive.a(libarchive_la-archive_write_disk.o): In function `set_acl': (.text+0x5a7): undefined reference to `acl_add_perm' /usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libarchive.a(libarchive_la-archive_write_disk.o): In function `set_acl': (.text+0x5dc): undefined reference to `acl_set_file' /usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libarchive.a(libarchive_la-archive_write_disk.o): In function `set_acl': (.text+0x5ed): undefined reference to `acl_free' /usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libarchive.a(libarchive_la-archive_write_disk.o): In function `set_acl': (.text+0x609): undefined reference to `acl_set_fd' collect2: ld returned 1 exit status make[3]: *** [pacman.static] Error 1 make[3]: Leaving directory `/home/dmcgee/projects/repos/arch/build/base/pacman/src/pacman-3.0.5/src/pacman' make[2]: *** [all-recursive] Error 1 make[2]: Leaving directory `/home/dmcgee/projects/repos/arch/build/base/pacman/src/pacman-3.0.5/src/pacman' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/home/dmcgee/projects/repos/arch/build/base/pacman/src/pacman-3.0.5' make: *** [all] Error 2 ==> ERROR: Build Failed. Aborting...
Any suggestions? I'd really like to be able to package libarchive without libtool files.
This is a common example of libraries that weren't linked correctly. In this case, the problem is in libarchive.a, which didn't link to its dependencies. Libarchive expects your application to use libtool to find the link dependencies and link them by hand. As you removed the libtool files, the additional libraries are not linked to libarchive. There's two ways to fix this: - build libarchive with libtool files included - change linker flags for libarchive.a to include the missing ones As libarchive is not a common lib used by many applications, and as pacman(.static) actually needs these linked libs, I would choose to leave the libtool files in the package. You don't know what changes in this library for the next version, you'll end up patching it everytime.
On 6/20/07, Jan de Groot <jan@jgc.homeip.net> wrote:
On Tue, 2007-06-19 at 20:36 -0400, Dan McGee wrote:
OK- if I bootstrap build it a bit, I definitely get rid of the weird libarchive.so.1 dependency. I think it was do to LD_LIBRARY_PATH and some resolving issues in finding the library. However, this brings us to part 2. pacman (dynamically linked) builds fine without libtool archive files, but pacman.static now fails to build, with the following output coming during its linking stage: /usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libarchive.a(libarchive_la-archive_read_support_compression_bzip2.o): In function `init': (.text+0x136): undefined reference to `BZ2_bzDecompressInit' /usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libarchive.a(libarchive_la-archive_read_support_compression_bzip2.o): In function `init': (.text+0x16c): undefined reference to `BZ2_bzDecompressInit' /usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libarchive.a(libarchive_la-archive_read_support_compression_bzip2.o): In function `finish': (.text+0x2b1): undefined reference to `BZ2_bzDecompressEnd' /usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libarchive.a(libarchive_la-archive_read_support_compression_bzip2.o): In function `read_ahead': (.text+0x414): undefined reference to `BZ2_bzDecompress' /usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libarchive.a(libarchive_la-archive_read_support_compression_gzip.o): In function `init': (.text+0xe0): undefined reference to `crc32' /usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libarchive.a(libarchive_la-archive_read_support_compression_gzip.o): In function `init': (.text+0x161): undefined reference to `inflateInit2_' /usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libarchive.a(libarchive_la-archive_read_support_compression_gzip.o): In function `finish': (.text+0x2b1): undefined reference to `inflateEnd' /usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libarchive.a(libarchive_la-archive_read_support_compression_gzip.o): In function `read_ahead': (.text+0x4f4): undefined reference to `inflate' /usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libarchive.a(libarchive_la-archive_read_support_compression_gzip.o): In function `read_ahead': (.text+0x50f): undefined reference to `crc32' /usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libarchive.a(libarchive_la-archive_read_support_format_zip.o): In function `archive_read_format_zip_cleanup': (.text+0x293): undefined reference to `inflateEnd' /usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libarchive.a(libarchive_la-archive_read_support_format_zip.o): In function `archive_read_format_zip_read_data': (.text+0x432): undefined reference to `inflateReset' /usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libarchive.a(libarchive_la-archive_read_support_format_zip.o): In function `archive_read_format_zip_read_data': (.text+0x4ac): undefined reference to `inflate' /usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libarchive.a(libarchive_la-archive_read_support_format_zip.o): In function `archive_read_format_zip_read_data': (.text+0x587): undefined reference to `inflateInit2_' /usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libarchive.a(libarchive_la-archive_write_disk.o): In function `set_acl': (.text+0x3e6): undefined reference to `acl_init' /usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libarchive.a(libarchive_la-archive_write_disk.o): In function `set_acl': (.text+0x435): undefined reference to `acl_create_entry' /usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libarchive.a(libarchive_la-archive_write_disk.o): In function `set_acl': (.text+0x45c): undefined reference to `acl_set_tag_type' /usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libarchive.a(libarchive_la-archive_write_disk.o): In function `set_acl': (.text+0x46e): undefined reference to `acl_get_permset' /usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libarchive.a(libarchive_la-archive_write_disk.o): In function `set_acl': (.text+0x479): undefined reference to `acl_clear_perms' /usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libarchive.a(libarchive_la-archive_write_disk.o): In function `set_acl': (.text+0x4aa): undefined reference to `acl_add_perm' /usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libarchive.a(libarchive_la-archive_write_disk.o): In function `set_acl': (.text+0x4c2): undefined reference to `acl_set_tag_type' /usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libarchive.a(libarchive_la-archive_write_disk.o): In function `set_acl': (.text+0x4d7): undefined reference to `acl_set_tag_type' /usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libarchive.a(libarchive_la-archive_write_disk.o): In function `set_acl': (.text+0x503): undefined reference to `acl_set_qualifier' /usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libarchive.a(libarchive_la-archive_write_disk.o): In function `set_acl': (.text+0x51b): undefined reference to `acl_set_tag_type' /usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libarchive.a(libarchive_la-archive_write_disk.o): In function `set_acl': (.text+0x533): undefined reference to `acl_set_tag_type' /usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libarchive.a(libarchive_la-archive_write_disk.o): In function `set_acl': (.text+0x55f): undefined reference to `acl_set_qualifier' /usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libarchive.a(libarchive_la-archive_write_disk.o): In function `set_acl': (.text+0x577): undefined reference to `acl_set_tag_type' /usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libarchive.a(libarchive_la-archive_write_disk.o): In function `set_acl': (.text+0x58f): undefined reference to `acl_add_perm' /usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libarchive.a(libarchive_la-archive_write_disk.o): In function `set_acl': (.text+0x5a7): undefined reference to `acl_add_perm' /usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libarchive.a(libarchive_la-archive_write_disk.o): In function `set_acl': (.text+0x5dc): undefined reference to `acl_set_file' /usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libarchive.a(libarchive_la-archive_write_disk.o): In function `set_acl': (.text+0x5ed): undefined reference to `acl_free' /usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libarchive.a(libarchive_la-archive_write_disk.o): In function `set_acl': (.text+0x609): undefined reference to `acl_set_fd' collect2: ld returned 1 exit status make[3]: *** [pacman.static] Error 1 make[3]: Leaving directory `/home/dmcgee/projects/repos/arch/build/base/pacman/src/pacman-3.0.5/src/pacman' make[2]: *** [all-recursive] Error 1 make[2]: Leaving directory `/home/dmcgee/projects/repos/arch/build/base/pacman/src/pacman-3.0.5/src/pacman' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/home/dmcgee/projects/repos/arch/build/base/pacman/src/pacman-3.0.5' make: *** [all] Error 2 ==> ERROR: Build Failed. Aborting...
Any suggestions? I'd really like to be able to package libarchive without libtool files.
This is a common example of libraries that weren't linked correctly. In this case, the problem is in libarchive.a, which didn't link to its dependencies. Libarchive expects your application to use libtool to find the link dependencies and link them by hand. As you removed the libtool files, the additional libraries are not linked to libarchive. There's two ways to fix this: - build libarchive with libtool files included - change linker flags for libarchive.a to include the missing ones
As libarchive is not a common lib used by many applications, and as pacman(.static) actually needs these linked libs, I would choose to leave the libtool files in the package. You don't know what changes in this library for the next version, you'll end up patching it everytime.
Well damn, that was the way it was. It is minimally used, although bsdtar is now 40% faster than GNU tar according to their website so it could start to become useful. /me looks into a 'simple' way of fixing the linking... -Dan
participants (4)
-
Dan McGee
-
Jan de Groot
-
Jason Chu
-
Travis Willard