cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Build libcurl with NSS support

From: Kamil Dudka <kdudka_at_redhat.com>
Date: Mon, 13 Jun 2016 20:26:33 +0200

On Monday, June 13, 2016 17:14:19 Cody Pritchard wrote:
> After running the "make nss_build_all" command, there is no pkg-config file
> anywhere in the nss or dist directories. From what ive gathered online (and
> I could be wrong) I have only seen people get a pkg-config file when
> building nss on linux or Ubuntu. I have not found any good examples of
> building nss on windows, which is what im doing, so I don't have a good
> reference to know if I have done something wrong of if im missing a crucial
> piece. The Mozilla instructions for building NSS makes no mention of a
> pkg-config file, it only said I should have the dist/WIN954.0_DBG.OBJ
> folder.

From the attached config.log it is obvious that there is no usable pkg-config
executable available in $PATH. The pkg-config executable is not going to be
installed by NSS. pkg-config is a standalone software project that needs to
be installed separately.

On the other hand, NSS may install the nss-config executable script. If you
want to make curl's configure script try to use nss-config, you need to use
the --with-nss option without specifying any path. Instead of that, set the
$PATH environment variable such that the nss-config executable is available.

Kamil

> In response to Daniel, I found why the path was not getting set.
> That condition block is on line 24816 of my configure script, and it was
> using a "/" to append the /lib directory, and when I entered in
> --with-nss=$NSS_DIR I had used "\" in the path I gave. After putting the
> path in quotes and using "/" it then added the path correctly and was able
> to find the nspr.h file and others. So now the addld and addcflags are as
> so:
> addld = C:/BUILD/nss-3.24/dist/WIN954.0_DBG.OBJ/lib
> addcflags = C:/BUILD/nss-3.24/dist/WIN954.0_DBG.OBJ/include
>
> And the LD_LIBRARY_PATH was also being set incorrectly with the slashes so
> it is now properly set to: LD_LIBRARY_PATH =
> c:/BUILD/nss-3.24/dist/WIN954.0_DBG.OBJ/lib
>
> However, now it is looking for more .h files that it cannot find because
> they are in a public directory outside the DBG.OBJ folder. Their path would
> be: C:/BUILD/nss-3.24/dist/public/nss
>
> I copied the files it needed from that directory into the DBG.OBJ/include
> directory and it was then able to begin compiling.
>
> But, towards the end it lists a bunch of warnings about linking errors to
> the NSS libraries stating: Warning: linker path does not have real file for
> library -lssl3.
> I have the capability to make that library automatically link in when you
> link this library. But I can only do this If you have a Shared version of
> the library, which you do not appear to have because I did check the linker
> path looking for a file starting With libssl3 but no candidates were found.
> (...for file magic test)
>
> It gives this warning for the libraries:
> -lssl3, -lsmime3, -lnss3, -lplds4, -lplc4, -lnspr4
>
> But I have these libraries in / dist/WIN954.0_DBG.OBJ/lib as:
> ssl3.dll, smime3.dll, nss3.dll, plc4.dll, nspr4.dll
>
> So does it need these to all be libssl3.dll, etc? And if so, how do I make
> that happen?
>
> Then gives the notice:
> Since this library must not contain undefined symbols, because either the
> platform does not support them Or it was explicitely requested with
> -no-undefined, libtool will only create a static version of it.
>
> After this it continues compiling and goes to build all in
> c:/BUILD/curl-7.49.0/src and hits an error and fails.
>
> I have attached my config.log file as Kamil requested.
>
> Thank you.
> Cody.
>
> -----Original Message-----
> From: Kamil Dudka [mailto:kdudka_at_redhat.com]
> Sent: Friday, June 10, 2016 1:46 AM
> To: Cody Pritchard (cpritchard) <cpritchard_at_micron.com>
> Cc: curl-library_at_cool.haxx.se
> Subject: Re: Build libcurl with NSS support
>
> On Thursday, June 09, 2016 22:04:46 Cody Pritchard wrote:
> > I opened up the config script file and am looking at the conditional
> > block you mentioned.
> >
> > So what you are saying is that it should have worked and compiled fine
> > but something is going wrong?
> >
> > Is there any possibility of changing the paths in the config file to
> > help it find the proper files that make needs?
>
> If you specify --with-nss=$NSS_DIR, the script looks for a pkg-config file
> installed by nss at $NSS_DIR/lib/pkgconfig/nss.pc . Is there such a file?
>
> Is the pkg-config executable available in $PATH?
>
> Alternatively, you can put the nss-config executable installed by nss into
> your $PATH and build with just --with-nss .
>
> In any case, it would be useful to attach the config.log file generated by
> the configure script.
>
> Kamil
>
> > -----Original Message-----
> > From: curl-library [mailto:curl-library-bounces_at_cool.haxx.se] On
> > Behalf Of Daniel Stenberg Sent: Thursday, June 09, 2016 2:47 PM
> > To: libcurl development <curl-library_at_cool.haxx.se>
> > Subject: Re: Build libcurl with NSS support
> >
> > On Thu, 9 Jun 2016, Cody Pritchard (cpritchard) wrote:
> > > CC libcurl_la-file.lo
> > >
> > > In file included from file.c:50:0:
> > > urldata.h:123:18: fatal error: nspr.h: No such file or directory
> > > #include <nspr.h>
> >
> > You run into trouble building with a custom NSS install path because
> > you don't have a pkg-config for it there so curl can't know for sure
> > how to use it. It makes some guesses though:
> >
> > Your stackoverflow outputs showed that configure said:
> > "WARNING: Using hard-wired libraries and compilation flags for NSS."
> >
> > Within that same conditional block in the scripe where that message is
> > output, it adds -I$OPT_NSS/include to the CPPFLAGS. Doesn't it?
> >
> > That should be enough to make the compiler find nspr.h too. But
> > something apparently made it not do that...
-------------------------------------------------------------------
List admin: https://cool.haxx.se/list/listinfo/curl-library
Etiquette: https://curl.haxx.se/mail/etiquette.html
Received on 2016-06-13