Re: Failed to build Mesos module

2015-09-23 Thread Kapil Arya
On Wed, Sep 23, 2015 at 1:42 AM, zhiwei <zhiw...@gmail.com> wrote:

> Hi Kapil,
>
> I don't know how to contribute to modules project, but there are two
> issues:
>

One possibility is to simply create a pull request on github :-).


>
> My testing machine is Ubuntu 14.04 amd64.
>
> *1. Mesos lib64 dir*
>
> https://github.com/mesos/modules/blob/master/config ure.ac#L39
> <https://github.com/mesos/modules/blob/master/configure.ac#L39>
>
> MESOS_LDFLAGS="-L${mesos}/lib64 -lmesos -lglog -lprotobuf"
>
> Mesos installs the libraries(*.so) to $prefix/lib directory by default, not
> $prefix/lib64.
>

I guess we need to test for both $prefix/lib and $prefix/lib64 and choose
appropriately.


>
>
> *2. picojson.h header file*
>
> I workaround this issue to insert a line:
>
> https://github.com/mesos/modules/blob/master/configure.ac#L55
>
> if test -d "$mesos_build_dir"; then
> cp $mesos_build_dir/3rdparty/libprocess/3rdparty/picojson-*/picojson.h
> $mesos_build_dir/include
>

This wouldn't work if we didn't have mesos sources. A possibility is to
include the picojson header directly into the sources or add a submodule to
the repo that points to the picojson repo.


>
>
> Thanks.
>
> On Fri, Sep 18, 2015 at 2:15 PM, Qian AZ Zhang <zhang...@cn.ibm.com>
> wrote:
>
> > Hi Kapil,
> >
> > Any updates? :-)
> >
> > I have resolved that issue with a workaround by using the option
> > "--disable-java", like:
> > ../configure --with-glog=/usr --with-protobuf=/usr --with-boost=/usr
> > --disable-java
> > And then I did "make" and "make install" successfully.
> >
> > However, after I cloned the code from https://github.com/mesos/modules
> and
> > found an error to build it:
> > $ ../configure --with-mesos=/usr/local
> > checking for gcc... gcc
> > checking whether the C compiler works... yes
> > ...
> > checking for google/protobuf/message.h... yes
> > checking picojson.h usability... no
> > checking picojson.h presence... no
> > checking for picojson.h... no
> > configure: error: picojson is not installed.
> >
> > So it can not find picojson.h. And I checked the source code tree of
> > Mesos, and found picojson as a 3rd party lib are here:
> > mesos/3rdparty/libprocess/3rdparty/picojson-4f93734.tar.gz, maybe we
> should
> > put the picojson.h to /usr/local/include during "make install"?
> >
> >
> > Regards,
> > Qian Zhang
> >
> > [image: Inactive hide details for Kapil Arya ---09/18/2015
> 00:34:08---I'll
> > take a look shortly and will report back with the status. Ka]Kapil Arya
> > ---09/18/2015 00:34:08---I'll take a look shortly and will report back
> with
> > the status. Kapil
> >
> > From: Kapil Arya <ka...@mesosphere.io>
> > To: dev <dev@mesos.apache.org>
> > Date: 09/18/2015 00:34
> > Subject: Re: Failed to build Mesos module
> > --
> >
> >
> >
> > I'll take a look shortly and will report back with the status.
> >
> > Kapil
> >
> >
> > On Thu, Sep 17, 2015 at 10:56 AM, Qian AZ Zhang <zhang...@cn.ibm.com>
> > wrote:
> >
> > > Thanks Kapil.
> > >
> > > I am now following the steps in https://github.com/mesos/modules to
> > build
> > > my module, but it failed:
> > > stack@u1404u1:~/mesos/build$ ../configure --with-glog=/usr/local
> > > --with-protobuf=/usr/local --with-boost=/usr/local
> > > checking build system type... x86_64-unknown-linux-gnu
> > > checking host system type... x86_64-unknown-linux-gnu
> > > checking target system type... x86_64-unknown-linux-gnu
> > > ...
> > > checking for /usr/share/java/protobuf.jar... no
> > > configure: error: cannot find PROTOBUF_JAR=/usr/share/java/protobuf.jar
> > >
> > > And I have already installed protobuf, glog and boost libraries in my
> > > machine with the command:
> > > sudo apt-get install libprotobuf-dev libboost-dev libgoogle-glog-dev
> > >
> > > Can you please help? Thanks!
> > >
> > >
> > > Regards,
> > > Qian Zhang
> > >
> > > [image: Inactive hide details for Kapil Arya ---09/17/2015
> > > 21:50:55---Hello Qian, Please follow the instructions on
> > > https://github.com/]Kapil Arya ---09/17/2015 21:50:55---Hello Qian,
> > > Please follow the instructions on https://github.com/mesos/modules to
> > get
> > >
> 

Re: Failed to build Mesos module

2015-09-23 Thread zhiwei
Hi Kapil,

Thank you for your guide, I have created two pull requests on Github.

One is for using built-in picojson header file(git submodule), the other is
let the script to choose the library path.

https://github.com/mesos/modules/pull/6

https://github.com/mesos/modules/pull/7


Thanks.

On Wed, Sep 23, 2015 at 11:13 PM, Kapil Arya <ka...@mesosphere.io> wrote:

> On Wed, Sep 23, 2015 at 1:42 AM, zhiwei <zhiw...@gmail.com> wrote:
>
> > Hi Kapil,
> >
> > I don't know how to contribute to modules project, but there are two
> > issues:
> >
>
> One possibility is to simply create a pull request on github :-).
>
>
> >
> > My testing machine is Ubuntu 14.04 amd64.
> >
> > *1. Mesos lib64 dir*
> >
> > https://github.com/mesos/modules/blob/master/config ure.ac#L39
> > <https://github.com/mesos/modules/blob/master/configure.ac#L39>
> >
> > MESOS_LDFLAGS="-L${mesos}/lib64 -lmesos -lglog -lprotobuf"
> >
> > Mesos installs the libraries(*.so) to $prefix/lib directory by default,
> not
> > $prefix/lib64.
> >
>
> I guess we need to test for both $prefix/lib and $prefix/lib64 and choose
> appropriately.
>
>
> >
> >
> > *2. picojson.h header file*
> >
> > I workaround this issue to insert a line:
> >
> > https://github.com/mesos/modules/blob/master/configure.ac#L55
> >
> > if test -d "$mesos_build_dir"; then
> > cp $mesos_build_dir/3rdparty/libprocess/3rdparty/picojson-*/picojson.h
> > $mesos_build_dir/include
> >
>
> This wouldn't work if we didn't have mesos sources. A possibility is to
> include the picojson header directly into the sources or add a submodule to
> the repo that points to the picojson repo.
>
>
> >
> >
> > Thanks.
> >
> > On Fri, Sep 18, 2015 at 2:15 PM, Qian AZ Zhang <zhang...@cn.ibm.com>
> > wrote:
> >
> > > Hi Kapil,
> > >
> > > Any updates? :-)
> > >
> > > I have resolved that issue with a workaround by using the option
> > > "--disable-java", like:
> > > ../configure --with-glog=/usr --with-protobuf=/usr
> --with-boost=/usr
> > > --disable-java
> > > And then I did "make" and "make install" successfully.
> > >
> > > However, after I cloned the code from https://github.com/mesos/modules
> > and
> > > found an error to build it:
> > > $ ../configure --with-mesos=/usr/local
> > > checking for gcc... gcc
> > > checking whether the C compiler works... yes
> > > ...
> > > checking for google/protobuf/message.h... yes
> > > checking picojson.h usability... no
> > > checking picojson.h presence... no
> > > checking for picojson.h... no
> > > configure: error: picojson is not installed.
> > >
> > > So it can not find picojson.h. And I checked the source code tree of
> > > Mesos, and found picojson as a 3rd party lib are here:
> > > mesos/3rdparty/libprocess/3rdparty/picojson-4f93734.tar.gz, maybe we
> > should
> > > put the picojson.h to /usr/local/include during "make install"?
> > >
> > >
> > > Regards,
> > > Qian Zhang
> > >
> > > [image: Inactive hide details for Kapil Arya ---09/18/2015
> > 00:34:08---I'll
> > > take a look shortly and will report back with the status. Ka]Kapil Arya
> > > ---09/18/2015 00:34:08---I'll take a look shortly and will report back
> > with
> > > the status. Kapil
> > >
> > > From: Kapil Arya <ka...@mesosphere.io>
> > > To: dev <dev@mesos.apache.org>
> > > Date: 09/18/2015 00:34
> > > Subject: Re: Failed to build Mesos module
> > > --
> > >
> > >
> > >
> > > I'll take a look shortly and will report back with the status.
> > >
> > > Kapil
> > >
> > >
> > > On Thu, Sep 17, 2015 at 10:56 AM, Qian AZ Zhang <zhang...@cn.ibm.com>
> > > wrote:
> > >
> > > > Thanks Kapil.
> > > >
> > > > I am now following the steps in https://github.com/mesos/modules to
> > > build
> > > > my module, but it failed:
> > > > stack@u1404u1:~/mesos/build$ ../configure --with-glog=/usr/local
> > > > --with-protobuf=/usr/local --with-boost=/usr/local
> > > > checking build system type... x86_64-unknown-linux-gnu
> > > > checking host system type... x86_64-unknown-linux-g

Re: Failed to build Mesos module

2015-09-22 Thread zhiwei
Hi Kapil,

I don't know how to contribute to modules project, but there are two issues:

My testing machine is Ubuntu 14.04 amd64.

*1. Mesos lib64 dir*

https://github.com/mesos/modules/blob/master/configure.ac#L39

MESOS_LDFLAGS="-L${mesos}/lib64 -lmesos -lglog -lprotobuf"

Mesos installs the libraries(*.so) to $prefix/lib directory by default, not
$prefix/lib64.


*2. picojson.h header file*

I workaround this issue to insert a line:

https://github.com/mesos/modules/blob/master/configure.ac#L55

if test -d "$mesos_build_dir"; then
cp $mesos_build_dir/3rdparty/libprocess/3rdparty/picojson-*/picojson.h
$mesos_build_dir/include


Thanks.

On Fri, Sep 18, 2015 at 2:15 PM, Qian AZ Zhang <zhang...@cn.ibm.com> wrote:

> Hi Kapil,
>
> Any updates? :-)
>
> I have resolved that issue with a workaround by using the option
> "--disable-java", like:
> ../configure --with-glog=/usr --with-protobuf=/usr --with-boost=/usr
> --disable-java
> And then I did "make" and "make install" successfully.
>
> However, after I cloned the code from https://github.com/mesos/modules and
> found an error to build it:
> $ ../configure --with-mesos=/usr/local
> checking for gcc... gcc
> checking whether the C compiler works... yes
> ...
> checking for google/protobuf/message.h... yes
> checking picojson.h usability... no
> checking picojson.h presence... no
> checking for picojson.h... no
> configure: error: picojson is not installed.
>
> So it can not find picojson.h. And I checked the source code tree of
> Mesos, and found picojson as a 3rd party lib are here:
> mesos/3rdparty/libprocess/3rdparty/picojson-4f93734.tar.gz, maybe we should
> put the picojson.h to /usr/local/include during "make install"?
>
>
> Regards,
> Qian Zhang
>
> [image: Inactive hide details for Kapil Arya ---09/18/2015 00:34:08---I'll
> take a look shortly and will report back with the status. Ka]Kapil Arya
> ---09/18/2015 00:34:08---I'll take a look shortly and will report back with
> the status. Kapil
>
> From: Kapil Arya <ka...@mesosphere.io>
> To: dev <dev@mesos.apache.org>
> Date: 09/18/2015 00:34
> Subject: Re: Failed to build Mesos module
> --
>
>
>
> I'll take a look shortly and will report back with the status.
>
> Kapil
>
>
> On Thu, Sep 17, 2015 at 10:56 AM, Qian AZ Zhang <zhang...@cn.ibm.com>
> wrote:
>
> > Thanks Kapil.
> >
> > I am now following the steps in https://github.com/mesos/modules to
> build
> > my module, but it failed:
> > stack@u1404u1:~/mesos/build$ ../configure --with-glog=/usr/local
> > --with-protobuf=/usr/local --with-boost=/usr/local
> > checking build system type... x86_64-unknown-linux-gnu
> > checking host system type... x86_64-unknown-linux-gnu
> > checking target system type... x86_64-unknown-linux-gnu
> > ...
> > checking for /usr/share/java/protobuf.jar... no
> > configure: error: cannot find PROTOBUF_JAR=/usr/share/java/protobuf.jar
> >
> > And I have already installed protobuf, glog and boost libraries in my
> > machine with the command:
> > sudo apt-get install libprotobuf-dev libboost-dev libgoogle-glog-dev
> >
> > Can you please help? Thanks!
> >
> >
> > Regards,
> > Qian Zhang
> >
> > [image: Inactive hide details for Kapil Arya ---09/17/2015
> > 21:50:55---Hello Qian, Please follow the instructions on
> > https://github.com/]Kapil Arya ---09/17/2015 21:50:55---Hello Qian,
> > Please follow the instructions on https://github.com/mesos/modules to
> get
> >
> > From: Kapil Arya <ka...@mesosphere.io>
> > To: dev <dev@mesos.apache.org>
> > Date: 09/17/2015 21:50
> > Subject: Re: Failed to build Mesos module
> > --
> >
> >
> >
> > Hello Qian,
> >
> > Please follow the instructions on https://github.com/mesos/modules to
> get
> > up and running with building a mesos module. Apparently, building mesos
> > modules requires you to build Mesos without bundled protobuf, glog and
> > boost libraries. Thus, you need to have them installed system wide. The
> > above repo has a readme and a few test modules that you can play with.
> >
> > Please let us know if you need any more help.
> >
> > Kapil
> >
> > On Thu, Sep 17, 2015 at 9:20 AM, Qian AZ Zhang <zhang...@cn.ibm.com>
> > wrote:
> >
> > >
> > >
> > > Hi all,
> > >
> > > I am trying to follow the doc (
> > >
> > >
> >
> https://github.com/apache/

Re: Failed to build Mesos module

2015-09-18 Thread Qian AZ Zhang

Hi Kapil,

Any updates? :-)

I have resolved that issue with a workaround by using the option
"--disable-java", like:
../configure --with-glog=/usr --with-protobuf=/usr --with-boost=/usr
--disable-java
And then I did "make" and "make install" successfully.

However, after I cloned the code from https://github.com/mesos/modules and
found an error to build it:
$ ../configure --with-mesos=/usr/local
checking for gcc... gcc
checking whether the C compiler works... yes
...
checking for google/protobuf/message.h... yes
checking picojson.h usability... no
checking picojson.h presence... no
checking for picojson.h... no
configure: error: picojson is not installed.

So it can not find picojson.h. And I checked the source code tree of Mesos,
and found picojson as a 3rd party lib are here:
mesos/3rdparty/libprocess/3rdparty/picojson-4f93734.tar.gz, maybe we should
put the picojson.h to /usr/local/include during "make install"?


Regards,
Qian Zhang



From:   Kapil Arya <ka...@mesosphere.io>
To: dev <dev@mesos.apache.org>
Date:   09/18/2015 00:34
Subject:Re: Failed to build Mesos module



I'll take a look shortly and will report back with the status.

Kapil


On Thu, Sep 17, 2015 at 10:56 AM, Qian AZ Zhang <zhang...@cn.ibm.com>
wrote:

> Thanks Kapil.
>
> I am now following the steps in https://github.com/mesos/modules to build
> my module, but it failed:
> stack@u1404u1:~/mesos/build$ ../configure --with-glog=/usr/local
> --with-protobuf=/usr/local --with-boost=/usr/local
> checking build system type... x86_64-unknown-linux-gnu
> checking host system type... x86_64-unknown-linux-gnu
> checking target system type... x86_64-unknown-linux-gnu
> ...
> checking for /usr/share/java/protobuf.jar... no
> configure: error: cannot find PROTOBUF_JAR=/usr/share/java/protobuf.jar
>
> And I have already installed protobuf, glog and boost libraries in my
> machine with the command:
> sudo apt-get install libprotobuf-dev libboost-dev libgoogle-glog-dev
>
> Can you please help? Thanks!
>
>
> Regards,
> Qian Zhang
>
> [image: Inactive hide details for Kapil Arya ---09/17/2015
> 21:50:55---Hello Qian, Please follow the instructions on
> https://github.com/]Kapil Arya ---09/17/2015 21:50:55---Hello Qian,
> Please follow the instructions on https://github.com/mesos/modules to get
>
> From: Kapil Arya <ka...@mesosphere.io>
> To: dev <dev@mesos.apache.org>
> Date: 09/17/2015 21:50
> Subject: Re: Failed to build Mesos module
> --
>
>
>
> Hello Qian,
>
> Please follow the instructions on https://github.com/mesos/modules to get
> up and running with building a mesos module. Apparently, building mesos
> modules requires you to build Mesos without bundled protobuf, glog and
> boost libraries. Thus, you need to have them installed system wide. The
> above repo has a readme and a few test modules that you can play with.
>
> Please let us know if you need any more help.
>
> Kapil
>
> On Thu, Sep 17, 2015 at 9:20 AM, Qian AZ Zhang <zhang...@cn.ibm.com>
> wrote:
>
> >
> >
> > Hi all,
> >
> > I am trying to follow the doc (
> >
> >
>
https://github.com/apache/mesos/blob/master/docs/modules.md#writing-mesos-modules

> > ) to implement a test module, but when I built the module, I got the
> > following error:
> > user1@test1:~/mesos/src/examples$ g++ -lmesos -fpic -o
test_module.o
> > test_module.cpp
> > In file included from /usr/local/include/mesos/mesos.hpp:22:0,
> >  from test_module.hpp:22,
> >  from test_module.cpp:2:
> > /usr/local/include/mesos/mesos.pb.h:9:42: fatal error:
> > google/protobuf/stubs/common.h: No such file or directory
> >  #include 
> > ^
> > compilation terminated.
> >
> > It seems it can not find the header file:
> google/protobuf/stubs/common.h. I
> > see this header file is in the Mesos source code tree, but not in
> > /usr/local/include/mesos ( I have done "make install" after building
> Mesos
> > source code).
> >
> > Any help will be appreciated, thanks!
> >
> >
> > Regards,
> > Qian Zhang
>
>


Re: Failed to build Mesos module

2015-09-17 Thread Qian AZ Zhang

Thanks Kapil.

I am now following the steps in https://github.com/mesos/modules to build
my module, but it failed:
stack@u1404u1:~/mesos/build$ ../configure --with-glog=/usr/local
--with-protobuf=/usr/local --with-boost=/usr/local
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
...
checking for /usr/share/java/protobuf.jar... no
configure: error: cannot find PROTOBUF_JAR=/usr/share/java/protobuf.jar

And I have already installed protobuf, glog and boost libraries in my
machine with the command:
sudo apt-get install libprotobuf-dev libboost-dev libgoogle-glog-dev

Can you please help? Thanks!


Regards,
Qian Zhang



From:   Kapil Arya <ka...@mesosphere.io>
To: dev <dev@mesos.apache.org>
Date:   09/17/2015 21:50
Subject:    Re: Failed to build Mesos module



Hello Qian,

Please follow the instructions on https://github.com/mesos/modules to get
up and running with building a mesos module. Apparently, building mesos
modules requires you to build Mesos without bundled protobuf, glog and
boost libraries. Thus, you need to have them installed system wide. The
above repo has a readme and a few test modules that you can play with.

Please let us know if you need any more help.

Kapil

On Thu, Sep 17, 2015 at 9:20 AM, Qian AZ Zhang <zhang...@cn.ibm.com> wrote:

>
>
> Hi all,
>
> I am trying to follow the doc (
>
>
https://github.com/apache/mesos/blob/master/docs/modules.md#writing-mesos-modules

> ) to implement a test module, but when I built the module, I got the
> following error:
> user1@test1:~/mesos/src/examples$ g++ -lmesos -fpic -o test_module.o
> test_module.cpp
> In file included from /usr/local/include/mesos/mesos.hpp:22:0,
>  from test_module.hpp:22,
>  from test_module.cpp:2:
> /usr/local/include/mesos/mesos.pb.h:9:42: fatal error:
> google/protobuf/stubs/common.h: No such file or directory
>  #include 
> ^
> compilation terminated.
>
> It seems it can not find the header file: google/protobuf/stubs/common.h.
I
> see this header file is in the Mesos source code tree, but not in
> /usr/local/include/mesos ( I have done "make install" after building
Mesos
> source code).
>
> Any help will be appreciated, thanks!
>
>
> Regards,
> Qian Zhang


Re: Failed to build Mesos module

2015-09-17 Thread Kapil Arya
Hello Qian,

Please follow the instructions on https://github.com/mesos/modules to get
up and running with building a mesos module. Apparently, building mesos
modules requires you to build Mesos without bundled protobuf, glog and
boost libraries. Thus, you need to have them installed system wide. The
above repo has a readme and a few test modules that you can play with.

Please let us know if you need any more help.

Kapil

On Thu, Sep 17, 2015 at 9:20 AM, Qian AZ Zhang  wrote:

>
>
> Hi all,
>
> I am trying to follow the doc (
>
> https://github.com/apache/mesos/blob/master/docs/modules.md#writing-mesos-modules
> ) to implement a test module, but when I built the module, I got the
> following error:
> user1@test1:~/mesos/src/examples$ g++ -lmesos -fpic -o test_module.o
> test_module.cpp
> In file included from /usr/local/include/mesos/mesos.hpp:22:0,
>  from test_module.hpp:22,
>  from test_module.cpp:2:
> /usr/local/include/mesos/mesos.pb.h:9:42: fatal error:
> google/protobuf/stubs/common.h: No such file or directory
>  #include 
> ^
> compilation terminated.
>
> It seems it can not find the header file: google/protobuf/stubs/common.h. I
> see this header file is in the Mesos source code tree, but not in
> /usr/local/include/mesos ( I have done "make install" after building Mesos
> source code).
>
> Any help will be appreciated, thanks!
>
>
> Regards,
> Qian Zhang


Re: Failed to build Mesos module

2015-09-17 Thread Kamil Chmielewski
Hi,

we had problems with building it recently.
See https://github.com/mesos/modules/pull/4

Regards,
Kamil

2015-09-17 15:49 GMT+02:00 Kapil Arya :

> Hello Qian,
>
> Please follow the instructions on https://github.com/mesos/modules to get
> up and running with building a mesos module. Apparently, building mesos
> modules requires you to build Mesos without bundled protobuf, glog and
> boost libraries. Thus, you need to have them installed system wide. The
> above repo has a readme and a few test modules that you can play with.
>
> Please let us know if you need any more help.
>
> Kapil
>
> On Thu, Sep 17, 2015 at 9:20 AM, Qian AZ Zhang 
> wrote:
>
> >
> >
> > Hi all,
> >
> > I am trying to follow the doc (
> >
> >
> https://github.com/apache/mesos/blob/master/docs/modules.md#writing-mesos-modules
> > ) to implement a test module, but when I built the module, I got the
> > following error:
> > user1@test1:~/mesos/src/examples$ g++ -lmesos -fpic -o test_module.o
> > test_module.cpp
> > In file included from /usr/local/include/mesos/mesos.hpp:22:0,
> >  from test_module.hpp:22,
> >  from test_module.cpp:2:
> > /usr/local/include/mesos/mesos.pb.h:9:42: fatal error:
> > google/protobuf/stubs/common.h: No such file or directory
> >  #include 
> > ^
> > compilation terminated.
> >
> > It seems it can not find the header file:
> google/protobuf/stubs/common.h. I
> > see this header file is in the Mesos source code tree, but not in
> > /usr/local/include/mesos ( I have done "make install" after building
> Mesos
> > source code).
> >
> > Any help will be appreciated, thanks!
> >
> >
> > Regards,
> > Qian Zhang
>


Failed to build Mesos module

2015-09-17 Thread Qian AZ Zhang


Hi all,

I am trying to follow the doc (
https://github.com/apache/mesos/blob/master/docs/modules.md#writing-mesos-modules
) to implement a test module, but when I built the module, I got the
following error:
user1@test1:~/mesos/src/examples$ g++ -lmesos -fpic -o test_module.o
test_module.cpp
In file included from /usr/local/include/mesos/mesos.hpp:22:0,
 from test_module.hpp:22,
 from test_module.cpp:2:
/usr/local/include/mesos/mesos.pb.h:9:42: fatal error:
google/protobuf/stubs/common.h: No such file or directory
 #include 
^
compilation terminated.

It seems it can not find the header file: google/protobuf/stubs/common.h. I
see this header file is in the Mesos source code tree, but not in
/usr/local/include/mesos ( I have done "make install" after building Mesos
source code).

Any help will be appreciated, thanks!


Regards,
Qian Zhang