inline 

----- Original Message -----

> From: "Alexander Gallego" <gallego.al...@gmail.com>
> To: user@mesos.apache.org
> Sent: Thursday, June 19, 2014 1:49:44 PM
> Subject: Re: Difficulties building libmesos.so

> Hi Tim,

> Thanks for the reply and apologies for the late response - gmail filter was
> pretty aggressive.

> At the moment I have a less than Ideal setup - a hack -, but the work around
> is to essentially remove libproto, libzookeeper from my libs when linking
> against libmesos

> Given that we happen to run the same version, is just a plain coincidence. It
> would be great if libmesos can build as a normal dynamic lib as opposed to a
> statically linked library. This gives me greater flexibility to provide for
> example - patched versions of a protobuf or zookeepr libs etc.

You might want to track: https://issues.apache.org/jira/browse/MESOS-1071 
I'll try to button up the protobuf patch tomorrow. 
https://issues.apache.org/jira/browse/MESOS-1174 

> Thanks!

> Sincerely,
> Alexander Gallego

> ---*---
> ------*
> * * *

> On Mon, Jun 16, 2014 at 4:49 PM, Tim St Clair < tstcl...@redhat.com > wrote:

> > Greetings Alexandar -
> 

> > My apologies for my delayed response, I've been inundated as of late.
> 

> > ./configure --disable-bundled
> 

> > is the easiest option if you have a system installed version of the
> > libraries, but it doesn't yet handle protobuf.
> 

> > I'm not entirely certain where ubuntu is @ with regard to the full
> > dep-graph,
> > but it is available in fedora channels.
> 

> > You could also try https://github.com/timothysc/mesos/tree/0.18-integ if
> > you're willing to live behind the times for a bit.
> 

> > I'm going to make a hard push to get --disable-bundled fully completed
> > prior
> > to a 1.0 release/MesosCon.
> 

> > Cheers,
> 
> > Tim
> 

> > > From: "Alexander Gallego" < gallego.al...@gmail.com >
> > 
> 
> > > To: user@mesos.apache.org
> > 
> 
> > > Sent: Sunday, June 8, 2014 12:55:56 AM
> > 
> 
> > > Subject: Difficulties building libmesos.so
> > 
> 

> > > I'm having a hard time attempting to use libmesos.so and hoping for
> > > guidance.
> > 
> 

> > > Issue:
> > 
> 

> > > Libmesos.so as installed by the mesosphere .deb pkg or built from source
> > 
> 
> > > statically links all sources including:
> > 
> 

> > > 1. Protobuf (2.5)
> > 
> 
> > > 2. Zookeeper (3.4.5)
> > 
> 

> > > This is a problem because when you start any int main(args, char**) it is
> > 
> 
> > > suggested by the protobuf to initialize it for proper behavior. (check
> > > versions)
> > 
> 

> > > Here is the snippet from source:
> > 
> 

> > > build/include/google/protobuf/stubs/common.h
> > 
> 
> > > 149:#define GOOGLE_PROTOBUF_VERIFY_VERSION
> > 
> 
> > > // Place this macro in your main() function (or somewhere before you
> > > attempt
> > 
> 
> > > // to use the protobuf library) to verify that the version you link
> > > against
> > 
> 
> > > // matches the headers you compiled against. If a version mismatch is
> > 
> 
> > > // detected, the process will abort.
> > 
> 
> > > #define GOOGLE_PROTOBUF_VERIFY_VERSION \
> > 
> 
> > > ::google::protobuf::internal::VerifyVersion( \
> > 
> 
> > > GOOGLE_PROTOBUF_VERSION, GOOGLE_PROTOBUF_MIN_LIBRARY_VERSION, \
> > 
> 
> > > __FILE__)
> > 
> 

> > > To deinitialize the library you are suggested you call 'shutdown'
> > 
> 

> > > build/include/google/protobuf/stubs/common.cc
> > 
> 
> > > void ShutdownProtobufLibrary() {
> > 
> 
> > > internal::InitShutdownFunctionsOnce();
> > 
> 
> > > // ... stuff
> > 
> 
> > > }
> > 
> 

> > > Well the issue is that when linking w/ libmesos (the static fat lib 298MB
> > > as
> > > of rc3)
> > 
> 
> > > my protobufs now double free :(
> > 
> 

> > > I haven't yet been able to play w/ zookeeper and its internal state as it
> > > interacts w/
> > 
> 
> > > libmesos.so. The issue is fundamentally static state (ugh). But I have to
> > > use
> > 
> 
> > > these libs (zookeeper, protobuf) for a project.
> > 
> 

> > > The tentative solution suggested (mesos/docs/ configuration.md ) is
> > 
> 
> > > to use the compile time flags --with-zookeeper=/path/to/root/not/src/c
> > 
> 
> > > *this is where i'd like guidance*
> > 
> 

> > > I have not been able to compile libmesos as a lib without statically
> > > linking
> > > all the deps
> > 
> 

> > > Note: I have read the mainling list post describing why the build system
> > > was
> > > originally
> > 
> 
> > > set up this way (mainly that there are patches -- look at the .patch
> > > files)
> > 
> 

> > > Things I've done to try and build libmesos.so without statically linking
> > > protobufs, boost, zookeeper:
> > 
> 

> > > Here are the command line args passing to configure:
> > 
> 

> > > // assume TLD=/absolute/path/to/libs
> > 
> 

> > > ./configure --enable-shared=yes \
> > 
> 
> > > --enable-bundled=no \
> > 
> 
> > > --disable-python \
> > 
> 
> > > --with-zookeeper="${TLD}/zookeeper" \
> > 
> 
> > > --with-leveldb="${TLD}/leveldb"
> > 
> 

> > > The first problem is that passing just -with-leveldb= to the dir w/
> > > leveldb
> > > for example
> > 
> 
> > > doesn't find the -lleveldb.
> > 
> 

> > > I tried looking at the make file and the paths seem correct mainly:
> > 
> 

> > > Lines 129 & 130 (I guess this might change from system to system)
> > 
> 
> > > am__append_2 = $(LEVELDB)/libleveldb.a
> > 
> 
> > > am__append_3 = $(ZOOKEEPER)/src/c/ libzookeeper_mt.la
> > 
> 

> > > Notes about my desktop system:
> > 
> 

> > > Using gcc 4.8
> > 
> 
> > > $ lsb_release -a
> > 
> 
> > > Distributor ID: Ubuntu
> > 
> 
> > > Description: Ubuntu 14.04 LTS
> > 
> 
> > > Release: 14.04
> > 
> 
> > > Codename: trusty
> > 
> 

> > > The questions i'm looking to get some pointers are:
> > 
> 

> > > * Has anyone actually built a shared libmesos.so without included
> > > dependencies, if so, how.
> > 
> 

> > > * Is there a pre-build binaries (lib mesos w/out deps) for linux x86_64
> > > systems avail for download
> > 
> 
> > > perhaps the mesosphere guys have some solution here.
> > 
> 

> > > * How have other people building native apps (c++) linked and used
> > > libmesos.so in their projects
> > 
> 
> > > successfully? (either remove their versions of the lib and be forced to
> > > use
> > > libmesos.so or ...?)
> > 
> 

> > > Kindly let me know if I can provide clarification.
> > 
> 

> > > Thanks in advance for reading.
> > 
> 
> > > -Alex
> > 
> 

> > > Sincerely,
> > 
> 
> > > Alexander Gallego
> > 
> 

> > > ---*---
> > 
> 
> > > ------*
> > 
> 
> > > * * *
> > 
> 

> > --
> 
> > Cheers,
> 
> > Tim
> 
> > Freedom, Features, Friends, First -> Fedora
> 
> > https://fedoraproject.org/wiki/SIGs/bigdata
> 

-- 
Cheers, 
Tim 
Freedom, Features, Friends, First -> Fedora 
https://fedoraproject.org/wiki/SIGs/bigdata 

Reply via email to