[ not sure what happened to the other messages I sent, they don't seem to be on the list archive, they have probably been lost somewhere... sorry if you receive this for a second time ]
On gio, lug 17, 2014 at 02:42:34 +0200, Kamil Dudka wrote: > On Thursday, July 17, 2014 13:30:25 Kamil Dudka wrote: > > On Thursday, July 17, 2014 12:49:36 Alessandro Ghedini wrote: > > > 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. > > I am unable to reproduce it locally. Are you able to trigger the failure > with the upstream distribution of curl? Do you mean the 7.37.1 tarball? If so, yes. Same with git master. > Could you please attach your config.log? Since it's rather big and the mailing list complained about it, I uploaded it at https://gist.github.com/ghedo/369f9ae7f3db72f9ab6b > > > 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). > > > > I believe the correct fix is to link the curl tool with NSS libs when > > compiled against NSS. I remember we hit the same problem when we ported > > the metalink support to use NSS for crypto. Again, not sure what happened to my previous message (doesn't seem to be on the list archives), but I made a patch to do just that and attached it. Cheers
From f529666cd6fbfb0f18b293a5d1fb7b6af1866bf4 Mon Sep 17 00:00:00 2001 From: Alessandro Ghedini <alessan...@ghedini.me> Date: Thu, 17 Jul 2014 14:37:28 +0200 Subject: [PATCH] build: link curl to NSS libraries when NSS support is enabled --- configure.ac | 3 +++ src/Makefile.am | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index c3cccfb..d122e4a 100644 --- a/configure.ac +++ b/configure.ac @@ -2078,6 +2078,9 @@ if test "$curl_ssl_msg" = "$init_ssl_msg"; then if test "x$USE_NSS" = "xyes"; then AC_MSG_NOTICE([detected NSS version $version]) + NSS_LIBS=$addlib + AC_SUBST([NSS_LIBS]) + dnl when shared libs were found in a path that the run-time dnl linker doesn't search through, we need to add it to dnl LD_LIBRARY_PATH to prevent further configure tests to fail diff --git a/src/Makefile.am b/src/Makefile.am index 72e6772..e65d859 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -57,9 +57,9 @@ CFLAGS += @CURL_CFLAG_EXTRAS@ LIBS = $(BLANK_AT_MAKETIME) if USE_EXPLICIT_LIB_DEPS -curl_LDADD = $(top_builddir)/lib/libcurl.la @LIBMETALINK_LIBS@ @LIBCURL_LIBS@ +curl_LDADD = $(top_builddir)/lib/libcurl.la @LIBMETALINK_LIBS@ @NSS_LIBS@ @LIBCURL_LIBS@ else -curl_LDADD = $(top_builddir)/lib/libcurl.la @LIBMETALINK_LIBS@ @ZLIB_LIBS@ @CURL_NETWORK_AND_TIME_LIBS@ +curl_LDADD = $(top_builddir)/lib/libcurl.la @LIBMETALINK_LIBS@ @NSS_LIBS@ @ZLIB_LIBS@ @CURL_NETWORK_AND_TIME_LIBS@ endif curl_LDFLAGS = @LIBMETALINK_LDFLAGS@ -- 2.0.1
signature.asc
Description: Digital signature
------------------------------------------------------------------- List admin: http://cool.haxx.se/list/listinfo/curl-library Etiquette: http://curl.haxx.se/mail/etiquette.html