You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by Rob Godfrey <ro...@gmail.com> on 2013/04/01 22:37:05 UTC

Re: CMake improvements

So, it still fails to compile on Ubuntu if you have the libnss3-dev package
installed.  The line in falls down on is doing the following:

~/qpid-clean/cpp/build/src$ /usr/bin/c++  -fPIC
-fvisibility-inlines-hidden -Werror -pedantic -Wall -Wextra -Wno-shadow
-Wpointer-arith -Wcast-qual -Wcast-align -Wno-long-long
-Wvolatile-register-var -Winvalid-pch -Wno-system-headers
-Woverloaded-virtual  -lnss3 -lnssutil3 -lsmime3 -lssl3 -lplds4 -lplc4
-lnspr4   -Wl,--no-undefined -pthread -shared
-Wl,-soname,libsslcommon.so.2.0.0 -o libsslcommon.so.2.0.0
CMakeFiles/sslcommon.dir/qpid/sys/ssl/check.o
CMakeFiles/sslcommon.dir/qpid/sys/ssl/util.o
CMakeFiles/sslcommon.dir/qpid/sys/ssl/SslSocket.o libqpidcommon.so.2.0.0
libqpidtypes.so.1.0.0 -luuid -lboost_system-mt

which results in..

CMakeFiles/sslcommon.dir/qpid/sys/ssl/check.o: In function
`qpid::sys::ssl::ErrorString::ErrorString()':
check.cpp:(.text+0xd): undefined reference to `PR_GetError'
check.cpp:(.text+0x1a): undefined reference to `PR_GetErrorTextLength'
check.cpp:(.text+0x3f): undefined reference to `PR_GetErrorText'

... and a catalog of similar errors.

I'm not a nss, cmake or C++ expert... Anyone want to hazard a guess as to
what is going on?  I'm assuming that when the equivalent package is
installed on a Fedora-like system it all works fine?

-- Rob


On 1 April 2013 19:36, Fraser Adams <fr...@blueyonder.co.uk> wrote:

> Thanks Alan,
> I'll give them a whirl later in the week when I've got my proper IT back.
>
> I'm still on holiday with just my iPad until towards the end of the week.
> The list that you mention is I believe the main set of issues that I'd
> noticed, though Rob mentioned something previously that related to (I
> think) SSL libraries on Ubuntu - was it nss?? I'd have to dig through my
> in-box to check.
>
> I guess just mentioning running ldconfig may be OK but it would be nice to
> have it run automatically as the end of make install, don't know if that's
> possible or has undesirable consequences.
>
> Thanks again, I can feel the nano probe pressing against my eyeball :-)
> Frase
>
>
>
> On 1 Apr 2013, at 17:53, Alan Conway <ac...@redhat.com> wrote:
>
> > I committed these 3 fixes today, to address some stumbling blocks for
> cmake adoption raised on the list last week:
> >
> > r1463202 | QPID-4687: Add uninstall make target to cmake build
> > r1463146 | QPID-4686: Mention ldconfig in cpp/INSTALL instructions
> > r1463145 | QPID-4684: Remove obsolete options from example qpidd.conf
> file.
> >
> > If you're interested in cmake please check them out and shout if there
> are more issues holding back cmake adoption.
> >
> > Cheers,
> > Alan.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
> For additional commands, e-mail: dev-help@qpid.apache.org
>
>

Re: CMake improvements

Posted by Gordon Sim <gs...@redhat.com>.
On 04/02/2013 10:25 AM, Rob Godfrey wrote:
> $ nss-config --libs ; nspr-config --libs
> -L/usr/lib/x86_64-linux-gnu -lssl3 -lsmime3 -lnss3 -lnssutil3
> -L/usr/lib/x86_64-linux-gnu -lplds4 -lplc4 -lnspr4 -lpthread -ldl
>
> As per the output the libraries are in /usr/lib/x86_64-linux-gnu

I would have expected the libdir in the pkgconfig files for nss/nspr 
(e.g. /usr/lib64/pkgconfig/nss.pc or equivalent) to be 
/usr/lib/x86_64-linux-gnu, but from the pkg-config output I assume it is 
not?




---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
For additional commands, e-mail: dev-help@qpid.apache.org


Re: CMake improvements

Posted by Rob Godfrey <ro...@gmail.com>.
Yes - it comiles fine after that patch (sorry for the delay - forgot I had
left that running...)

-- Rob


On 2 April 2013 15:13, Gordon Sim <gs...@redhat.com> wrote:

> On 04/02/2013 01:28 PM, Gordon Sim wrote:
>
>> Ok, now the red herring is out the way, I think the problem may be the
>> ordering. The libraries linked to should come after the .o files in
>> which they are needed[1]. In the autotools build that is indeed happening.
>>
>> [1] http://ubuntuforums.org/**archive/index.php/t-1833136.**html<http://ubuntuforums.org/archive/index.php/t-1833136.html>
>>
>
> Does the attached patch help? (It is not 'correct' as it doesn't remove
> the libraries from the link flags at the start, but it works for me and I
> think should result in the ibs being included again after the .o files that
> require them).
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
> For additional commands, e-mail: dev-help@qpid.apache.org
>

Re: CMake improvements

Posted by Gordon Sim <gs...@redhat.com>.
On 04/02/2013 01:28 PM, Gordon Sim wrote:
> Ok, now the red herring is out the way, I think the problem may be the
> ordering. The libraries linked to should come after the .o files in
> which they are needed[1]. In the autotools build that is indeed happening.
>
> [1] http://ubuntuforums.org/archive/index.php/t-1833136.html

Does the attached patch help? (It is not 'correct' as it doesn't remove 
the libraries from the link flags at the start, but it works for me and 
I think should result in the ibs being included again after the .o files 
that require them).

Re: CMake improvements

Posted by Gordon Sim <gs...@redhat.com>.
On 04/02/2013 12:54 PM, Gordon Sim wrote:
> On 04/02/2013 12:00 PM, Rob Godfrey wrote:
>> No it seems to get exactly the same issue -( :
>>
>> /usr/bin/c++  -fPIC  -fvisibility-inlines-hidden -Werror -pedantic -Wall
>> -Wextra -Wno-shadow -Wpointer-arith -Wcast-qual -Wcast-align
>> -Wno-long-long
>> -Wvolatile-register-var -Winvalid-pch -Wno-system-headers
>> -Woverloaded-virtual  -L/usr/lib/x86_64-linux-gnu -lnss3 -lnssutil3
>> -lsmime3 -lssl3 -lplds4 -lplc4 -lnspr4   -Wl,--no-undefined -pthread
>> -shared -Wl,-soname,libsslcommon.so.2.0.0 -o libsslcommon.so.2.0.0
>> CMakeFiles/sslcommon.dir/qpid/sys/ssl/check.o
>> CMakeFiles/sslcommon.dir/qpid/sys/ssl/util.o
>> CMakeFiles/sslcommon.dir/qpid/sys/ssl/SslSocket.o libqpidcommon.so.2.0.0
>> libqpidtypes.so.1.0.0 -luuid -lboost_system-mt -lboost_program_options-mt
>> -ldl -lrt -lsasl2 -Wl,-rpath,/home/rob/qpid-cpp-cmake/cpp/build/src:
>> CMakeFiles/sslcommon.dir/qpid/sys/ssl/check.o: In function
>> `qpid::sys::ssl::ErrorString::ErrorString()':
>> check.cpp:(.text+0xd): undefined reference to `PR_GetError'
>> check.cpp:(.text+0x1a): undefined reference to `PR_GetErrorTextLength'
>> check.cpp:(.text+0x3f): undefined reference to `PR_GetErrorText'
>
> Ah! That is interesting and suggests I'm barking up the wrong tree.
> Perhaps /usr/lib/x86_64-linux-gnu is indeed on the default path.
> Something else must be wrong...

Ok, now the red herring is out the way, I think the problem may be the 
ordering. The libraries linked to should come after the .o files in 
which they are needed[1]. In the autotools build that is indeed happening.

[1] http://ubuntuforums.org/archive/index.php/t-1833136.html

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
For additional commands, e-mail: dev-help@qpid.apache.org


Re: CMake improvements

Posted by Gordon Sim <gs...@redhat.com>.
On 04/02/2013 12:00 PM, Rob Godfrey wrote:
> No it seems to get exactly the same issue -( :
>
> /usr/bin/c++  -fPIC  -fvisibility-inlines-hidden -Werror -pedantic -Wall
> -Wextra -Wno-shadow -Wpointer-arith -Wcast-qual -Wcast-align -Wno-long-long
> -Wvolatile-register-var -Winvalid-pch -Wno-system-headers
> -Woverloaded-virtual  -L/usr/lib/x86_64-linux-gnu -lnss3 -lnssutil3
> -lsmime3 -lssl3 -lplds4 -lplc4 -lnspr4   -Wl,--no-undefined -pthread
> -shared -Wl,-soname,libsslcommon.so.2.0.0 -o libsslcommon.so.2.0.0
> CMakeFiles/sslcommon.dir/qpid/sys/ssl/check.o
> CMakeFiles/sslcommon.dir/qpid/sys/ssl/util.o
> CMakeFiles/sslcommon.dir/qpid/sys/ssl/SslSocket.o libqpidcommon.so.2.0.0
> libqpidtypes.so.1.0.0 -luuid -lboost_system-mt -lboost_program_options-mt
> -ldl -lrt -lsasl2 -Wl,-rpath,/home/rob/qpid-cpp-cmake/cpp/build/src:
> CMakeFiles/sslcommon.dir/qpid/sys/ssl/check.o: In function
> `qpid::sys::ssl::ErrorString::ErrorString()':
> check.cpp:(.text+0xd): undefined reference to `PR_GetError'
> check.cpp:(.text+0x1a): undefined reference to `PR_GetErrorTextLength'
> check.cpp:(.text+0x3f): undefined reference to `PR_GetErrorText'

Ah! That is interesting and suggests I'm barking up the wrong tree. 
Perhaps /usr/lib/x86_64-linux-gnu is indeed on the default path. 
Something else must be wrong...


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
For additional commands, e-mail: dev-help@qpid.apache.org


Re: CMake improvements

Posted by Rob Godfrey <ro...@gmail.com>.
On 2 April 2013 13:03, Gordon Sim <gs...@redhat.com> wrote:

> On 04/02/2013 11:49 AM, Rob Godfrey wrote:
>
>> On 2 April 2013 12:47, Rob Godfrey <ro...@gmail.com> wrote:
>>
>>
>>>
>>> On 2 April 2013 12:27, Gordon Sim <gs...@redhat.com> wrote:
>>>
>>>  On 04/02/2013 10:58 AM, Rob Godfrey wrote:
>>>>
>>>>  $ cat /usr/lib/x86_64-linux-gnu/****pkgconfig/nspr.pc
>>>>> prefix=/usr
>>>>> exec_prefix=${prefix}
>>>>> libdir=/usr/lib/x86_64-linux-****gnu
>>>>> includedir=${prefix}/include/****nspr
>>>>>
>>>>>
>>>>> Name: NSPR
>>>>> Description: The Netscape Portable Runtime
>>>>> Version: 4.9.5
>>>>> Libs: -L/usr/lib/x86_64-linux-gnu -lplds4 -lplc4 -lnspr4
>>>>> Cflags: -I${prefix}/include/nspr
>>>>>
>>>>>
>>>> The only thing I can think of is that pkg-config is erroneously removing
>>>> the lib dir because it thinks it is on the default linker path.
>>>>
>>>> If you set the PKG_CONFIG_ALLOW_SYSTEM_LIBS variable, what does
>>>> `pkg-config --libs nspr` give then?
>>>>
>>>>
>>>>  $ export PKG_CONFIG_ALLOW_SYSTEM_LIBS=1
>>> $ pkg-config --libs nspr
>>>
>>>
>>   -L/usr/lib/x86_64-linux-gnu -lplds4 -lplc4 -lnspr4
>>
>>
>> Oops - missed off the vital part in that copy and paste operation :-)
>>
>
> Phew! I thought it was not giving any output in that case, which was even
> more mysterious!
>
> That experiment seems to confirm that /usr/lib/x86_64-linux-gnu is being
> excluded due to the (incorrect) assumption that it is on the default link
> path.
>
> If set before cmake is run, does that variable allow the build to work or
> does it result in other issues?
>
>
>
No it seems to get exactly the same issue -( :

/usr/bin/c++  -fPIC  -fvisibility-inlines-hidden -Werror -pedantic -Wall
-Wextra -Wno-shadow -Wpointer-arith -Wcast-qual -Wcast-align -Wno-long-long
-Wvolatile-register-var -Winvalid-pch -Wno-system-headers
-Woverloaded-virtual  -L/usr/lib/x86_64-linux-gnu -lnss3 -lnssutil3
-lsmime3 -lssl3 -lplds4 -lplc4 -lnspr4   -Wl,--no-undefined -pthread
-shared -Wl,-soname,libsslcommon.so.2.0.0 -o libsslcommon.so.2.0.0
CMakeFiles/sslcommon.dir/qpid/sys/ssl/check.o
CMakeFiles/sslcommon.dir/qpid/sys/ssl/util.o
CMakeFiles/sslcommon.dir/qpid/sys/ssl/SslSocket.o libqpidcommon.so.2.0.0
libqpidtypes.so.1.0.0 -luuid -lboost_system-mt -lboost_program_options-mt
-ldl -lrt -lsasl2 -Wl,-rpath,/home/rob/qpid-cpp-cmake/cpp/build/src:
CMakeFiles/sslcommon.dir/qpid/sys/ssl/check.o: In function
`qpid::sys::ssl::ErrorString::ErrorString()':
check.cpp:(.text+0xd): undefined reference to `PR_GetError'
check.cpp:(.text+0x1a): undefined reference to `PR_GetErrorTextLength'
check.cpp:(.text+0x3f): undefined reference to `PR_GetErrorText'

 -- Rob

------------------------------**------------------------------**---------
> To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.**org<de...@qpid.apache.org>
> For additional commands, e-mail: dev-help@qpid.apache.org
>
>

Re: CMake improvements

Posted by Gordon Sim <gs...@redhat.com>.
On 04/02/2013 11:49 AM, Rob Godfrey wrote:
> On 2 April 2013 12:47, Rob Godfrey <ro...@gmail.com> wrote:
>
>>
>>
>> On 2 April 2013 12:27, Gordon Sim <gs...@redhat.com> wrote:
>>
>>> On 04/02/2013 10:58 AM, Rob Godfrey wrote:
>>>
>>>> $ cat /usr/lib/x86_64-linux-gnu/**pkgconfig/nspr.pc
>>>> prefix=/usr
>>>> exec_prefix=${prefix}
>>>> libdir=/usr/lib/x86_64-linux-**gnu
>>>> includedir=${prefix}/include/**nspr
>>>>
>>>> Name: NSPR
>>>> Description: The Netscape Portable Runtime
>>>> Version: 4.9.5
>>>> Libs: -L/usr/lib/x86_64-linux-gnu -lplds4 -lplc4 -lnspr4
>>>> Cflags: -I${prefix}/include/nspr
>>>>
>>>
>>> The only thing I can think of is that pkg-config is erroneously removing
>>> the lib dir because it thinks it is on the default linker path.
>>>
>>> If you set the PKG_CONFIG_ALLOW_SYSTEM_LIBS variable, what does
>>> `pkg-config --libs nspr` give then?
>>>
>>>
>> $ export PKG_CONFIG_ALLOW_SYSTEM_LIBS=1
>> $ pkg-config --libs nspr
>>
>
>   -L/usr/lib/x86_64-linux-gnu -lplds4 -lplc4 -lnspr4
>
>
> Oops - missed off the vital part in that copy and paste operation :-)

Phew! I thought it was not giving any output in that case, which was 
even more mysterious!

That experiment seems to confirm that /usr/lib/x86_64-linux-gnu is being 
excluded due to the (incorrect) assumption that it is on the default 
link path.

If set before cmake is run, does that variable allow the build to work 
or does it result in other issues?

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
For additional commands, e-mail: dev-help@qpid.apache.org


Re: CMake improvements

Posted by Rob Godfrey <ro...@gmail.com>.
On 2 April 2013 12:47, Rob Godfrey <ro...@gmail.com> wrote:

>
>
> On 2 April 2013 12:27, Gordon Sim <gs...@redhat.com> wrote:
>
>> On 04/02/2013 10:58 AM, Rob Godfrey wrote:
>>
>>> $ cat /usr/lib/x86_64-linux-gnu/**pkgconfig/nspr.pc
>>> prefix=/usr
>>> exec_prefix=${prefix}
>>> libdir=/usr/lib/x86_64-linux-**gnu
>>> includedir=${prefix}/include/**nspr
>>>
>>> Name: NSPR
>>> Description: The Netscape Portable Runtime
>>> Version: 4.9.5
>>> Libs: -L/usr/lib/x86_64-linux-gnu -lplds4 -lplc4 -lnspr4
>>> Cflags: -I${prefix}/include/nspr
>>>
>>
>> The only thing I can think of is that pkg-config is erroneously removing
>> the lib dir because it thinks it is on the default linker path.
>>
>> If you set the PKG_CONFIG_ALLOW_SYSTEM_LIBS variable, what does
>> `pkg-config --libs nspr` give then?
>>
>>
> $ export PKG_CONFIG_ALLOW_SYSTEM_LIBS=1
> $ pkg-config --libs nspr
>

 -L/usr/lib/x86_64-linux-gnu -lplds4 -lplc4 -lnspr4


Oops - missed off the vital part in that copy and paste operation :-)

-- Rob

>
>
> -- Rob
>
>
>>
>> ------------------------------**------------------------------**---------
>> To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.**org<de...@qpid.apache.org>
>> For additional commands, e-mail: dev-help@qpid.apache.org
>>
>>
>

Re: CMake improvements

Posted by Rob Godfrey <ro...@gmail.com>.
On 2 April 2013 12:27, Gordon Sim <gs...@redhat.com> wrote:

> On 04/02/2013 10:58 AM, Rob Godfrey wrote:
>
>> $ cat /usr/lib/x86_64-linux-gnu/**pkgconfig/nspr.pc
>> prefix=/usr
>> exec_prefix=${prefix}
>> libdir=/usr/lib/x86_64-linux-**gnu
>> includedir=${prefix}/include/**nspr
>>
>> Name: NSPR
>> Description: The Netscape Portable Runtime
>> Version: 4.9.5
>> Libs: -L/usr/lib/x86_64-linux-gnu -lplds4 -lplc4 -lnspr4
>> Cflags: -I${prefix}/include/nspr
>>
>
> The only thing I can think of is that pkg-config is erroneously removing
> the lib dir because it thinks it is on the default linker path.
>
> If you set the PKG_CONFIG_ALLOW_SYSTEM_LIBS variable, what does
> `pkg-config --libs nspr` give then?
>
>
$ export PKG_CONFIG_ALLOW_SYSTEM_LIBS=1
$ pkg-config --libs nspr


-- Rob


>
> ------------------------------**------------------------------**---------
> To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.**org<de...@qpid.apache.org>
> For additional commands, e-mail: dev-help@qpid.apache.org
>
>

Re: CMake improvements

Posted by Gordon Sim <gs...@redhat.com>.
On 04/02/2013 10:58 AM, Rob Godfrey wrote:
> $ cat /usr/lib/x86_64-linux-gnu/pkgconfig/nspr.pc
> prefix=/usr
> exec_prefix=${prefix}
> libdir=/usr/lib/x86_64-linux-gnu
> includedir=${prefix}/include/nspr
>
> Name: NSPR
> Description: The Netscape Portable Runtime
> Version: 4.9.5
> Libs: -L/usr/lib/x86_64-linux-gnu -lplds4 -lplc4 -lnspr4
> Cflags: -I${prefix}/include/nspr

The only thing I can think of is that pkg-config is erroneously removing 
the lib dir because it thinks it is on the default linker path.

If you set the PKG_CONFIG_ALLOW_SYSTEM_LIBS variable, what does 
`pkg-config --libs nspr` give then?

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
For additional commands, e-mail: dev-help@qpid.apache.org


Re: CMake improvements

Posted by Rob Godfrey <ro...@gmail.com>.
On 2 April 2013 12:01, Gordon Sim <gs...@redhat.com> wrote:

> On 04/02/2013 10:55 AM, Gordon Sim wrote:
>
>> On 04/02/2013 10:42 AM, Rob Godfrey wrote:
>>
>>> $ cat /usr/lib/x86_64-linux-gnu/**pkgconfig/nss.pc
>>> prefix=/usr
>>> exec_prefix=${prefix}
>>> libdir=${exec_prefix}/lib/x86_**64-linux-gnu
>>> includedir=${prefix}/include/**nss
>>>
>>> Name: NSS
>>> Description: Mozilla Network Security Services
>>> Version: 3.14.3
>>> Requires: nspr
>>> Libs: -L${libdir} -lnss3 -lnssutil3 -lsmime3 -lssl3
>>> Cflags: -I${includedir}
>>>
>>
> Sorry, one more annoying request! What does the nspr.pc contain?
>
>
>
$ cat /usr/lib/x86_64-linux-gnu/pkgconfig/nspr.pc
prefix=/usr
exec_prefix=${prefix}
libdir=/usr/lib/x86_64-linux-gnu
includedir=${prefix}/include/nspr

Name: NSPR
Description: The Netscape Portable Runtime
Version: 4.9.5
Libs: -L/usr/lib/x86_64-linux-gnu -lplds4 -lplc4 -lnspr4
Cflags: -I${prefix}/include/nspr


>
> ------------------------------**------------------------------**---------
> To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.**org<de...@qpid.apache.org>
> For additional commands, e-mail: dev-help@qpid.apache.org
>
>

Re: CMake improvements

Posted by Gordon Sim <gs...@redhat.com>.
On 04/02/2013 10:55 AM, Gordon Sim wrote:
> On 04/02/2013 10:42 AM, Rob Godfrey wrote:
>> $ cat /usr/lib/x86_64-linux-gnu/pkgconfig/nss.pc
>> prefix=/usr
>> exec_prefix=${prefix}
>> libdir=${exec_prefix}/lib/x86_64-linux-gnu
>> includedir=${prefix}/include/nss
>>
>> Name: NSS
>> Description: Mozilla Network Security Services
>> Version: 3.14.3
>> Requires: nspr
>> Libs: -L${libdir} -lnss3 -lnssutil3 -lsmime3 -lssl3
>> Cflags: -I${includedir}

Sorry, one more annoying request! What does the nspr.pc contain?


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
For additional commands, e-mail: dev-help@qpid.apache.org


Re: CMake improvements

Posted by Gordon Sim <gs...@redhat.com>.
On 04/02/2013 10:42 AM, Rob Godfrey wrote:
> $ cat /usr/lib/x86_64-linux-gnu/pkgconfig/nss.pc
> prefix=/usr
> exec_prefix=${prefix}
> libdir=${exec_prefix}/lib/x86_64-linux-gnu
> includedir=${prefix}/include/nss
>
> Name: NSS
> Description: Mozilla Network Security Services
> Version: 3.14.3
> Requires: nspr
> Libs: -L${libdir} -lnss3 -lnssutil3 -lsmime3 -lssl3
> Cflags: -I${includedir}

Hmmm... that looks right... so I wonder why `pkg-config --libs` did not 
emit -L/usr/lib/x86_64-linux-gnu, as my understanding would be that it 
should.

So the basic issue is that pkg-config isn't working as expected. The 
options are (a) to  figure out why and see if that can be fixed or (b) 
change the cmake to use the nss/nspr utilities rather than the generic 
pkgconf.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
For additional commands, e-mail: dev-help@qpid.apache.org


Re: CMake improvements

Posted by Rob Godfrey <ro...@gmail.com>.
$ cat /usr/lib/x86_64-linux-gnu/pkgconfig/nss.pc
prefix=/usr
exec_prefix=${prefix}
libdir=${exec_prefix}/lib/x86_64-linux-gnu
includedir=${prefix}/include/nss

Name: NSS
Description: Mozilla Network Security Services
Version: 3.14.3
Requires: nspr
Libs: -L${libdir} -lnss3 -lnssutil3 -lsmime3 -lssl3
Cflags: -I${includedir}


For info... I'd guess that this is the equivalent of the failing command
from the autotools build (where it succeeds):

g++  -fPIC -DPIC -shared -nostdlib
/usr/lib/gcc/x86_64-linux-gnu/4.6/../../../x86_64-linux-gnu/crti.o
/usr/lib/gcc/x86_64-linux-gnu/4.6/crtbeginS.o
qpid/sys/ssl/.libs/libsslcommon_la-check.o
qpid/sys/ssl/.libs/libsslcommon_la-util.o
qpid/sys/ssl/.libs/libsslcommon_la-SslSocket.o   -Wl,-rpath
-Wl,/home/rob/qpid-clean/cpp/src/.libs -lnss3 -lssl3 -lnspr4
./.libs/libqpidcommon.so -L/usr/lib/gcc/x86_64-linux-gnu/4.6
-L/usr/lib/gcc/x86_64-linux-gnu/4.6/../../../x86_64-linux-gnu
-L/usr/lib/gcc/x86_64-linux-gnu/4.6/../../../../lib -L/lib/x86_64-linux-gnu
-L/lib/../lib -L/usr/lib/x86_64-linux-gnu -L/usr/lib/../lib
-L/usr/lib/gcc/x86_64-linux-gnu/4.6/../../.. -lstdc++ -lm -lc -lgcc_s
/usr/lib/gcc/x86_64-linux-gnu/4.6/crtendS.o
/usr/lib/gcc/x86_64-linux-gnu/4.6/../../../x86_64-linux-gnu/crtn.o  -O2
-Wl,-soname -Wl,libsslcommon.so.2 -o .libs/libsslcommon.so.2.0.0


On 2 April 2013 11:25, Rob Godfrey <ro...@gmail.com> wrote:

> $ nss-config --libs ; nspr-config --libs
> -L/usr/lib/x86_64-linux-gnu -lssl3 -lsmime3 -lnss3 -lnssutil3
> -L/usr/lib/x86_64-linux-gnu -lplds4 -lplc4 -lnspr4 -lpthread -ldl
>
> As per the output the libraries are in /usr/lib/x86_64-linux-gnu
>
> -- Rob
>
>
> On 2 April 2013 11:24, Gordon Sim <gs...@redhat.com> wrote:
>
>> On 04/02/2013 10:22 AM, Gordon Sim wrote:
>>
>>> On 04/02/2013 09:52 AM, Rob Godfrey wrote:
>>>
>>>> $ pkg-config --cflags --libs nss
>>>> -I/usr/include/nss -I/usr/include/nspr  -lnss3 -lnssutil3 -lsmime3
>>>> -lssl3
>>>> -lplds4 -lplc4 -lnspr4
>>>>
>>>
>>> That is essentially the same as on my system. Are those libs
>>> (libnss3.so, libnssutil3.so etc) in /usr/lib or /usr/lib64?
>>>
>>
>> Also, what do `nss-config --libs` and `nspr-config --libs` show?
>>
>>
>>
>> ------------------------------**------------------------------**---------
>> To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.**org<de...@qpid.apache.org>
>> For additional commands, e-mail: dev-help@qpid.apache.org
>>
>>
>

Re: CMake improvements

Posted by Rob Godfrey <ro...@gmail.com>.
$ nss-config --libs ; nspr-config --libs
-L/usr/lib/x86_64-linux-gnu -lssl3 -lsmime3 -lnss3 -lnssutil3
-L/usr/lib/x86_64-linux-gnu -lplds4 -lplc4 -lnspr4 -lpthread -ldl

As per the output the libraries are in /usr/lib/x86_64-linux-gnu

-- Rob


On 2 April 2013 11:24, Gordon Sim <gs...@redhat.com> wrote:

> On 04/02/2013 10:22 AM, Gordon Sim wrote:
>
>> On 04/02/2013 09:52 AM, Rob Godfrey wrote:
>>
>>> $ pkg-config --cflags --libs nss
>>> -I/usr/include/nss -I/usr/include/nspr  -lnss3 -lnssutil3 -lsmime3 -lssl3
>>> -lplds4 -lplc4 -lnspr4
>>>
>>
>> That is essentially the same as on my system. Are those libs
>> (libnss3.so, libnssutil3.so etc) in /usr/lib or /usr/lib64?
>>
>
> Also, what do `nss-config --libs` and `nspr-config --libs` show?
>
>
>
> ------------------------------**------------------------------**---------
> To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.**org<de...@qpid.apache.org>
> For additional commands, e-mail: dev-help@qpid.apache.org
>
>

Re: CMake improvements

Posted by Gordon Sim <gs...@redhat.com>.
On 04/02/2013 10:22 AM, Gordon Sim wrote:
> On 04/02/2013 09:52 AM, Rob Godfrey wrote:
>> $ pkg-config --cflags --libs nss
>> -I/usr/include/nss -I/usr/include/nspr  -lnss3 -lnssutil3 -lsmime3 -lssl3
>> -lplds4 -lplc4 -lnspr4
>
> That is essentially the same as on my system. Are those libs
> (libnss3.so, libnssutil3.so etc) in /usr/lib or /usr/lib64?

Also, what do `nss-config --libs` and `nspr-config --libs` show?


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
For additional commands, e-mail: dev-help@qpid.apache.org


Re: CMake improvements

Posted by Gordon Sim <gs...@redhat.com>.
On 04/02/2013 09:52 AM, Rob Godfrey wrote:
> $ pkg-config --cflags --libs nss
> -I/usr/include/nss -I/usr/include/nspr  -lnss3 -lnssutil3 -lsmime3 -lssl3
> -lplds4 -lplc4 -lnspr4

That is essentially the same as on my system. Are those libs 
(libnss3.so, libnssutil3.so etc) in /usr/lib or /usr/lib64?



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
For additional commands, e-mail: dev-help@qpid.apache.org


Re: CMake improvements

Posted by Rob Godfrey <ro...@gmail.com>.
$ pkg-config --cflags --libs nss
-I/usr/include/nss -I/usr/include/nspr  -lnss3 -lnssutil3 -lsmime3 -lssl3
-lplds4 -lplc4 -lnspr4

-- Rob


On 2 April 2013 10:48, Gordon Sim <gs...@redhat.com> wrote:

> On 04/01/2013 09:37 PM, Rob Godfrey wrote:
>
>> So, it still fails to compile on Ubuntu if you have the libnss3-dev
>> package
>> installed.  The line in falls down on is doing the following:
>>
>> ~/qpid-clean/cpp/build/src$ /usr/bin/c++  -fPIC
>> -fvisibility-inlines-hidden -Werror -pedantic -Wall -Wextra -Wno-shadow
>> -Wpointer-arith -Wcast-qual -Wcast-align -Wno-long-long
>> -Wvolatile-register-var -Winvalid-pch -Wno-system-headers
>> -Woverloaded-virtual  -lnss3 -lnssutil3 -lsmime3 -lssl3 -lplds4 -lplc4
>> -lnspr4   -Wl,--no-undefined -pthread -shared
>> -Wl,-soname,libsslcommon.so.2.**0.0 -o libsslcommon.so.2.0.0
>> CMakeFiles/sslcommon.dir/qpid/**sys/ssl/check.o
>> CMakeFiles/sslcommon.dir/qpid/**sys/ssl/util.o
>> CMakeFiles/sslcommon.dir/qpid/**sys/ssl/SslSocket.o
>> libqpidcommon.so.2.0.0
>> libqpidtypes.so.1.0.0 -luuid -lboost_system-mt
>>
>> which results in..
>>
>> CMakeFiles/sslcommon.dir/qpid/**sys/ssl/check.o: In function
>> `qpid::sys::ssl::ErrorString::**ErrorString()':
>> check.cpp:(.text+0xd): undefined reference to `PR_GetError'
>> check.cpp:(.text+0x1a): undefined reference to `PR_GetErrorTextLength'
>> check.cpp:(.text+0x3f): undefined reference to `PR_GetErrorText'
>>
>> ... and a catalog of similar errors.
>>
>> I'm not a nss, cmake or C++ expert... Anyone want to hazard a guess as to
>> what is going on?  I'm assuming that when the equivalent package is
>> installed on a Fedora-like system it all works fine?
>>
>
> In the autoconf based build, the nspr-config & nss-config executables are
> used to determine the required include- and link- paths.
>
> The cmake build on the other hand uses pkg_check_modules which relies on
> pkg-config. If you run `pkg-config --cflags --libs nss`, what do you see?
>
>
> ------------------------------**------------------------------**---------
> To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.**org<de...@qpid.apache.org>
> For additional commands, e-mail: dev-help@qpid.apache.org
>
>

Re: CMake improvements

Posted by Gordon Sim <gs...@redhat.com>.
On 04/01/2013 09:37 PM, Rob Godfrey wrote:
> So, it still fails to compile on Ubuntu if you have the libnss3-dev package
> installed.  The line in falls down on is doing the following:
>
> ~/qpid-clean/cpp/build/src$ /usr/bin/c++  -fPIC
> -fvisibility-inlines-hidden -Werror -pedantic -Wall -Wextra -Wno-shadow
> -Wpointer-arith -Wcast-qual -Wcast-align -Wno-long-long
> -Wvolatile-register-var -Winvalid-pch -Wno-system-headers
> -Woverloaded-virtual  -lnss3 -lnssutil3 -lsmime3 -lssl3 -lplds4 -lplc4
> -lnspr4   -Wl,--no-undefined -pthread -shared
> -Wl,-soname,libsslcommon.so.2.0.0 -o libsslcommon.so.2.0.0
> CMakeFiles/sslcommon.dir/qpid/sys/ssl/check.o
> CMakeFiles/sslcommon.dir/qpid/sys/ssl/util.o
> CMakeFiles/sslcommon.dir/qpid/sys/ssl/SslSocket.o libqpidcommon.so.2.0.0
> libqpidtypes.so.1.0.0 -luuid -lboost_system-mt
>
> which results in..
>
> CMakeFiles/sslcommon.dir/qpid/sys/ssl/check.o: In function
> `qpid::sys::ssl::ErrorString::ErrorString()':
> check.cpp:(.text+0xd): undefined reference to `PR_GetError'
> check.cpp:(.text+0x1a): undefined reference to `PR_GetErrorTextLength'
> check.cpp:(.text+0x3f): undefined reference to `PR_GetErrorText'
>
> ... and a catalog of similar errors.
>
> I'm not a nss, cmake or C++ expert... Anyone want to hazard a guess as to
> what is going on?  I'm assuming that when the equivalent package is
> installed on a Fedora-like system it all works fine?

In the autoconf based build, the nspr-config & nss-config executables 
are used to determine the required include- and link- paths.

The cmake build on the other hand uses pkg_check_modules which relies on 
pkg-config. If you run `pkg-config --cflags --libs nss`, what do you see?

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
For additional commands, e-mail: dev-help@qpid.apache.org