mesos-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alex Rukletsov <a...@mesosphere.com>
Subject Re: Introducing a CMake-based build system for Mesos
Date Wed, 30 Sep 2015 08:31:12 GMT
Can we extend a pre-commit hook in a way that it's not allowed to modify
makefile.am without touching CMakeLists and that any new file should
trigger touching CMakeLists? I think this can be part of reveiw r/38827.

On Tue, Sep 29, 2015 at 6:46 PM, Alex Clemmer <clemmer.alexander@gmail.com>
wrote:

> Just as an update, we have expanded support for building the agent,
> and there is a review up[1] to support a large part of the master.
>
> The work is still anchored to the Windows work, so we expect the rest
> of the CMake solution to materialize sporadically until the
> November/December timeframe. In the mean time, I will be haunting all
> your reviews, asking you to make your makefile.am/configure changes in
> CMakeLists files also. :) (For more complicated changes, I will even
> attempt to help you write the code myself!)
>
> In the meantime, if you have the time, it would be great to have more
> people try it on their favorite platform. We've tried it on Windows
> 10, OS X 10.10, Ubuntu 14.04, and Ubuntu 15.04.
>
> [1] https://reviews.apache.org/r/38827/
>
> On Mon, Aug 10, 2015 at 12:13 PM, Alex Clemmer
> <clemmer.alexander@gmail.com> wrote:
> > [... weeks later ...]
> >
> > Alex, I think that's a great idea, actually! The module you have
> > implemented is not a bad start. I've put it in a JIRA ticket so I
> > don't lose track of it[1].
> >
> > Also, just so we're clear: I'm not an expert at CMake. I wish I were,
> > it would have made this whole thing much easier.
> >
> > [1] https://issues.apache.org/jira/browse/MESOS-3249
> >
> > On Wed, Jul 29, 2015 at 2:31 AM, Alex Rukletsov <alex@mesosphere.com>
> wrote:
> >> One related thing I have started to work on but have never polished is
> >> FindMesos CMake script. The prototype lives here:
> >>
> https://github.com/rukletsov/mesos-modules/blob/master/cmake-modules/FindMesos.cmake
> >>
> >> My original idea was to support not only system Mesos, but also custom
> >> builds, so that writers of Mesos Modules can use the script as well.
> >>
> >> Alex, as CMake expert, let me know what you think!
> >>
> >> On Mon, Jul 27, 2015 at 7:48 PM, Alex Clemmer <
> clemmer.alexander@gmail.com>
> >> wrote:
> >>
> >>> Yes, CMake is currently checking if the -std=c++11 flag exists. CMake
> >>> 3 supports the autotools-style "feature check" style (which would be
> >>> more appropriate on platforms like Windows, anyway) but it's not clear
> >>> how far back we want to support just yet -- right now we support back
> >>> to 2.8.
> >>>
> >>> One thing to consider is that the "default" install of CMake for
> >>> apt-get on recent versions of Ubuntu is v2.8. In general, we'd like to
> >>> have as smooth an install experience as possible for as many platforms
> >>> as we can; I'm willing to be convinced that this isn't worth it, but
> >>> to be safe we've developed with 2.8 in mind, because it's easier to go
> >>> from 2.8 to 3 than the reverse.
> >>>
> >>> On Mon, Jul 27, 2015 at 9:37 AM, James Peach <jorgar@gmail.com> wrote:
> >>> >
> >>> >> On Jul 23, 2015, at 12:40 PM, Alex Clemmer <
> clemmer.alexander@gmail.com>
> >>> wrote:
> >>> >>
> >>> >> A fix is up for review here[1]. Thanks again for your feedback,
this
> >>> >> is very valuable!
> >>> >>
> >>> >> [1] https://reviews.apache.org/r/36743/
> >>> >
> >>> > AFAICT this just checks whether the -std=c++11 compiler option is
> >>> accepted. The equivalent autoconf macro checks that various C++11
> features
> >>> compile, and people have added more over time ...
> >>> 9eda4331dd23c3646aba1ec710e0dd3190e579ab,
> >>> 623d6a0d0f0eb90be80b7e95c91ece89de513367,
> >>> b930d5ce32b60b7c126844a3ef6ae119d36bc8d0, etc.
> >>> >
> >>> > Am I reading the cmake right?
> >>> >
> >>> >>
> >>> >> On Thu, Jul 23, 2015 at 12:18 PM, Vinod Kone <vinodkone@gmail.com>
> >>> wrote:
> >>> >>> yup.
> >>> >>>
> >>> >>> checking for C++ compiler version... 4.1.2
> >>> >>>
> >>> >>> checking for C++ compiler vendor... (cached) gnu
> >>> >>>
> >>> >>> configure: error: GCC 4.8 or higher required (found 4.1.2)
> >>> >>>
> >>> >>> [vinod@smfd-atr-11-sr1 build-cmake]$ echo $?
> >>> >>>
> >>> >>> 1
> >>> >>>
> >>> >>> On Thu, Jul 23, 2015 at 12:17 PM, Alex Clemmer <
> >>> clemmer.alexander@gmail.com>
> >>> >>> wrote:
> >>> >>>
> >>> >>>> We can easily change that to be a FATAL_ERROR or a WARNING.
I
> >>> >>>> recommend being at parity with autotools -- am I correct
in
> assuming
> >>> >>>> that it errors out?
> >>> >>>>
> >>> >>>> On Thu, Jul 23, 2015 at 12:12 PM, Vinod Kone <vinodkone@gmail.com
> >
> >>> wrote:
> >>> >>>>> The one thing I found odd while testing was that some
errors when
> >>> running
> >>> >>>>> 'cmake' do not result in a non-zero exit status.
> >>> >>>>> For example, when I tested with an older version of
GCC it gave a
> >>> warning
> >>> >>>>> about C++11 not being supported but went ahead otherwise.
> >>> >>>>>
> >>> >>>>> -- Performing Test COMPILER_SUPPORTS_CXX11 - Failed
> >>> >>>>>
> >>> >>>>> *--
> >>> >>>>>
> >>> >>>>
> >>>
> Thecompiler/usr/bin/c++doesnotsupportthe`-std=c++11`flag.PleaseuseadifferentC++compiler.*
> >>> >>>>>
> >>> >>>>> -- Looking for include file pthread.h
> >>> >>>>>
> >>> >>>>> -- Looking for include file pthread.h - found
> >>> >>>>>
> >>> >>>>> -- Looking for pthread_create
> >>> >>>>>
> >>> >>>>> -- Looking for pthread_create - not found
> >>> >>>>>
> >>> >>>>> -- Looking for pthread_create in pthreads
> >>> >>>>>
> >>> >>>>> -- Looking for pthread_create in pthreads - not found
> >>> >>>>>
> >>> >>>>> -- Looking for pthread_create in pthread
> >>> >>>>>
> >>> >>>>> -- Looking for pthread_create in pthread - found
> >>> >>>>>
> >>> >>>>> -- Found Threads: TRUE
> >>> >>>>>
> >>> >>>>> -- Found ZLIB: /usr/lib64/libz.so (found version "1.2.3")
> >>> >>>>>
> >>> >>>>> -- Found APR headers: /usr/include/apr-1
> >>> >>>>>
> >>> >>>>> -- Found APR library: /usr/lib64/libapr-1.so
> >>> >>>>>
> >>> >>>>> -- Found APRUTIL headers: /usr/include/apr-1
> >>> >>>>>
> >>> >>>>> -- Found APRUTIL library: /usr/lib64/libaprutil-1.so
> >>> >>>>>
> >>> >>>>> -- Found SVN lib: /usr/lib64/libsvn_client-1.so
> >>> >>>>>
> >>> >>>>> -- Found SVN lib: /usr/lib64/libsvn_delta-1.so
> >>> >>>>>
> >>> >>>>> -- Found SVN lib: /usr/lib64/libsvn_diff-1.so
> >>> >>>>>
> >>> >>>>> -- Found SVN lib: /usr/lib64/libsvn_fs-1.so
> >>> >>>>>
> >>> >>>>> -- Found SVN lib: /usr/lib64/libsvn_fs_base-1.so
> >>> >>>>>
> >>> >>>>>
> >>> >>>>>
> >>> >>>>>
> >>> >>>>> On Thu, Jul 23, 2015 at 12:07 PM, Alex Clemmer <
> >>> >>>> clemmer.alexander@gmail.com>
> >>> >>>>> wrote:
> >>> >>>>>
> >>> >>>>>> I've put up a pair of fixes, tested on OS X 10.10.
They are
> here:
> >>> >>>>>>
> >>> >>>>>> (1) https://reviews.apache.org/r/36740/
> >>> >>>>>> (2) https://reviews.apache.org/r/36741/
> >>> >>>>>>
> >>> >>>>>> This should resolve the issues, and thanks again
for the bug
> report.
> >>> >>>>>>
> >>> >>>>>> On Thu, Jul 23, 2015 at 3:32 AM, haosdent <haosdent@gmail.com>
> >>> wrote:
> >>> >>>>>>> Sure, I use OS X 10.10. Seems OS X don't have
librt, don't add
> rt
> >>> when
> >>> >>>>>> the
> >>> >>>>>>> operate system is OSX?
> >>> >>>>>>>
> >>> >>>>>>> On Thu, Jul 23, 2015 at 6:22 PM, Alex Clemmer
<
> >>> >>>>>> clemmer.alexander@gmail.com>
> >>> >>>>>>> wrote:
> >>> >>>>>>>
> >>> >>>>>>>> Thanks for reporting the issue! I appreciate
it.
> >>> >>>>>>>>
> >>> >>>>>>>> This code is trying to find librt, which
provides the POSIX.1b
> >>> >>>>>>>> Realtime Extension (i.e., things like message
passing, async
> I/O,
> >>> >>>>>>>> mmap'd files, etc.). Assuming you're running
some flavor of
> Linux,
> >>> >>>>>>>> this _should_ exist on your system already,
and
> `find_library` is
> >>> the
> >>> >>>>>>>> CMake-standard function to find it, so
it is not immediately
> >>> clear to
> >>> >>>>>>>> me what went wrong here.
> >>> >>>>>>>>
> >>> >>>>>>>> Do you mind if I ask what system you are
running?
> >>> >>>>>>>>
> >>> >>>>>>>> On Thu, Jul 23, 2015 at 1:16 AM, haosdent
<haosdent@gmail.com
> >
> >>> >>>> wrote:
> >>> >>>>>>>>> Hi, @Alex Clemmer  I try to build it
on OS X 10.10
> >>> >>>>>>>>>
> >>> >>>>>>>>> ```
> >>> >>>>>>>>> mkdir build-cmake
> >>> >>>>>>>>> cmake ..
> >>> >>>>>>>>> make
> >>> >>>>>>>>> ```
> >>> >>>>>>>>>
> >>> >>>>>>>>> But have this error:
> >>> >>>>>>>>> ```
> >>> >>>>>>>>> CMake Error: The following variables
are used in this
> project,
> >>> but
> >>> >>>>>> they
> >>> >>>>>>>> are
> >>> >>>>>>>>> set to NOTFOUND.
> >>> >>>>>>>>> Please set them or make sure they are
set and tested
> correctly in
> >>> >>>> the
> >>> >>>>>>>> CMake
> >>> >>>>>>>>> files:
> >>> >>>>>>>>> LIBRT_LIBRARIES
> >>> >>>>>>>>>    linked by target "tests" in directory
> >>> >>>>>>>>>
> /Users/haosdent/workspace/cpp/mesos/3rdparty/libprocess/src/tests
> >>> >>>>>>>>>
> >>> >>>>>>>>> -- Configuring incomplete, errors occurred!
> >>> >>>>>>>>> ```
> >>> >>>>>>>>>
> >>> >>>>>>>>> Any steps I wrong here?
> >>> >>>>>>>>>
> >>> >>>>>>>>> On Thu, Jul 23, 2015 at 11:27 AM, Marco
Massenzio <
> >>> >>>>>> marco@mesosphere.io>
> >>> >>>>>>>>> wrote:
> >>> >>>>>>>>>
> >>> >>>>>>>>>> This is really cool!
> >>> >>>>>>>>>> Eclipse CDT is becoming a bit tiresome
to use, but JetLabs'
> >>> CLion
> >>> >>>>>> only
> >>> >>>>>>>>>> support cmake, so I definitely
have a stake in this working
> :)
> >>> >>>>>>>>>>
> >>> >>>>>>>>>> Please keep us posted on progress,
I'll definitely try and
> give
> >>> >>>> it a
> >>> >>>>>>>> spin
> >>> >>>>>>>>>> on Ubuntu and OSX.
> >>> >>>>>>>>>> Thanks for doing it!
> >>> >>>>>>>>>>
> >>> >>>>>>>>>> *Marco Massenzio*
> >>> >>>>>>>>>> *Distributed Systems Engineer*
> >>> >>>>>>>>>>
> >>> >>>>>>>>>> On Wed, Jul 22, 2015 at 6:06 PM,
Alex Clemmer <
> >>> >>>>>>>> clemmer.alexander@gmail.com
> >>> >>>>>>>>>>>
> >>> >>>>>>>>>> wrote:
> >>> >>>>>>>>>>
> >>> >>>>>>>>>>> On Wed, Jul 22, 2015 at 3:47
PM, Vinod Kone <
> >>> >>>> vinodkone@gmail.com>
> >>> >>>>>>>> wrote:
> >>> >>>>>>>>>>>> This is exciting! Thanks
for sharing the progress Alex.
> >>> >>>>>>>>>>>>
> >>> >>>>>>>>>>>> Mind sending us instructions
on how to build/test with
> cmake
> >>> >>>> for
> >>> >>>>>>>> noobs
> >>> >>>>>>>>>>> like
> >>> >>>>>>>>>>>> me?
> >>> >>>>>>>>>>>
> >>> >>>>>>>>>>> Ah, rats, I knew I was forgetting
something.
> >>> >>>>>>>>>>>
> >>> >>>>>>>>>>> It actually looks pretty much
like the autotools build
> system:
> >>> >>>>>>>>>>>
> >>> >>>>>>>>>>> 1. Make sure you have all the
"normal" system dependencies
> >>> >>>>>> installed
> >>> >>>>>>>>>>> (like APR, etc.)
> >>> >>>>>>>>>>> 2. Make sure you have CMake
2.8 or later installed on your
> >>> >>>> machine.
> >>> >>>>>>>>>>> (On Ubuntu this looks like:
`sudo apt-get install cmake`)
> >>> >>>>>>>>>>> 3. Go to the root of your Mesos
source tree and do
> something
> >>> >>>> like
> >>> >>>>>> the
> >>> >>>>>>>>>>> following. Note that you will
never have to run bootstrap
> or
> >>> >>>>>>>>>>> configure, so you should _only_
have to run the following
> >>> >>>> commands.
> >>> >>>>>>>>>>>
> >>> >>>>>>>>>>> mkdir build-cmake
> >>> >>>>>>>>>>> cmake ..
> >>> >>>>>>>>>>> make
> >>> >>>>>>>>>>>
> >>> >>>>>>>>>>> 4. Watch as it builds, and
hopefully doesn't explode!
> >>> >>>>>>>>>>>
> >>> >>>>>>>>>>> Finally to run tests, you can
do `make test ARGS="-V"`.
> They
> >>> run
> >>> >>>>>>>>>>> without ANSI colors right now,
which is not ideal, but we
> know
> >>> >>>>>> it's an
> >>> >>>>>>>>>>> issue.
> >>> >>>>>>>>>>>
> >>> >>>>>>>>>>>
> >>> >>>>>>>>>>> --
> >>> >>>>>>>>>>> Alex
> >>> >>>>>>>>>>>
> >>> >>>>>>>>>>> Theory is the first term in
the Taylor series of practice.
> --
> >>> >>>>>> Thomas M
> >>> >>>>>>>>>>> Cover (1992)
> >>> >>>>>>>>>>>
> >>> >>>>>>>>>>
> >>> >>>>>>>>>
> >>> >>>>>>>>>
> >>> >>>>>>>>>
> >>> >>>>>>>>> --
> >>> >>>>>>>>> Best Regards,
> >>> >>>>>>>>> Haosdent Huang
> >>> >>>>>>>>
> >>> >>>>>>>>
> >>> >>>>>>>>
> >>> >>>>>>>> --
> >>> >>>>>>>> Alex
> >>> >>>>>>>>
> >>> >>>>>>>> Theory is the first term in the Taylor
series of practice. --
> >>> Thomas
> >>> >>>> M
> >>> >>>>>>>> Cover (1992)
> >>> >>>>>>>>
> >>> >>>>>>>
> >>> >>>>>>>
> >>> >>>>>>>
> >>> >>>>>>> --
> >>> >>>>>>> Best Regards,
> >>> >>>>>>> Haosdent Huang
> >>> >>>>>>
> >>> >>>>>>
> >>> >>>>>>
> >>> >>>>>> --
> >>> >>>>>> Alex
> >>> >>>>>>
> >>> >>>>>> Theory is the first term in the Taylor series of
practice. --
> >>> Thomas M
> >>> >>>>>> Cover (1992)
> >>> >>>>>>
> >>> >>>>
> >>> >>>>
> >>> >>>>
> >>> >>>> --
> >>> >>>> Alex
> >>> >>>>
> >>> >>>> Theory is the first term in the Taylor series of practice.
--
> Thomas M
> >>> >>>> Cover (1992)
> >>> >>>>
> >>> >>
> >>> >>
> >>> >>
> >>> >> --
> >>> >> Alex
> >>> >>
> >>> >> Theory is the first term in the Taylor series of practice. --
> Thomas M
> >>> >> Cover (1992)
> >>> >
> >>>
> >>>
> >>>
> >>> --
> >>> Alex
> >>>
> >>> Theory is the first term in the Taylor series of practice. -- Thomas M
> >>> Cover (1992)
> >>>
> >>
> >>    1.
> >
> >
> >
> > --
> > Alex
> >
> > Theory is the first term in the Taylor series of practice. -- Thomas M
> > Cover (1992)
>
>
>
> --
> Alex
>
> Theory is the first term in the Taylor series of practice. -- Thomas M
> Cover (1992)
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message