undefined symbol: pthread_yield

Bug #1949988 reported by Gregor Jasny
24
This bug affects 4 people
Affects Status Importance Assigned to Milestone
glibc (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Hello,

while compiling our software in a Ubuntu jammy docker image I noticed a backward incompatibility issue in glibc 2.34-0ubuntu3. Our build fails with:

ld.lld: error: undefined symbol: pthread_yield
>>> referenced by tlibthrd.cxx:1546 (ptlib/unix/tlibthrd.cxx:1546)
>>> tlib.o:(PTimedMutex::~PTimedMutex()) in archive /builds/ExternalLibs/ptlib/2.10.9_1591084383/Applications_ubuntu2004_x64_cxx17_clang10/lib/libpt_d_s.a
>>> did you mean: pthread_yield@GLIBC_2.2.5
>>> defined in: /lib/x86_64-linux-gnu/libc.so.6

The libpt_d_s.a library was statically built on Ubuntu 20.04 and depends on a lot of pthread symbols:

$ nm /builds/ExternalLibs/ptlib/2.10.9_1591084383/Applications_ubuntu2004_x64_cxx17_clang10/lib/libpt_d_s.a|grep -i " U pthread"|sort -u
                 U pthread_attr_destroy
                 U pthread_attr_init
                 U pthread_attr_setschedparam
                 U pthread_attr_setschedpolicy
                 U pthread_attr_setstacksize
                 ...
                 U pthread_yield

Recompiling libpt against the current glibc will redirect from pthread_yield to sched_yield, but nevertheless it would be nice if existing libraries could be used for the transition phase.

The changes behavior is most likely due to
https://sourceware.org/git/?p=glibc.git;a=commit;h=c2fd60a5861efef48252f5cc7efc70e1d8a0da9a

Thanks,
Gregor

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in glibc (Ubuntu):
status: New → Confirmed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.