ports/126297: build of bind95 port dies with link-time errors

Ronald F.Guilmette rfg at tristatelogic.com
Wed Aug 6 09:00:08 UTC 2008


>Number:         126297
>Category:       ports
>Synopsis:       build of bind95 port dies with link-time errors
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Aug 06 09:00:07 UTC 2008
>Closed-Date:
>Last-Modified:
>Originator:     Ronald F. Guilmette
>Release:        FreeBSD 6.3-RELEASE i386
>Organization:
Infinite Monkeys & Co. LLC
>Environment:
System: FreeBSD 6.3-RELEASE

>Description:
If one has the openssl port (version openssl-0.9.8h_1) installed and one tries
to build & install the bind 9.5.0 port, the build of bind will die in the
following horrible way:

cc -O2 -fno-strict-aliasing -pipe -rpath=/usr/local/lib -o named  builtin.o clie
nt.o config.o control.o  controlconf.o interfacemgr.o  listenlist.o log.o logcon
f.o main.o notify.o  query.o server.o sortlist.o statschannel.o  tkeyconf.o tsig
conf.o update.o xfrout.o  zoneconf.o  lwaddr.o lwresd.o lwdclient.o lwderror.o l
wdgabn.o  lwdgnba.o lwdgrbn.o lwdnoop.o lwsearch.o    unix/os.o ../../lib/lwres/
liblwres.a ../../lib/dns/libdns.a  -lcrypto ../../lib/bind9/libbind9.a  ../../li
b/isccfg/libisccfg.a ../../lib/isccc/libisccc.a ../../lib/isc/libisc.a
../../lib/dns/libdns.a(openssldh_link.o)(.text+0x23d): In function `openssldh_ge
nerate':
: undefined reference to `DH_generate_parameters_ex'
../../lib/dns/libdns.a(openssldsa_link.o)(.text+0x365): In function `openssldsa_
generate':
: undefined reference to `DSA_generate_parameters_ex'
../../lib/dns/libdns.a(opensslrsa_link.o)(.text+0x4e0): In function `opensslrsa_
generate':
: undefined reference to `RSA_generate_key_ex'
*** Error code 1
 
Stop in /usr/ports/dns/bind95/work/bind-9.5.0-P2/bin/named.
*** Error code 1
 
Stop in /usr/ports/dns/bind95/work/bind-9.5.0-P2/bin.
*** Error code 1
 
Stop in /usr/ports/dns/bind95/work/bind-9.5.0-P2.
*** Error code 1
 
Stop in /usr/ports/dns/bind95.

The problem is caused by the fact that (a) there is no port config option
for the bind95 port which would allow the user to select or not select
whether bind should be configured --with-openssl or not (it always _is_
configured that way in the current freebsd port, whether the installer
wantss it that way or not) and also (b) unfortunately
when bind gets configured --with-openssl but with no path arg specified 
for the --with-openssl ./configure option, then the build of bind9.5.0
will use the openssl include files from the port (/usr/local/include/openssl/)
which can be one version, but then later on, an attempt is made to link
*not* against the corresponding openssl libraries (in /usr/local/lib) but
rather against, e.g. the libcrypto.so that's in /usr/lib.  Result:  Version
skew/mismatch between the headers & librarys used duing the build of bind95
and a failed link of named.

>How-To-Repeat:
	install 6.3_RELEASE
	portsnap fetch
	portsnap extract
	portinstall openssl
	portinstall bind95

>Fix:

This is *not* a proper solution, but is rather a quick and dirty work-around.
Just a one line hack to the bind95 port top-level Makefile.

I validated that this made the linking errors go away.

*** Makefile-	Sat Aug  2 00:01:20 2008
--- Makefile	Wed Aug  6 01:25:16 2008
***************
*** 52,55 ****
--- 52,56 ----
  .endif
  
+ WITH_OPENSSL_PORT = defined
  .if defined(WITH_OPENSSL_PORT)
  CONFIGURE_ARGS+=	--with-openssl=${LOCALBASE}
>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list