Bug 28177 - Debian/Ubuntu: make check has 100+ failures due to `libgcc_s.so.1 must be installed for pthread_cancel to work`
Summary: Debian/Ubuntu: make check has 100+ failures due to `libgcc_s.so.1 must be ins...
Status: RESOLVED WORKSFORME
Alias: None
Product: glibc
Classification: Unclassified
Component: build (show other bugs)
Version: unspecified
: P2 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-08-02 21:15 UTC by Fangrui Song
Modified: 2021-08-03 19:42 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Fangrui Song 2021-08-02 21:15:15 UTC
(Debian testing amd64, GCC 10.2.1, binutils 2.35.2)

% mkdir -p out/bfd
% ../../configure --prefix=/tmp/glibc/bfd --enable-static-pie
% make -j 20
% make -j 20 check
# many failures due to libgcc_s.so.1 must be installed for pthread_cancel to work
% ./testrun.sh nptl/tst-cancel1
libgcc_s.so.1 must be installed for pthread_cancel to work
Didn't expect signal from child: got `Aborted'

Copying the system libgcc_s.so.1 to $prefix/lib/ can fix the failures.

% cp /usr/lib/x86_64-linux-gnu/libgcc_s.so.1 /tmp/glibc/bfd/lib/
% ./testrun.sh nptl/tst-cancel1
# succeeded
Comment 1 Fangrui Song 2021-08-02 21:17:21 UTC
Forgot `cd out/bfd` below `mkdir -p out/bfd`

`make install` before `make check` doesn't work. In ./testrun.sh,  /usr/lib/x86_64-linux-gnu/libgcc_s.so.1 is not in `search path` (LD_DEBUG=libs). So a manual copy is needed.
Comment 2 Florian Weimer 2021-08-03 12:58:27 UTC
Please talk to Debian or Ubuntu about upstreaming their multiarch patches. The upstream toolchain is consistent in this area. The issue only happens if you try to do glibc development on a system that has these custom downstream patches in its system toolchain.

(Just to be clear, I would like to see these patches upstreamed, it's just not something I'm sure I can do due to the licensing aspects involved.)
Comment 3 Fangrui Song 2021-08-03 19:41:27 UTC
Reported a Debian bug on https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=991861