On Sun, Nov 07 2021, Kurt Miller <[email protected]> wrote:
> On Nov 5, 2021, at 5:00 PM, Christian Weisgerber <[email protected]> wrote:
>> 
>> I ran another amd64 bulk build with base clang updated to LLVM 13.
>> I also put in a tentative fix for security/nss.
>> 
>> Failure logs:
>> http://build-failures.rhaalovely.net/amd64-clang/2021-11-04/
>> 
>> Some very basic triage below.  The single biggest problem is linker
>> failures of this kind:
>> ld: error: /usr/local/lib/libintl.so.7.0: undefined reference to 
>> pthread_mutexattr_init [--no-allow-shlib-undefined]
>
> libintl has some weak references to pthread’s functions:
>
> llvm13$ nm /usr/local/lib/libintl.so.7.0 | grep pthread 
> 00003f80 t pthread_atfork
>          W pthread_cond_broadcast
>          W pthread_cond_destroy
>          W pthread_cond_init
>          W pthread_cond_signal
>          W pthread_cond_wait
>          W pthread_mutex_destroy
>          W pthread_mutex_init
>          W pthread_mutex_lock
>          W pthread_mutex_unlock
>          W pthread_mutexattr_destroy
>          W pthread_mutexattr_gettype
>          W pthread_mutexattr_init
>          W pthread_mutexattr_settype
>
> pthread_cond_* and pthread_mutex_* were moved into libc a while ago:
>
> https://github.com/openbsd/src/commit/a5511fa9f431600dbd6dc2b46fc4e6b73e7d239c
>
> However, pthread_mutexattr_* was not and requires -pthread to pick it up.
>
> These ports that are failing will need to link with -pthread or alternatively
> we need to move pthread_mutexattr_* from libpthread to libc.

Those are two approaches to get past this failure, but I suspect that
the root cause is just a bug / limitation introduced in this llvm
release.   The approach taken by libintl looks reasonable to me, see
https://marc.info/?l=openbsd-ports&m=163542307305150&w=2 for more
information.

-- 
jca | PGP : 0x1524E7EE / 5135 92C1 AD36 5293 2BDF  DDCC 0DFA 74AE 1524 E7EE

Reply via email to