[arch-dev-public] libarchive, pacman, and libtool-slaying

Dan McGee dpmcgee at gmail.com
Tue Jun 19 20:36:50 EDT 2007


On 6/19/07, Jason Chu <jason at 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 at 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 at 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




More information about the arch-dev-public mailing list