Re: [GitHub] rdhabalia commented on a change in pull request #514: Static link dependency libraries for C++ client lib and Python wrapper

2017-07-10 Thread Matteo Merli
Hi Dave,

So far, we have never released a binary package for C++ client library, and
I still think we shouldn't, because it gets really complicated to have
binaries working for multiple OSs.

We don't have any binaries in the repo and this is more about the flags we
use to compile the C++ client lib.

If we link the pulsar shared library (libpulsar.so) against static
libraries (eg: liblog4cxx.a instead of liblog4cxx.so), that the
libpulsar.so will be self-contained. At that point, someone can just
package libpulsar.so without having to worry about the dependencies. This
is especially important for Python wrapper, since by statically linking we
can just create a Python wheel file that contains the wrapper and the c++
client lib with all the dependencies in a single shared package.

After the discussion with Andrews, I'll make the change in the PR so
enable/disable the static linking based on a flag in the CMake script.

Matteo

--
Matteo Merli


On Thu, Jul 6, 2017 at 8:03 AM, Dave Fisher  wrote:

> Hi -
>
> Is liblog4cxx.a a binary in the repository? What is the provenance of this
> file?
>
> Regards,
> Dave
>
> > On Jul 5, 2017, at 10:03 PM, Matteo Merli 
> wrote:
> >
> > On Wed, Jul 5, 2017 at 1:56 PM,  wrote:
> >
> >> rdhabalia commented on a change in pull request #514: Static link
> >> dependency libraries for C++ client lib and Python wrapper
> >> URL: https://github.com/apache/incubator-pulsar/pull/514#discussi
> >> on_r125755406
> >>
> >> +find_library(LOG4CXX_LIBRARY_PATH NAMES liblog4cxx.a)
> >>
> >> Review comment:
> >>   `liblog4cxx.a` is this correct?
> >>
> >
> >
> > ( I don't know why this comment doesn't appear on the github PR page)
> >
> > liblog4cxx.a is to force cmake to link against the static library (that
> > allows to remove the dependency on log4cxx, since it's like bundling the
> > library inside libpulsar.so)
>
>


Re: [GitHub] rdhabalia commented on a change in pull request #514: Static link dependency libraries for C++ client lib and Python wrapper

2017-07-06 Thread Dave Fisher
Hi -

Is liblog4cxx.a a binary in the repository? What is the provenance of this file?

Regards,
Dave

> On Jul 5, 2017, at 10:03 PM, Matteo Merli  wrote:
> 
> On Wed, Jul 5, 2017 at 1:56 PM,  wrote:
> 
>> rdhabalia commented on a change in pull request #514: Static link
>> dependency libraries for C++ client lib and Python wrapper
>> URL: https://github.com/apache/incubator-pulsar/pull/514#discussi
>> on_r125755406
>> 
>> +find_library(LOG4CXX_LIBRARY_PATH NAMES liblog4cxx.a)
>> 
>> Review comment:
>>   `liblog4cxx.a` is this correct?
>> 
> 
> 
> ( I don't know why this comment doesn't appear on the github PR page)
> 
> liblog4cxx.a is to force cmake to link against the static library (that
> allows to remove the dependency on log4cxx, since it's like bundling the
> library inside libpulsar.so)



signature.asc
Description: Message signed with OpenPGP


Re: [GitHub] rdhabalia commented on a change in pull request #514: Static link dependency libraries for C++ client lib and Python wrapper

2017-07-05 Thread Matteo Merli
On Wed, Jul 5, 2017 at 1:56 PM,  wrote:

> rdhabalia commented on a change in pull request #514: Static link
> dependency libraries for C++ client lib and Python wrapper
> URL: https://github.com/apache/incubator-pulsar/pull/514#discussi
> on_r125755406
>
> +find_library(LOG4CXX_LIBRARY_PATH NAMES liblog4cxx.a)
>
>  Review comment:
>`liblog4cxx.a` is this correct?
>


( I don't know why this comment doesn't appear on the github PR page)

liblog4cxx.a is to force cmake to link against the static library (that
allows to remove the dependency on log4cxx, since it's like bundling the
library inside libpulsar.so)