Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 04 Jun 2010 10:40:21 -0700
From:      Xin LI <delphij@delphij.net>
To:        Matthias Andree <mandree@FreeBSD.org>
Cc:        freebsd-ports-bugs@FreeBSD.ORG, delphij@FreeBSD.ORG, d@delphij.net, Renato Botelho <garga@freebsd.org>
Subject:   Re: ports/147456: openldap24-client build failure on 6.4 AMD64
Message-ID:  <4C093A85.5010907@delphij.net>
In-Reply-To: <4C08D5FC.8020800@FreeBSD.org>
References:  <201006040003.o5403NUb006763@freefall.freebsd.org> <4C084738.2010305@delphij.net> <4C08D5FC.8020800@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

On 2010/06/04 03:31, Matthias Andree wrote:
> 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?

I think that's because kse_* system calls are removed on 8.x (i.e. a
libmap has to be set to map lib{pthread,kse}.so.2 to libthr.so.2).

Cheers,
- -- 
Xin LI <delphij@delphij.net>	http://www.delphij.net/
FreeBSD - The Power to Serve!	       Live free or die
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.14 (FreeBSD)

iQEcBAEBCAAGBQJMCTqFAAoJEATO+BI/yjfBQ0cH/Ry3Ci0sI5+kty1Q+kE0dAbU
HGgm60RlPcwO+2YnwQDsP6ZhAKSuaj4a1yHFV8S3OIMlMHkJRHm1/sSdGdVGYhfe
bpfFY4QoHfzJ2AT4CFF3BOHNfeyiFlZ+MFUvFetwZcIgSMwtthjKt4Kk47k1lhFr
4nseESIc4GCLS9MkQuT4NOYYuie8qR6q5unpMN2It08hoFO7xRA9jzBe6Owco+Sh
oikRjZah8TlLPnpad1rfsuAcULOxgtrpqbGD/Y9hcFF1nBMOVk0Y8+qa8SD85Dv/
qWqUQx7cqVHLyEDsl3FQkyLKyNwqAtf7mUEh2cWMsLNVAucaCRP2xJ/jh9f+d+Y=
=VXx8
-----END PGP SIGNATURE-----



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4C093A85.5010907>