Bug 64419 - net/openldap22-client (2.2.5 / 2.2.6) fails to compile
Summary: net/openldap22-client (2.2.5 / 2.2.6) fails to compile
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Oliver Eikemeier
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-03-18 13:30 UTC by edwin
Modified: 2004-03-19 00:39 UTC (History)
0 users

See Also:


Attachments
config.log (69.15 KB, text/plain; charset=us-ascii)
2004-03-18 21:35 UTC, edwin
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description edwin 2004-03-18 13:30:10 UTC
net/openldap22-client fails to compile:

(cd .libs && rm -f libldap.la && ln -s ../libldap.la libldap.la)
cc -O -pipe -I../../include -I../../include   -D_THREAD_SAFE  -I/usr/local/include  -c apitest.c
/bin/sh /usr/local/libexec/libtool14/libtool --mode=link  cc  -O -pipe  -L/usr/local/lib -rpath=/usr/lib:/usr/local/lib   -o apitest apitest.o libldap.la ../../libraries/liblber/liblber.la ../../libraries/liblutil/liblutil.a   -lssl -lcrypto  -lfetch -lcom_err -pthread 
cc -O -pipe -rpath=/usr/lib:/usr/local/lib -o .libs/apitest apitest.o -pthread  -L/usr/local/lib ./.libs/libldap.so /usr/ports/net/openldap22-client/work/openldap-2.2.6/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
./.libs/libldap.so: undefined reference to `__h_errno'
*** Error code 1

Stop in /usr/ports/net/openldap22-client/work/openldap-2.2.6/libraries/libldap.
*** Error code 1

It both fails for 2.2.5 and 2.2.6 with the same error.

Fix: 

Suggestions?
Comment 1 Kirill Ponomarev freebsd_committer 2004-03-18 13:44:47 UTC
Responsible Changed
From-To: freebsd-ports-bugs->eik

Over to maintainer.
Comment 2 Oliver Eikemeier 2004-03-18 14:29:59 UTC
Edwin Groothuis wrote:

> net/openldap22-client fails to compile:
> 
> [...]
> ./.libs/libldap.so: undefined reference to `__h_errno'
> *** Error code 1

Sigh. config.log? Full build log? Can you compile

#include <netdb.h>
int main() {h_errno = 0; return 0;}

with -pthread? what does ldd a.out give you? Try

  strings /usr/lib/libc_r.so | grep h_errno

  ldd `make -VWRKSRC`/libraries/libldap/.libs/libldap.so

  strings `make -VWRKSRC`/libraries/libldap/.libs/libldap.so | grep h_errno

-Oliver
Comment 3 Oliver Eikemeier freebsd_committer 2004-03-18 14:30:53 UTC
State Changed
From-To: open->feedback

asked some questions
Comment 4 edwin 2004-03-18 21:35:21 UTC
On Thu, Mar 18, 2004 at 03:29:59PM +0100, Oliver Eikemeier wrote:
> Edwin Groothuis wrote:
> 
> >net/openldap22-client fails to compile:
> >
> >[...]
> >./.libs/libldap.so: undefined reference to `__h_errno'
> >*** Error code 1
> 
> Sigh. config.log? Full build log? Can you compile

config.log is attached.

> #include <netdb.h>
> int main() {h_errno = 0; return 0;}
> 
> with -pthread? what does ldd a.out give you? Try

[~] root@test>cat a.c
#include <netdb.h>
int main() {h_errno = 0; return 0;}
[~] root@test>gcc -pthread -o a a.c
[~] root@test>./a
[~] root@test>ldd a
a:
        libc_r.so.4 => /usr/lib/libc_r.so.4 (0x28066000)

>  strings /usr/lib/libc_r.so | grep h_errno

[~] root@test>strings /usr/lib/libc_r.so | grep h_errno
h_errno

nm /usr/lib/libc_r.a | grep h_errno
[~] root@test>nm /usr/lib/libc_r.a | grep h_errno
         U h_errno
	 U h_errno
00000004 C h_errno
	 U h_errno
	 [...]

>  ldd `make -VWRKSRC`/libraries/libldap/.libs/libldap.so

[/usr/ports/net/openldap22-client] root@test>ldd `make -VWRKSRC`/libraries/libldap/.libs/libldap.so
/usr/ports/net/openldap22-client/work/openldap-2.2.6/libraries/libldap/.libs/libldap.so:
        liblber.so.202 => /usr/ports/net/openldap22-client/work/openldap-2.2.6/libraries/liblber/.libs/liblber.so.202 (0x2812e000)
	libssl.so.3 => /usr/lib/libssl.so.3 (0x28139000)
	libcrypto.so.3 => /usr/lib/libcrypto.so.3 (0x28168000)

>  strings `make -VWRKSRC`/libraries/libldap/.libs/libldap.so | grep h_errno

[/usr/ports/net/openldap22-client] root@test>strings `make -VWRKSRC`/libraries/libldap/.libs/libldap.so | grep h_errno
__h_errno
[/usr/ports/net/openldap22-client] root@test>nm `make -VWRKSRC`/libraries/libldap/.libs/libldap.so | grep h_errno
         U __h_errno

Edwin
--
Edwin Groothuis      |            Personal website: http://www.mavetju.org
edwin@mavetju.org    |          Weblog: http://weblog.barnet.com.au/edwin/
Comment 5 edwin 2004-03-19 00:10:13 UTC
It's tracked down due to the bindX_overwrite_base port, which
replaced /usr/include/netdb.h

I have it compiling now, after un-replacing netdb.h from the original
sources.

-- 
Edwin Groothuis      |            Personal website: http://www.mavetju.org
edwin@mavetju.org    |          Weblog: http://weblog.barnet.com.au/edwin/
Comment 6 Oliver Eikemeier freebsd_committer 2004-03-19 00:38:22 UTC
State Changed
From-To: feedback->closed

Temporarily disabled compilation until I can fix the problem.