ports/147456: openldap24-client build failure on 6.4 AMD64

Matthias Andree mandree at FreeBSD.org
Fri Jun 4 10:31:28 UTC 2010

Am 04.06.2010 02:22, schrieb Xin LI:
> Hi,
> I fail to see problem on ports build cluster:
> 	http://portsmon.freebsd.org/portoverview.py?category=net&portname=openldap24-client
> Is there any special flags at your side?

I checked, none.

However I am using Tinderbox on amd64/8.1-PRERELEASE, with a 6.4-FreeBSD
jail - I'm not sure if that is safe WRT threads.

Please consider the attached log file, which documents that most of the
-lpthread stuff is failing with this:

> configure:20678: checking for pthread link with -pthread
> configure:20877: cc -o conftest -O2 -fno-strict-aliasing -pipe   -I/usr/local/include  -rpath=/usr/lib:/usr/local/lib -L/usr/local/lib conftest.c -pthread  >&5
> conftest.c: In function `task':
> conftest.c:108: warning: cast to pointer from integer of different size
> configure:20880: $? = 0
> configure:20886: ./conftest
> Fatal error 'kse_create() failed
> ' at line 469 in file /usr/src/lib/libpthread/thread/thr_kern.c (errno = 0)
> configure:20889: $? = 1
> configure: program exited with status 1

And finally, from the former log, in libraries/ldap_r, we see that
libtool strips -lc_r from the command line:

> /bin/sh /usr/local/bin/libtool --mode=link  cc  -O2 -fno-strict-aliasing -pipe  -rpath=/usr/lib:/usr/local/lib -L/usr/local/lib   -o ltest test.o libldap_r.la ../../libraries/liblber/liblber.la ../../libraries/liblutil/liblutil.a   -lssl -lcrypto  -lfetch -lcom_err  -lc_r

Still there

> libtool: link: cc -O2 -fno-strict-aliasing -pipe -rpath=/usr/lib:/usr/local/lib -o .libs/ltest test.o  -L/usr/local/lib ./.libs/libldap_r.so /work/a/ports/net/openldap24-client/work/openldap-2.4.22/libraries/liblber/.libs/liblber.so ../../libraries/liblber/.libs/liblber.so ../../libraries/liblutil/liblutil.a -lssl -lcrypto -lfetch -lcom_err -Wl,-rpath -Wl,/usr/local/lib
> libtool: link: cc -O2 -fno-strict-aliasing -pipe -rpath=/usr/lib:/usr/local/lib -o .libs/apitest apitest.o  -L/usr/local/lib ./.libs/libldap_r.so /work/a/ports/net/openldap24-client/work/openldap-2.4.22/libraries/liblber/.libs/liblber.so ../../libraries/liblber/.libs/liblber.so ../../libraries/liblutil/liblutil.a -lssl -lcrypto -lfetch -lcom_err -Wl,-rpath -Wl,/usr/local/lib

Gone, leading to linker failures:

> ./.libs/libldap_r.so: undefined reference to `pthread_attr_destroy'
> ./.libs/libldap_r.so: undefined reference to `pthread_attr_destroy'
> ./.libs/libldap_r.so: undefined reference to `pthread_create'

Manually linking in this directory with -lc_r lets the link proceed, but
I'm not sure if the resulting executable would work.  I assume it would.

So might this be an inherited libtool bug?  Or is this an issue of
running 6.4 userspace (in the jail) with 8.0 kernel? How do I work
around that?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: openldap24-client-config.log.xz
Type: application/octet-stream
Size: 17536 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/freebsd-ports-bugs/attachments/20100604/89f6dff6/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 196 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freebsd.org/pipermail/freebsd-ports-bugs/attachments/20100604/89f6dff6/attachment.sig>

More information about the freebsd-ports-bugs mailing list