Re: My experience building proton v0.6 statically

2014-01-21 Thread Andrew Stitcher
On Tue, 2014-01-21 at 13:29 -0500, Shearer, Davin wrote: > ... > ​Note the CMAKE_CXX_FLAGS definition. Why not support the same for the C > flags in proton? I think that might be a stock Cmake thing. > Meanwhile, I'll add CC="$CC -fPIC" to the build script and remove it from > the patch. > > Ye

Re: My experience building proton v0.6 statically

2014-01-21 Thread Andrew Stitcher
On Tue, 2014-01-21 at 12:11 -0500, Shearer, Davin wrote: > > Ok, I see your need now - clearly this sort of use will remain a patch > > you will need to apply by yourself (although the facility to make a > > correct non PIC static library will be generally useful). > > > > > If we support a static

Re: My experience building proton v0.6 statically

2014-01-21 Thread Shearer, Davin
Believe me, I tried several different ways of adding the flags without resorting to the "nuclear" option of patching the build. IMHO, the most kosher way would be to support something like -DCMAKE_C_FLAGS:STRING="-fPIC -DPIC". I didn't try defining CC with the flag there. That seems a little gro

Re: My experience building proton v0.6 statically

2014-01-21 Thread Shearer, Davin
> Ok, I see your need now - clearly this sort of use will remain a patch > you will need to apply by yourself (although the facility to make a > correct non PIC static library will be generally useful). > > If we support a static proton build, at least provide an option for PIC, like some auto{conf

Re: My experience building proton v0.6 statically

2014-01-21 Thread Andrew Stitcher
On Tue, 2014-01-21 at 10:28 -0500, Shearer, Davin wrote: > Rereading my message, I think I can see the confusion. Modules (and > possibly other dynamic libraries) will be linking against this static > library. > > Here's more background for the PIC: > > Proton is needed to provide the AMQP 1.0 s

Re: My experience building proton v0.6 statically

2014-01-21 Thread Shearer, Davin
Rereading my message, I think I can see the confusion. Modules (and possibly other dynamic libraries) will be linking against this static library. Here's more background for the PIC: Proton is needed to provide the AMQP 1.0 support in Qpid. Qpid provides this support via the amqp.so module. Th

Re: My experience building proton v0.6 statically

2014-01-21 Thread Shearer, Davin
Hi Andrew, thanks for your reply! The PIC is because proton will be linked against amqp.so in qpid, which is a module (dynamic) that will be linked against this static library, therefore the PIC is required. Could I have worded that better? On Tue, Jan 21, 2014 at 9:57 AM, Andrew Stitcher wrote

Re: My experience building proton v0.6 statically

2014-01-21 Thread Andrew Stitcher
On Mon, 2014-01-20 at 12:09 -0500, Shearer, Davin wrote: > I would like to share my experience with building proton version 0.6 as a > static library. > ... > and since we'll want to support linking this against > modules and/or dynamic libraries, we want to build using > position-independent code

My experience building proton v0.6 statically

2014-01-20 Thread Shearer, Davin
I would like to share my experience with building proton version 0.6 as a static library. First create a directory somewhere sensible to put the code and do the build. I put mine in $HOME/external/proton. Lets call that BUILD_HOME. Unarchive the proton v0.6 source code into that directory. expo