dskvr / opkg

Automatically exported from code.google.com/p/opkg
0 stars 0 forks source link

Not possible to build static opkg 0.3 #158

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. ./configure --disable-gpg --disable-curl --disable-shared --enable-static 
--with-static-libopkg CFLAGS="--static" LDFLAGS="--static"
2. make

What is the expected output? What do you see instead?
Opkg should be built statically.

What version of the product are you using? On what operating system?
0.3.0-rc2

Please provide any additional information below.
When linking:
/usr/lib/gcc/x86_64-linux-gnu/4.9/../../../x86_64-linux-gnu/libarchive.a(archive
_write_disk_set_standard_lookup.o): In function `lookup_gid':
(.text+0x312): warning: Using 'getgrnam_r' in statically linked applications 
requires at runtime the shared libraries from the glibc version used for linking
/usr/lib/gcc/x86_64-linux-gnu/4.9/../../../x86_64-linux-gnu/libarchive.a(archive
_write_disk_set_standard_lookup.o): In function `lookup_uid':
(.text+0x162): warning: Using 'getpwnam_r' in statically linked applications 
requires at runtime the shared libraries from the glibc version used for linking
/usr/lib/gcc/x86_64-linux-gnu/4.9/../../../x86_64-linux-gnu/libarchive.a(archive
_read_support_filter_gzip.o): In function `gzip_filter_close':
(.text+0xe4): undefined reference to `inflateEnd'
/usr/lib/gcc/x86_64-linux-gnu/4.9/../../../x86_64-linux-gnu/libarchive.a(archive
_read_support_filter_gzip.o): In function `gzip_filter_read':
(.text+0x383): undefined reference to `crc32'
/usr/lib/gcc/x86_64-linux-gnu/4.9/../../../x86_64-linux-gnu/libarchive.a(archive
_read_support_filter_gzip.o): In function `gzip_filter_read':
(.text+0x3c1): undefined reference to `inflateInit2_'
/usr/lib/gcc/x86_64-linux-gnu/4.9/../../../x86_64-linux-gnu/libarchive.a(archive
_read_support_filter_gzip.o): In function `gzip_filter_read':
(.text+0x41d): undefined reference to `inflate'
/usr/lib/gcc/x86_64-linux-gnu/4.9/../../../x86_64-linux-gnu/libarchive.a(archive
_read_support_filter_gzip.o): In function `gzip_filter_read':
(.text+0x44b): undefined reference to `inflateEnd'
/usr/lib/gcc/x86_64-linux-gnu/4.9/../../../x86_64-linux-gnu/libarchive.a(archive
_write_disk_posix.o): In function `_archive_write_disk_free':
(.text+0x2a20): undefined reference to `deflateEnd'
collect2: error: ld returned 1 exit status

Original issue reported on code.google.com by dima@golovin.in on 4 Mar 2015 at 7:35

GoogleCodeExporter commented 8 years ago
I get a different list of link failures if I try this on my machine:

/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../x86_64-linux-gnu/libarchive.a(archive
_write_disk_set_standard_lookup.o): In function `lookup_gid':
(.text+0x2df): warning: Using 'getgrnam_r' in statically linked applications 
requires at runtime the shared libraries from the glibc version used for linking
/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../x86_64-linux-gnu/libarchive.a(archive
_write_disk_set_standard_lookup.o): In function `lookup_uid':
(.text+0x13f): warning: Using 'getpwnam_r' in statically linked applications 
requires at runtime the shared libraries from the glibc version used for linking
/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../x86_64-linux-gnu/libarchive.a(archive
_read_support_filter_gzip.o): In function `gzip_filter_close':
(.text+0x104): undefined reference to `inflateEnd'
/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../x86_64-linux-gnu/libarchive.a(archive
_read_support_filter_gzip.o): In function `gzip_filter_read':
(.text+0x360): undefined reference to `crc32'
/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../x86_64-linux-gnu/libarchive.a(archive
_read_support_filter_gzip.o): In function `gzip_filter_read':
(.text+0x39e): undefined reference to `inflateInit2_'
/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../x86_64-linux-gnu/libarchive.a(archive
_read_support_filter_gzip.o): In function `gzip_filter_read':
(.text+0x3fa): undefined reference to `inflate'
/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../x86_64-linux-gnu/libarchive.a(archive
_read_support_filter_gzip.o): In function `gzip_filter_read':
(.text+0x46c): undefined reference to `inflateEnd'
/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../x86_64-linux-gnu/libarchive.a(archive
_write_disk_posix.o): In function `set_acl':
(.text+0xec5): undefined reference to `acl_init'
/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../x86_64-linux-gnu/libarchive.a(archive
_write_disk_posix.o): In function `set_acl':
(.text+0xf09): undefined reference to `acl_create_entry'
/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../x86_64-linux-gnu/libarchive.a(archive
_write_disk_posix.o): In function `set_acl':
(.text+0xf33): undefined reference to `acl_set_tag_type'
/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../x86_64-linux-gnu/libarchive.a(archive
_write_disk_posix.o): In function `set_acl':
(.text+0xf4b): undefined reference to `acl_get_permset'
/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../x86_64-linux-gnu/libarchive.a(archive
_write_disk_posix.o): In function `set_acl':
(.text+0xf55): undefined reference to `acl_clear_perms'
/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../x86_64-linux-gnu/libarchive.a(archive
_write_disk_posix.o): In function `set_acl':
(.text+0xf80): undefined reference to `acl_add_perm'
/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../x86_64-linux-gnu/libarchive.a(archive
_write_disk_posix.o): In function `set_acl':
(.text+0xf9b): undefined reference to `acl_set_tag_type'
/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../x86_64-linux-gnu/libarchive.a(archive
_write_disk_posix.o): In function `set_acl':
(.text+0xfc0): undefined reference to `acl_set_qualifier'
/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../x86_64-linux-gnu/libarchive.a(archive
_write_disk_posix.o): In function `set_acl':
(.text+0xfdb): undefined reference to `acl_set_tag_type'
/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../x86_64-linux-gnu/libarchive.a(archive
_write_disk_posix.o): In function `set_acl':
(.text+0xff3): undefined reference to `acl_set_tag_type'

The errors caused by lookup_gid and lookup_uid are definitely libarchive issues 
but I believe they are fixed on the master branch of libarchive. The rest I'm 
not 100% sure about, the inflate/deflate errors may be fixable if you 
explicitly link against zlib.

I think this issue should be fixed before the final v0.3.0 release.

Original comment by paul.betafive on 9 Mar 2015 at 9:12