Project

General

Profile

Bug #975

test-rwlock1 can fail when system linker defaults to --as-needed

Added by Michael Hudson-Doyle 5 months ago. Updated 3 months ago.

Status:
Resolved
Priority:
Normal
Target version:
-
Start date:
07/25/2018
Due date:
% Done:

0%

Resolution:

Description

test-rwlock1 was failing on ubuntu builders, for example:

https://launchpadlibrarian.net/379506426/buildlog_ubuntu-cosmic-amd64.libprelude_4.1.0-4build1_BUILDING.txt.gz

Digging revealed that the test-rwlock1 binary did not have a DT_NEEDED entry for libpthread, because Ubuntu defaults to --as-needed for the linker and there was no non-weak reference to any symbol in libpthread. I added a spurious reference to errno (__errno_location is defined in libpthread.so) and the build succeeds again, but it's a bit of a silly fix. I'm not sure what would be better. (From a distro perspective, trying to be careful about whether libpthread is linked in or not is just unhelpful...)

History

#1 Updated by Antoine LUONG 5 months ago

  • Project changed from PRELUDE SIEM to Libprelude
  • Status changed from New to Assigned
  • Assignee set to Yoann VANDOORSELAERE

#2 Updated by Antoine LUONG 5 months ago

This is a problem in GnuLib, fixed in https://github.com/coreutils/gnulib/commit/426320901d46b1f3b63ba1ec8e9e60cb0e28cb77.

We need to update the code in our repositories.

#3 Updated by Michael Hudson-Doyle 5 months ago

Ah thanks for the link. I had some trouble using that patch though, because libtool re-ordered the linker commands so they became ineffective.

#4 Updated by Antoine LUONG 3 months ago

  • Status changed from Assigned to Resolved

The GnuLib code was updated in 1a762afb9bbdffb7ffd8689c7db4a0ae1bb73745 for the 5.0.0 version.

Also available in: Atom PDF