On Thu, Oct 28 2021, Jonathan Gray <j...@jsg.id.au> wrote: > On Thu, Oct 28, 2021 at 10:30:36AM +0200, Christian Weisgerber wrote: >> Jonathan Gray: >> >> > > fvwm2 may be an exception here. I looked through the log and can't find >> > > any error before the linker error: >> > > >> > > ld: error: /usr/local/lib/libintl.so.7.0: undefined reference to >> > > pthread_mutexattr_init [--no-allow-shlib-undefined] >> > > ld: error: /usr/local/lib/libintl.so.7.0: undefined reference to >> > > pthread_mutexattr_settype [--no-allow-shlib-undefined] >> > > ld: error: /usr/local/lib/libintl.so.7.0: undefined reference to >> > > pthread_mutexattr_destroy [--no-allow-shlib-undefined] >> > > >> > > Leads me to conclude that we need to add -lpthread now to satisfy >> > > clang13. Diff for that below; CC maintainer. ok? >> > >> > There are multiple ports which fail to build like this. >> > >> > Shouldn't libintl instead link libpthread? >> >> Shouldn't we try to understand why this is failing now? > > I suspect changes to undefined symbol handling in lld mentioned > in the lld 13 release notes: > > https://releases.llvm.org/13.0.0/tools/lld/docs/ReleaseNotes.html
libintl uses weak symbols on purpose, the three symbols mentioned above are marked as such in libintl.so. See gettext-runtime/intl/lock.h for a rationale. Maybe I'm missing something but the libintl approach looks correct to me and the recent changes in lld land look incomplete/incorrect. -- jca | PGP : 0x1524E7EE / 5135 92C1 AD36 5293 2BDF DDCC 0DFA 74AE 1524 E7EE