Comment 25 for bug 1885403

Revision history for this message
Miriam EspaƱa Acebal (mirespace) wrote :

I built ubuntu package on sid, and this package ubuntu-sourced but debian-built works ok on impish, so ... What is the difference between the two compilations mode? or, does it link something different?

Doing a ldd -v on libpostfix-tls.so* from @paelzer in comment [#22]( https://bugs.launchpad.net/ubuntu/+source/postfix/+bug/1885403/comments/22), we see that in debian-built version appears libpthread.so and it doesn't appear in ubuntu-built version:

---- Debian

Version information:
 ./libpostfix-tls.so.debugdebian:
  libpthread.so.0 (GLIBC_2.2.5) => /lib/x86_64-linux-gnu/libpthread.so.0
  libc.so.6 (GLIBC_2.14) => /lib/x86_64-linux-gnu/libc.so.6
  libc.so.6 (GLIBC_2.4) => /lib/x86_64-linux-gnu/libc.so.6
  libc.so.6 (GLIBC_2.3) => /lib/x86_64-linux-gnu/libc.so.6
  libc.so.6 (GLIBC_2.2.5) => /lib/x86_64-linux-gnu/libc.so.6
  libcrypto.so.1.1 (OPENSSL_1_1_0) => /lib/x86_64-linux-gnu/libcrypto.so.1.1
  libssl.so.1.1 (OPENSSL_1_1_1) => /lib/x86_64-linux-gnu/libssl.so.1.1
  libssl.so.1.1 (OPENSSL_1_1_0) => /lib/x86_64-linux-gnu/libssl.so.1.1

---- Ubuntu

 Version information:
 ./libpostfix-tls.so.debugubuntu:
  libc.so.6 (GLIBC_2.14) => /lib/x86_64-linux-gnu/libc.so.6
  libc.so.6 (GLIBC_2.4) => /lib/x86_64-linux-gnu/libc.so.6
  libc.so.6 (GLIBC_2.3) => /lib/x86_64-linux-gnu/libc.so.6
  libc.so.6 (GLIBC_2.2.5) => /lib/x86_64-linux-gnu/libc.so.6
  libcrypto.so.1.1 (OPENSSL_1_1_0) => /lib/x86_64-linux-gnu/libcrypto.so.1.1
  libssl.so.1.1 (OPENSSL_1_1_1) => /lib/x86_64-linux-gnu/libssl.so.1.1
  libssl.so.1.1 (OPENSSL_1_1_0) => /lib/x86_64-linux-gnu/libssl.so.1.1

Also, doing a readelf -a , we see libpthread.so also as NEEDED for debian, but not for ubuntu:

---- Debian

Dynamic section at offset 0x27120 contains 34 entries:
  Tag Type Name/Value
 0x0000000000000001 (NEEDED) Shared library: [libssl.so.1.1]
 0x0000000000000001 (NEEDED) Shared library: [libcrypto.so.1.1]
 0x0000000000000001 (NEEDED) Shared library: [libpthread.so.0]
 0x0000000000000001 (NEEDED) Shared library: [libpostfix-dns.so]
 0x0000000000000001 (NEEDED) Shared library: [libpostfix-global.so]
 0x0000000000000001 (NEEDED) Shared library: [libpostfix-util.so]
 0x0000000000000001 (NEEDED) Shared library: [libc.so.6]
 0x000000000000000e (SONAME) Library soname: [libpostfix-tls.so]
 0x000000000000001d (RUNPATH) Library runpath: [/usr/lib/postfix]

Version needs section '.gnu.version_r' contains 4 entries:
 Addr: 0x00000000000053e0 Offset: 0x0053e0 Link: 4 (.dynstr)
  000000: Version: 1 File: libpthread.so.0 Cnt: 1
  0x0010: Name: GLIBC_2.2.5 Flags: none Version: 6
  0x0020: Version: 1 File: libc.so.6 Cnt: 4

---- Ubuntu

Dynamic section at offset 0x28340 contains 33 entries:
  Tag Type Name/Value
 0x0000000000000001 (NEEDED) Shared library: [libssl.so.1.1]
 0x0000000000000001 (NEEDED) Shared library: [libcrypto.so.1.1]
 0x0000000000000001 (NEEDED) Shared library: [libpostfix-dns.so]
 0x0000000000000001 (NEEDED) Shared library: [libpostfix-global.so]
 0x0000000000000001 (NEEDED) Shared library: [libpostfix-util.so]
 0x0000000000000001 (NEEDED) Shared library: [libc.so.6]
 0x000000000000000e (SONAME) Library soname: [libpostfix-tls.so]

Version needs section '.gnu.version_r' contains 3 entries:
 Addr: 0x0000000000005460 Offset: 0x005460 Link: 5 (.dynstr)
  000000: Version: 1 File: libc.so.6 Cnt: 4

Apart from the number of entries varies on most of the sections and this section not present on debian (.note.gnu.property is not present in the segment section):

Displaying notes found in: .note.gnu.property
  Owner Data size Description
  GNU 0x00000010 NT_GNU_PROPERTY_TYPE_0
      Properties: x86 feature: IBT, SHSTK

Why this libpthread difference?

Wondering if building with -frecord-gcc-switches could shed some light on this... or maybe some way to extract compiler's options is around...