Upon boot of a ppc64el system configured to authenticate as an LDAP client, the boot process is interrupted with :
/sbin/init: symbol lookup error: /lib/powerpc64le-linux-gnu/libnss_ldap.so.2: undefined symbol: __libc_lock_lock
Apparently __libc_lock_lock is missing from the libnss_ldap.so library.
Looking at the symbols exported by the library on PPC64el we see :
- For libnss_ldap :
$ nm -D /lib/powerpc64le-linux-gnu/libnss_ldap.so.2 | grep _lock
U __libc_lock_lock
U __libc_lock_unlock
• For libc :
$ nm -D /lib/powerpc64le-linux-gnu/libc-2.19.so | grep _lock
000000000008f4a0 T _IO_list_lock
0000000000088a70 T _IO_peekc_locked
00000000001313b0 T pthread_mutex_lock
The same command on AMD64 returns :
- For libnss_ldap:
# nm -D /lib/x86_64-linux-gnu/libnss_ldap.so.2 | grep lock
w __pthread_mutex_lock
w __pthread_mutex_unlock
• For libc :
# nm -D /lib/x86_64-linux-gnu/libc-2.19.so | grep _lock
...
0000000000108270 T pthread_mutex_lock
So the symbol is _not_ exported by the libc on ppc64el even though libnss_ldap is expecting to find it.
So apparently, the HAVE_LIBC_LOCK_H symbol is defined on ppc64el, or at least appear to be even if the libc does not export that libc_lock_lock symbol.
Analysis
========
Upon boot of a ppc64el system configured to authenticate as an LDAP client, the boot process is interrupted with :
/sbin/init: symbol lookup error: /lib/powerpc64l e-linux- gnu/libnss_ ldap.so. 2: undefined symbol: __libc_lock_lock
Apparently __libc_lock_lock is missing from the libnss_ldap.so library.
Looking at the symbols exported by the library on PPC64el we see :
- For libnss_ldap : e-linux- gnu/libnss_ ldap.so. 2 | grep _lock
$ nm -D /lib/powerpc64l
U __libc_lock_lock
U __libc_lock_unlock
• For libc : e-linux- gnu/libc- 2.19.so | grep _lock
$ nm -D /lib/powerpc64l
000000000008f4a0 T _IO_list_lock
0000000000088a70 T _IO_peekc_locked
00000000001313b0 T pthread_mutex_lock
The same command on AMD64 returns : 64-linux- gnu/libnss_ ldap.so. 2 | grep lock mutex_lock mutex_unlock 64-linux- gnu/libc- 2.19.so | grep _lock
- For libnss_ldap:
# nm -D /lib/x86_
w __pthread_
w __pthread_
• For libc :
# nm -D /lib/x86_
...
0000000000108270 T pthread_mutex_lock
So the symbol is _not_ exported by the libc on ppc64el even though libnss_ldap is expecting to find it.
This lock is only used once in libnss_ldap :
static int HAVE_LIBC_ LOCK_H) || defined( HAVE_BITS_ LIBC_LOCK_ H) LIBC_LOCK_ H */
ltf_mutex_lock (void *mutexp)
{
#if defined(
return __libc_lock_lock (*(pthread_mutex_t *) mutexp);
#elif defined(HPUX)
return __thread_mutex_lock ((pthread_mutex_t *) mutexp);
#else
# ifdef _AIX
if (__multi_threaded == 0)
return 0;
# endif
return pthread_mutex_lock ((pthread_mutex_t *) mutexp);
#endif /* HAVE_LIBC_LOCK_H || HAVE_BITS_
}
So apparently, the HAVE_LIBC_LOCK_H symbol is defined on ppc64el, or at least appear to be even if the libc does not export that libc_lock_lock symbol.