security/nss does not build

John Hein jhein at timing.com
Sun Nov 16 21:45:58 PST 2008


Karl-Petter Åkesson wrote at 20:52 +0200 on Sep  1, 2008:
 > I get this problem when I try to build the nss port. It has been 
 > reported in PR 122293 but the fix suggested to nspr4.7 does not help. 
 > Please, any suggestion to solve this would be great!
 > 
 > /Kalle

I just had this same problem portupgrading from nss-3.11.4 to the
latest, nss-3.11.9_2.

The quick workaround is to pkg_delete the old nss first.

What happens is that the build creates libssl and puts it into a
temporary "dist" dir under the work directory.  The new libssl has the
symbol, SSL_CanBypass, defined.  But the link command (quoted below)
has -L/usr/local/lib before -L../../../../dist/FreeBSD6.3_OPT.OBJ/lib,
and so it tries to link with the _installed_ libssl which does _not_
have the new symbol.

It would probably be better if -L/usr/local/lib were after the other
-L in the linker flags.  Then it can still find -lnspr4 (for
instance), but won't find the older internal (to nss) libs before the
newly built internal libs in the "dist" dir.

Fixing nss to do this may be worthwhile, but I haven't tested
anything myself, opting for the aforementioned pkg_delete quick
workaround.

Note that -L${LOCALBASE}/lib was fairly recently added (12-Mar-08)
to CFLAGS in security/nss/Makefile.


 > cc -o FreeBSD6.3_OPT.OBJ/selfserv -O2 -fno-strict-aliasing -pipe 
 > -I/usr/local/include/nspr -L/usr/local/lib -O -fPIC -ansi -Wall 
 > -DFREEBSD-DHAVE_STRERROR -DHAVE_BSD_FLOCK -DXP_UNIX -UDEBUG -DNDEBUG 
 > -D_THREAD_SAFE -D_REENTRANT -DNSS_ENABLE_ECC 
 > -I../../dist/FreeBSD6.3_OPT.OBJ/include  -I../../dist/public/ 
 > -I../../dist/private/  -O -fPIC -ansi -Wall -DFREEBSD -DHAVE_STRERROR 
 > -DHAVE_BSD_FLOCK -DXP_UNIX -UDEBUG -DNDEBUG -D_THREAD_SAFE -D_REENTRANT 
 > -DNSS_ENABLE_ECC -I../../../dist/FreeBSD6.3_OPT.OBJ/include  
 > -I../../../dist/public/ -I../../../dist/private/ 
 > -I../../../dist/public/nss -I../../../dist/public/nspr 
 > -I../../../dist/public/libdbm 
 > -I../../../dist/FreeBSD6.3_OPT.OBJ/../public/security -I./include   -O 
 > -fPIC -ansi -Wall -DFREEBSD -DHAVE_STRERROR -DHAVE_BSD_FLOCK -DXP_UNIX 
 > -DNSPR20 -DNSS_ENABLE_ECC -UDEBUG -DNDEBUG -D_THREAD_SAFE -D_REENTRANT 
 > -DNSS_ENABLE_ECC -I../../../../dist/FreeBSD6.3_OPT.OBJ/include  
 > -I../../../../dist/public/nss -I../../../../dist/private/nss 
 > -I../../../../dist/public/seccmd -I../../../../dist/public/dbm  
 > FreeBSD6.3_OPT.OBJ/selfserv.o  
 > ../../../../dist/FreeBSD6.3_OPT.OBJ/lib/libsectool.a  
 > -Wl,-rpath-link,../../../../dist/FreeBSD6.3_OPT.OBJ/lib 
 > -L../../../../dist/FreeBSD6.3_OPT.OBJ/lib -lssl3 -lsmime3 -lnss3 
 > -L../../../../dist/FreeBSD6.3_OPT.OBJ/lib -lplc4 -lplds4 -lnspr4  -pthread
 > FreeBSD6.3_OPT.OBJ/selfserv.o(.text+0x2f4b): In function `.L354':
 > : undefined reference to `SSL_CanBypass'
 > FreeBSD6.3_OPT.OBJ/selfserv.o(.text+0x30c3): In function `.L354':
 > : undefined reference to `SSL_CanBypass'
 > gmake[2]: *** [FreeBSD6.3_OPT.OBJ/selfserv] Fel 1
 > gmake[2]: Leaving directory 
 > `/usr/ports/security/nss/work/nss-3.11.9/mozilla/security/nss/cmd/selfserv'
 > gmake[1]: *** [libs] Fel 2
 > gmake[1]: Leaving directory 
 > `/usr/ports/security/nss/work/nss-3.11.9/mozilla/security/nss/cmd'
 > gmake: *** [libs] Fel 2
 > *** Error code 2


More information about the freebsd-ports mailing list