<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugzilla.yoctoproject.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugzilla.yoctoproject.org/"
          
          maintainer="it-coreprojects-helpdesk@linuxfoundation.org"
>

    <bug>
          <bug_id>8355</bug_id>
          
          <creation_ts>2015-09-21 01:17:05 +0000</creation_ts>
          <short_desc>Not possible to build static opkg 0.3 (old issue #158)</short_desc>
          <delta_ts>2019-09-23 16:27:44 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>6</classification_id>
          <classification>Yocto Project Subprojects</classification>
          <product>opkg</product>
          <component>opkg</component>
          <version>0.3.0</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Undecided</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>0.4.2</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Alejandro del Castillo">alejandro.delcastillo</reporter>
          <assigned_to name="Alejandro del Castillo">alejandro.delcastillo</assigned_to>
          <cc>adamgrayling</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>No (bug/feature does not impact docs)</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>54334</commentid>
    <comment_count>0</comment_count>
    <who name="Alejandro del Castillo">alejandro.delcastillo</who>
    <bug_when>2015-09-21 01:17:05 +0000</bug_when>
    <thetext>What steps will reproduce the problem?
1. ./configure --disable-gpg --disable-curl --disable-shared --enable-static --with-static-libopkg CFLAGS=&quot;--static&quot; LDFLAGS=&quot;--static&quot;
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&apos;:
(.text+0x312): warning: Using &apos;getgrnam_r&apos; 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&apos;:
(.text+0x162): warning: Using &apos;getpwnam_r&apos; 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&apos;:
(.text+0xe4): undefined reference to `inflateEnd&apos;
/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&apos;:
(.text+0x383): undefined reference to `crc32&apos;
/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&apos;:
(.text+0x3c1): undefined reference to `inflateInit2_&apos;
/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&apos;:
(.text+0x41d): undefined reference to `inflate&apos;
/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&apos;:
(.text+0x44b): undefined reference to `inflateEnd&apos;
/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&apos;:
(.text+0x2a20): undefined reference to `deflateEnd&apos;
collect2: error: ld returned 1 exit status

Originally reported by dima@golovin.in, Mar 4, 2015
-----------------------------------------------------------------------------

#1 paul.betafive (Mar 9, 2015)
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&apos;:
(.text+0x2df): warning: Using &apos;getgrnam_r&apos; 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&apos;:
(.text+0x13f): warning: Using &apos;getpwnam_r&apos; 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&apos;:
(.text+0x104): undefined reference to `inflateEnd&apos;
/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&apos;:
(.text+0x360): undefined reference to `crc32&apos;
/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&apos;:
(.text+0x39e): undefined reference to `inflateInit2_&apos;
/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&apos;:
(.text+0x3fa): undefined reference to `inflate&apos;
/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&apos;:
(.text+0x46c): undefined reference to `inflateEnd&apos;
/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../x86_64-linux-gnu/libarchive.a(archive_write_disk_posix.o): In function `set_acl&apos;:
(.text+0xec5): undefined reference to `acl_init&apos;
/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../x86_64-linux-gnu/libarchive.a(archive_write_disk_posix.o): In function `set_acl&apos;:
(.text+0xf09): undefined reference to `acl_create_entry&apos;
/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../x86_64-linux-gnu/libarchive.a(archive_write_disk_posix.o): In function `set_acl&apos;:
(.text+0xf33): undefined reference to `acl_set_tag_type&apos;
/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../x86_64-linux-gnu/libarchive.a(archive_write_disk_posix.o): In function `set_acl&apos;:
(.text+0xf4b): undefined reference to `acl_get_permset&apos;
/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../x86_64-linux-gnu/libarchive.a(archive_write_disk_posix.o): In function `set_acl&apos;:
(.text+0xf55): undefined reference to `acl_clear_perms&apos;
/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../x86_64-linux-gnu/libarchive.a(archive_write_disk_posix.o): In function `set_acl&apos;:
(.text+0xf80): undefined reference to `acl_add_perm&apos;
/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../x86_64-linux-gnu/libarchive.a(archive_write_disk_posix.o): In function `set_acl&apos;:
(.text+0xf9b): undefined reference to `acl_set_tag_type&apos;
/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../x86_64-linux-gnu/libarchive.a(archive_write_disk_posix.o): In function `set_acl&apos;:
(.text+0xfc0): undefined reference to `acl_set_qualifier&apos;
/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../x86_64-linux-gnu/libarchive.a(archive_write_disk_posix.o): In function `set_acl&apos;:
(.text+0xfdb): undefined reference to `acl_set_tag_type&apos;
/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../x86_64-linux-gnu/libarchive.a(archive_write_disk_posix.o): In function `set_acl&apos;:
(.text+0xff3): undefined reference to `acl_set_tag_type&apos;

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&apos;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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>82566</commentid>
    <comment_count>1</comment_count>
    <who name="Alejandro del Castillo">alejandro.delcastillo</who>
    <bug_when>2018-12-20 23:53:53 +0000</bug_when>
    <thetext>still reproduces on 0.4</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>82771</commentid>
    <comment_count>2</comment_count>
    <who name="Stormy">adamgrayling</who>
    <bug_when>2019-01-14 08:08:10 +0000</bug_when>
    <thetext>(In reply to comment #0)
&gt; What steps will reproduce the problem?
&gt; 1. ./configure --disable-gpg --disable-curl --disable-shared --enable-static
&gt; --with-static-libopkg CFLAGS=&quot;--static&quot; LDFLAGS=&quot;--static&quot;
&gt; 2. make
&gt; 
&gt; What is the expected output? What do you see instead?
&gt; Opkg should be built statically.
&gt; 
&gt; What version of the product are you using? On what operating system?
&gt; 0.3.0-rc2
&gt; 
&gt; Please provide any additional information below.
&gt; When linking:
&gt; /usr/lib/gcc/x86_64-linux-gnu/4.9/../../../x86_64-linux-gnu/libarchive.
&gt; a(archive_write_disk_set_standard_lookup.o): In function `lookup_gid&apos;:
&gt; (.text+0x312): warning: Using &apos;getgrnam_r&apos; in statically linked applications
&gt; requires at runtime the shared libraries from the glibc version used for
&gt; linking
&gt; /usr/lib/gcc/x86_64-linux-gnu/4.9/../../../x86_64-linux-gnu/libarchive.
&gt; a(archive_write_disk_set_standard_lookup.o): In function `lookup_uid&apos;:
&gt; (.text+0x162): warning: Using &apos;getpwnam_r&apos; in statically linked applications
&gt; requires at runtime the shared libraries from the glibc version used for
&gt; linking
&gt; /usr/lib/gcc/x86_64-linux-gnu/4.9/../../../x86_64-linux-gnu/libarchive.
&gt; a(archive_read_support_filter_gzip.o): In function `gzip_filter_close&apos;:
&gt; (.text+0xe4): undefined reference to `inflateEnd&apos;
&gt; /usr/lib/gcc/x86_64-linux-gnu/4.9/../../../x86_64-linux-gnu/libarchive.
&gt; a(archive_read_support_filter_gzip.o): In function `gzip_filter_read&apos;:
&gt; (.text+0x383): undefined reference to `crc32&apos;
&gt; /usr/lib/gcc/x86_64-linux-gnu/4.9/../../../x86_64-linux-gnu/libarchive.
&gt; a(archive_read_support_filter_gzip.o): In function `gzip_filter_read&apos;:
&gt; (.text+0x3c1): undefined reference to `inflateInit2_&apos;
&gt; /usr/lib/gcc/x86_64-linux-gnu/4.9/../../../x86_64-linux-gnu/libarchive.
&gt; a(archive_read_support_filter_gzip.o): In function `gzip_filter_read&apos;:
&gt; (.text+0x41d): undefined reference to `inflate&apos;
&gt; /usr/lib/gcc/x86_64-linux-gnu/4.9/../../../x86_64-linux-gnu/libarchive.
&gt; a(archive_read_support_filter_gzip.o): In function `gzip_filter_read&apos;:
&gt; (.text+0x44b): undefined reference to `inflateEnd&apos;
&gt; /usr/lib/gcc/x86_64-linux-gnu/4.9/../../../x86_64-linux-gnu/libarchive.
&gt; a(archive_write_disk_posix.o): In function `_archive_write_disk_free&apos;:
&gt; (.text+0x2a20): undefined reference to `deflateEnd&apos;
&gt; collect2: error: ld returned 1 exit status
&gt; 
&gt; Originally reported by http://whatstatus.co, Mar 4, 2015
&gt; -----------------------------------------------------------------------------
&gt; 
&gt; #1 paul.betafive (Mar 9, 2015)
&gt; I get a different list of link failures if I try this on my machine:
&gt; 
&gt; /usr/lib/gcc/x86_64-linux-gnu/4.7/../../../x86_64-linux-gnu/libarchive.
&gt; a(archive_write_disk_set_standard_lookup.o): In function `lookup_gid&apos;:
&gt; (.text+0x2df): warning: Using &apos;getgrnam_r&apos; in statically linked applications
&gt; requires at runtime the shared libraries from the glibc version used for
&gt; linking
&gt; /usr/lib/gcc/x86_64-linux-gnu/4.7/../../../x86_64-linux-gnu/libarchive.
&gt; a(archive_write_disk_set_standard_lookup.o): In function `lookup_uid&apos;:
&gt; (.text+0x13f): warning: Using &apos;getpwnam_r&apos; in statically linked applications
&gt; requires at runtime the shared libraries from the glibc version used for
&gt; linking
&gt; /usr/lib/gcc/x86_64-linux-gnu/4.7/../../../x86_64-linux-gnu/libarchive.
&gt; a(archive_read_support_filter_gzip.o): In function `gzip_filter_close&apos;:
&gt; (.text+0x104): undefined reference to `inflateEnd&apos;
&gt; /usr/lib/gcc/x86_64-linux-gnu/4.7/../../../x86_64-linux-gnu/libarchive.
&gt; a(archive_read_support_filter_gzip.o): In function `gzip_filter_read&apos;:
&gt; (.text+0x360): undefined reference to `crc32&apos;
&gt; /usr/lib/gcc/x86_64-linux-gnu/4.7/../../../x86_64-linux-gnu/libarchive.
&gt; a(archive_read_support_filter_gzip.o): In function `gzip_filter_read&apos;:
&gt; (.text+0x39e): undefined reference to `inflateInit2_&apos;
&gt; /usr/lib/gcc/x86_64-linux-gnu/4.7/../../../x86_64-linux-gnu/libarchive.
&gt; a(archive_read_support_filter_gzip.o): In function `gzip_filter_read&apos;:
&gt; (.text+0x3fa): undefined reference to `inflate&apos;
&gt; /usr/lib/gcc/x86_64-linux-gnu/4.7/../../../x86_64-linux-gnu/libarchive.
&gt; a(archive_read_support_filter_gzip.o): In function `gzip_filter_read&apos;:
&gt; (.text+0x46c): undefined reference to `inflateEnd&apos;
&gt; /usr/lib/gcc/x86_64-linux-gnu/4.7/../../../x86_64-linux-gnu/libarchive.
&gt; a(archive_write_disk_posix.o): In function `set_acl&apos;:
&gt; (.text+0xec5): undefined reference to `acl_init&apos;
&gt; /usr/lib/gcc/x86_64-linux-gnu/4.7/../../../x86_64-linux-gnu/libarchive.
&gt; a(archive_write_disk_posix.o): In function `set_acl&apos;:
&gt; (.text+0xf09): undefined reference to `acl_create_entry&apos;
&gt; /usr/lib/gcc/x86_64-linux-gnu/4.7/../../../x86_64-linux-gnu/libarchive.
&gt; a(archive_write_disk_posix.o): In function `set_acl&apos;:
&gt; (.text+0xf33): undefined reference to `acl_set_tag_type&apos;
&gt; /usr/lib/gcc/x86_64-linux-gnu/4.7/../../../x86_64-linux-gnu/libarchive.
&gt; a(archive_write_disk_posix.o): In function `set_acl&apos;:
&gt; (.text+0xf4b): undefined reference to `acl_get_permset&apos;
&gt; /usr/lib/gcc/x86_64-linux-gnu/4.7/../../../x86_64-linux-gnu/libarchive.
&gt; a(archive_write_disk_posix.o): In function `set_acl&apos;:
&gt; (.text+0xf55): undefined reference to `acl_clear_perms&apos;
&gt; /usr/lib/gcc/x86_64-linux-gnu/4.7/../../../x86_64-linux-gnu/libarchive.
&gt; a(archive_write_disk_posix.o): In function `set_acl&apos;:
&gt; (.text+0xf80): undefined reference to `acl_add_perm&apos;
&gt; /usr/lib/gcc/x86_64-linux-gnu/4.7/../../../x86_64-linux-gnu/libarchive.
&gt; a(archive_write_disk_posix.o): In function `set_acl&apos;:
&gt; (.text+0xf9b): undefined reference to `acl_set_tag_type&apos;
&gt; /usr/lib/gcc/x86_64-linux-gnu/4.7/../../../x86_64-linux-gnu/libarchive.
&gt; a(archive_write_disk_posix.o): In function `set_acl&apos;:
&gt; (.text+0xfc0): undefined reference to `acl_set_qualifier&apos;
&gt; /usr/lib/gcc/x86_64-linux-gnu/4.7/../../../x86_64-linux-gnu/libarchive.
&gt; a(archive_write_disk_posix.o): In function `set_acl&apos;:
&gt; (.text+0xfdb): undefined reference to `acl_set_tag_type&apos;
&gt; /usr/lib/gcc/x86_64-linux-gnu/4.7/../../../x86_64-linux-gnu/libarchive.
&gt; a(archive_write_disk_posix.o): In function `set_acl&apos;:
&gt; (.text+0xff3): undefined reference to `acl_set_tag_type&apos;
&gt; 
&gt; The errors caused by lookup_gid and lookup_uid are definitely libarchive
&gt; issues but I believe they are fixed on the master branch of libarchive. The
&gt; rest I&apos;m not 100% sure about, the inflate/deflate errors may be fixable if
&gt; you explicitly link against zlib.
&gt; 
&gt; I think this issue should be fixed before the final v0.3.0 release.

still not reproduces on 0.4 because of this little bug</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>85042</commentid>
    <comment_count>3</comment_count>
    <who name="Alejandro del Castillo">alejandro.delcastillo</who>
    <bug_when>2019-09-23 16:27:44 +0000</bug_when>
    <thetext>fixed on 419c3192aa71a39fec9bf830ebe768b5f91c3d5b</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>