curl-library
Trouble building NSS variant
Date: Thu, 17 Jul 2014 12:49:36 +0200
Hi,
I'm having trouble building the NSS variant (both from git and 7.37.1):
> libtool: link: gcc -O2 -Wno-system-headers -o .libs/curl curl-tool_binmode.o curl-tool_bname.o curl-tool_cb_dbg.o curl-tool_cb_hdr.o curl-tool_cb_prg.o curl-tool_cb_rea.o curl-tool_cb_see.o curl-tool_cb_wrt.o curl-tool_cfgable.o curl-tool_convert.o curl-tool_dirhie.o curl-tool_doswin.o curl-tool_easysrc.o curl-tool_formparse.o curl-tool_getparam.o curl-tool_getpass.o curl-tool_help.o curl-tool_helpers.o curl-tool_homedir.o curl-tool_hugehelp.o curl-tool_libinfo.o curl-tool_main.o curl-tool_metalink.o curl-tool_mfiles.o curl-tool_msgs.o curl-tool_operate.o curl-tool_operhlp.o curl-tool_panykey.o curl-tool_paramhlp.o curl-tool_parsecfg.o curl-tool_setopt.o curl-tool_sleep.o curl-tool_urlglob.o curl-tool_util.o curl-tool_vms.o curl-tool_writeenv.o curl-tool_writeout.o curl-tool_xattr.o ../lib/curl-strtoofft.o ../lib/curl-strdup.o ../lib/curl-rawstr.o ../lib/curl-nonblock.o ../lib/curl-warnless.o ../lib/.libs/libcurl.so -lz
> /usr/bin/ld: curl-tool_main.o: undefined reference to symbol 'PL_ArenaFinish'
> //usr/lib/x86_64-linux-gnu/libplds4.so: error adding symbols: DSO missing from command line
> collect2: error: ld returned 1 exit status
This on Debian with gcc-4.9.
Manually passing "-lnspr4 -lplds4" (or the output of pkg-config --libs nss) to
the above command resolves the problem.
The configure command is simply "./configure --without-ssl --with-nss". Setting
"link_all_deplibs" to "yes" for linux in configure works as well, but there
doesn't seem to be any ./configure option for doing that automatically (also it
seems overkill, since only the NSS libraries are needed).
Maybe the code in the "#ifdef USE_NSS" in src/tool_main.c should be moved to
Curl_nss_cleanup() to avoid having the curl binary itself link to all the
$(LIBCURL_LIBS).
There's also the chance that I'm doing something wrong, but the Debian package
build, which works for previous releases, broke because of this, so I imagine
others may have the same problem as well.
Cheers
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
- application/pgp-signature attachment: Digital signature