Comment 27 for bug 1885403

Revision history for this message
Christian Ehrhardt  (paelzer) wrote (last edit ):

As I have mentioned before I assume as-needed [1] could play a role, at least for pthread that you wondered about it most likely does.
-lpthread might be listed somewhere, but if not needed it will not effectvely be linked in Ubuntu but t will in Debian.

No guarantees, but I'd not expect pthread to play a big role here - at least to my gut feeling - that non usage of /usr/lib/postfix/libpostfix-tls.so. That might also be a red herring, but it is mine :-)

@miriam - default used compiler/linker flags used effectively in a setup you can mostly get via:
  $ apt install dpkg-dev
  # get built in -m options
  $ gcc -Q --help=target
  # Get any -f and similar options built in or derived from default distro buildflags
  $ echo "int main(void) {}" | gcc $(dpkg-buildflags --get LDFLAGS) -o /dev/null -v -x c - &> /dev/stdout| grep collect
  # Get linker options built in or derived from default distro buildflags
  $ echo "int main(void) {}" | gcc $(dpkg-buildflags --get CFLAGS) -o /dev/null -v -x c - 2>&1 | grep 'cc1'
  # get Defines
  $ gcc -dM -E - < /dev/null
  # If a package build inserts some further flags you can add them as well in this call

@miriam - how about you looking for a comparison of these flags and then approximating them until they match - that could identify one option that causes the effect which will help our theory-crafting.

I can have look at ltrace/function probing in the same time, just to understand what is going on there.

[1]: https://wiki.ubuntu.com/ToolChain/CompilerFlags#A-Wl.2C--as-needed