How to build mesos on Mavericks - osx-mavericks

I cloned from git:
git clone git://git.apache.org/mesos.git
and also had done
brew install autoconf automake libtool
Then trying to follow the "Getting started" at
http://mesos.apache.org/gettingstarted/
And specifically :
Only if running from source code cloned from git,
run ./bootstrap otherwise skip to step 3
So I ran
./bootstrap
Here is a trimmed output of the results. I did not see any ERRORS as such but plenty of WARNings. End result exited with 1 and no configure script was generated:
autoreconf: configure.ac: adding subdirectory 3rdparty/stout to autoreconf
autoreconf: Entering directory `3rdparty/stout'
autoreconf: configure.ac: not using Libtool
autoreconf: running: /usr/local/Cellar/autoconf/2.69/bin/autoconf --warnings=all
autoreconf: configure.ac: not using Autoheader
autoreconf: running: automake --add-missing --copy --no-force --warnings=all
configure.ac:10: installing './missing'
autoreconf: Leaving directory `3rdparty/stout'
autoreconf: running: glibtoolize --copy
glibtoolize: putting auxiliary files in `.'.
glibtoolize: copying file `./ltmain.sh'
..
glibtoolize: copying file `m4/ltversion.m4'
glibtoolize: copying file `m4/lt~obsolete.m4'
..
m4/libtool.m4:694: LT_OUTPUT is expanded from...
configure.ac:28: the top level
configure.ac:87: warning: The macro `AC_LANG_SAVE' is obsolete.
configure.ac:87: You should run autoupdate.
../../lib/autoconf/lang.m4:128: AC_LANG_SAVE is expanded from...
m4/acx_pthread.m4:363: ACX_PTHREAD is expanded from...
configure.ac:87: the top level
configure.ac:87: warning: The macro `AC_LANG_C' is obsolete.
configure.ac:87: You should run autoupdate.
../../lib/autoconf/c.m4:72: AC_LANG_C is expanded from...
m4/acx_pthread.m4:363: ACX_PTHREAD is expanded from...
configure.ac:87: the top level
configure.ac:87: warning: The macro `AC_TRY_LINK' is obsolete.
configure.ac:87: You should run autoupdate.
../../lib/autoconf/general.m4:2688: AC_TRY_LINK is expanded from...
m4/acx_pthread.m4:363: ACX_PTHREAD is expanded from...
configure.ac:87: the top level
configure.ac:87: warning: The macro `AC_LANG_RESTORE' is obsolete.
configure.ac:87: You should run autoupdate.
../../lib/autoconf/lang.m4:134: AC_LANG_RESTORE is expanded from...
m4/acx_pthread.m4:363: ACX_PTHREAD is expanded from...
configure.ac:87: the top level
configure.ac:21: installing './ar-lib'
configure.ac:21: installing './compile'
configure.ac:8: installing './config.guess'
configure.ac:8: installing './config.sub'
configure.ac:18: installing './missing'
automake: warnings are treated as errors
3rdparty/Makefile.am:71: warning: source file '$(GTEST)/src/gtest-all.cc' is in a subdirectory,
3rdparty/Makefile.am:71: but option 'subdir-objects' is disabled
automake: warning: possible forward-incompatibility.
automake: At least a source file is in a subdirectory, but the 'subdir-objects'
automake: automake option hasn't been enabled. For now, the corresponding output
automake: object file(s) will be placed in the top-level directory. However,
automake: this behaviour will change in future Automake versions: they will
automake: unconditionally cause object files to be placed in the same subdirectory
automake: of the corresponding sources.
automake: You are advised to start using 'subdir-objects' option throughout your
automake: project, to avoid future incompatibilities.
3rdparty/Makefile.am:71: warning: source file '$(GMOCK)/src/gmock-all.cc' is in a subdirectory,
3rdparty/Makefile.am:71: but option 'subdir-objects' is disabled
3rdparty/Makefile.am:61: warning: source file '$(RY_HTTP_PARSER)/http_parser.c' is in a subdirectory,
3rdparty/Makefile.am:61: but option 'subdir-objects' is disabled
3rdparty/Makefile.am:118: warning: source file '$(STOUT)/tests/bytes_tests.cpp' is in a subdirectory,
..
3rdparty/Makefile.am:118: but option 'subdir-objects' is disabled
3rdparty/Makefile.am:118: warning: source file '$(STOUT)/tests/flags_tests.cpp' is in a subdirectory,
3rdparty/Makefile.am:118: but option 'subdir-objects' is disabled
..
3rdparty/Makefile.am:146: warning: source file '$(STOUT)/tests/proc_tests.cpp' is in a subdirectory,
3rdparty/Makefile.am:146: but option 'subdir-objects' is disabled
3rdparty/Makefile.am: installing './depcomp'
Makefile.am:29: warning: source file 'src/latch.cpp' is in a subdirectory,
Makefile.am:29: but option 'subdir-objects' is disabled
Makefile.am:29: warning: source file 'src/pid.cpp' is in a subdirectory,
Makefile.am:29: but option 'subdir-objects' is disabled
Makefile.am:29: warning: source file 'src/process.cpp' is in a subdirectory,
Makefile.am:29: but option 'subdir-objects' is disabled
Makefile.am:29: warning: source file 'src/statistics.cpp' is in a subdirectory,
Makefile.am:29: but option 'subdir-objects' is disabled
..
Makefile.am:101: warning: source file 'src/tests/shared_tests.cpp' is in a subdirectory,
Makefile.am:101: but option 'subdir-objects' is disabled
Makefile.am:101: warning: source file 'src/tests/statistics_tests.cpp' is in a subdirectory,
Makefile.am:101: but option 'subdir-objects' is disabled
Makefile.am:101: warning: source file 'src/tests/time_tests.cpp' is in a subdirectory,
Makefile.am:101: but option 'subdir-objects' is disabled
autoreconf: automake failed with exit status: 1

The Mesos team updated the "Getting Started" document with instructions on building and running Mesos on Mavericks.
GCC was replaced with Clang on Mavericks, and so you first have to install GCC 4.7+. You can use Homebrew to install it (Note: installing GCC takes a loooong time):
brew tap homebrew/versions
brew install gcc48
This is the gist of getting started on Mavericks:
# Make sure you have the right versions of automake and GCC.
# For example:
$ automake --version
automake (GNU automake) 1.12.6
...
$ aclocal --version
aclocal (GNU automake) 1.12.6
...
$ gcc-4.8 --version
gcc-4.8 (GCC) 4.8.1
...
# Follow bootstrap steps above.
# Configure and build.
$ mkdir build
$ cd build
# The prepending CC and CXX will select custom compilers to build Mesos with.
$ CC=gcc-4.8 CXX=g++-4.8 ../configure

Related

Header files not found by 'make'

The make instruction is not finding the libraries required for compilation. They are in other folder than the usual /usr/include folder.
I'm complying a simulation software called magnum.fe I already installed all the required dependencies (FEniCS = 1.5
CMake >= 2.8
SWIG >= 2.0
G++ >= 4.0) and started to run make as the instructions suggest.
$ cd /path/to/magnum.fe
$ mkdir build
$ cd build
$ cmake ..
$ make
$ sudo make install
But when running make I get the following error:
/usr/include/petscsys.h:136:12: fatal error: petsc/mpiuni/mpi.h: No such file or directory
136 | # include <petsc/mpiuni/mpi.h>
| ^~~~~~~~~~~~~~~~~~~~
compilation terminated.
The files do exist, but in other folder: /home/myusername/bin/petsc/include/mpiuni/mpi.h
I compiled petsc on /home/myusername/bin/petsc/ with the following instruction:
$ ./configure --with-cc=gcc --with-cxx=g++ --with-fc=gfortran --download-mpich --download-fblaslapack
$ make all check
It compiled it sucessfully but I couldn't get the magnum.fe compilation to finish.
I tried moving each header file to /usr/include but now I'm stuck on if moving the whole petsc directory into this folder. It must be a more elegant way to do it.
Thanks
I've made it!
There are two options available:
Specify the libraries to use with the make command editing the MAKEfile, use the variable LDLIBS to set it up. Detailed usage in here: https://web.archive.org/web/20070723140628/http://arco.inf-cr.uclm.es/~david.villa/doc/repo/make/make.html#AEN36
or
Create symbolic links pointing to /usr/include. In my case I used:
ln -s /home/myusername/bin/petsc/include/* /usr/include

Error: AC_DEFINE() is not found to autoreconf --force --install

Description:
I am doing Customization for tacacs+ server open source code. While packaging
i am tring to run configure to genrate Makefile.
Note: In open source tacacs+ tar is using autoconf 2.63 & on my build machine is having
2.67 autoconf version. Only this the env diff.
But get AC_DEFINE() undefined error as below:
d001:~/srcsvn/workspace_main_7.40_04102013_64bit/NMD2/64bit/os/usr.local/tacplus_merger/src/tacacs+-4.0.4.19.orig$ autoreconf --force --install
libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, `cfgaux'.
libtoolize: copying file `cfgaux/ltmain.sh'
libtoolize: Consider adding `AC_CONFIG_MACRO_DIR([m4])' to configure.in and
libtoolize: rerunning libtoolize, to keep the correct libtool macros in-tree.
libtoolize: Consider adding `-I m4' to ACLOCAL_AMFLAGS in Makefile.am.
configure.in:45: error: possibly undefined macro: AC_DEFINE
If this token and others are legitimate, please use m4_pattern_allow.
See the Autoconf documentation.
autoreconf: /usr/bin/autoconf failed with exit status: 1
Check the file configure.in in line 45 and above and scan for pkg-config calls.
Then check if you have it installed (just type pkg-config). If this fails, you are missing pkg-config. Apply your distros way of installing software (rpm, apt-get, pacman, bee) and install the missing pkg-config package.
This happens all too often when something unrelated to it is misquoting the usage of the macro.
While it does not help much without knowing what the configure.ac looks like, you should observe the lines around line 45, rather than on that line, to figure out what's going wrong. Sometimes it can be just a misplaced [] quote.

Autoreconf better way to find Boost::Date-time

I am trying to compile some code using autotools and am getting stuck when trying to include boost::date-time and boost::regex. I was given an configure.in file that defines that looks for boost::date-time this way
AC_CHECK_LIB(boost_date_time-gcc-mt, main, , [
AC_CHECK_LIB(boost_date_time-mt, main, , [
AC_CHECK_LIB(boost_date_time, main, , [
AC_MSG_ERROR("Linking against boost::date-time library failed.")])
])
])
which appears to be the standard way according to google. But when I run autoreconf:
$ autoreconf -f -s -i
libtoolize: putting auxiliary files in `.'.
libtoolize: linking file `./ltmain.sh'
libtoolize: Consider adding `AC_CONFIG_MACRO_DIR([m4])' to configure.in and
libtoolize: rerunning libtoolize, to keep the correct libtool macros in-tree.
libtoolize: Consider adding `-I m4' to ACLOCAL_AMFLAGS in Makefile.am.
and ./configure:
$ CXXFLAGS="-g -w" ./configure --prefix=$INSTALL_PATH
...
checking for main in -lboost_date_time-gcc-mt... no
checking for main in -lboost_date_time-mt... no
checking for main in -lboost_date_time... no
configure: error: "Linking against boost::date-time library failed."
It cannot be found. I know they are there cause I compiled boost 1.53 from scratch. What could be an issue here?
Thanks a lot in advance.
There's an excellent boost.m4 macro. You can copy it into a top level ./m4 directory.
AC_CONFIG_MACRO_DIR([m4]) in configure.ac
ACLOCAL_AMFLAGS = -I m4 --install in the top-level Makefile.am
invoke aclocal with aclocal -I m4 --install
It's very easy to use the results in configure.ac, e.g., for Boost.Filesystem:
BOOST_REQUIRE([1.53], [ACTION-IF-NOT-FOUND])
AC_SUBST(BOOST_CPPFLAGS)
MY_PROJECT_CPPFLAGS+="$BOOST_CPPFLAGS"
BOOST_FILESYSTEM([mt])
AC_SUBST(BOOST_FILESYSTEM_LIBS)
AC_SUBST(BOOST_FILESYSTEM_LDFLAGS)
MY_PROJECT_LIBFLAGS+="$BOOST_FILESYSTEM_LDFLAGS $BOOST_FILESYSTEM_LIBS"
It will even add dependencies like Boost.System.
There are macros at the GNU Autoconf Archive for both boost::date-time and boost::regex. Perhaps they would be more suitable.
It cannot be found. I know they are there cause I compiled boost 1.53 from scratch. What could be an issue here?
You'll have to consult config.log to know that for sure. Since you are looking for the main functions in those libs (which aren't in those libs, but that's another issue), the AC_CHECK_LIB tests generate invalid C++ code, and that may be your problem.

checking for suffix of object files... configure: error: cannot compute suffix of object files: cannot compile

While building ARM toolchain , I got the following error
checking for suffix of object files... configure: error: cannot compute suffix of object files: cannot compile
See `config.log' for more details.
make[1]: *** [configure-target-libgcc] Error 1
make[1]: Leaving directory `<path>/gcc-4.3.2-arm-elf'
make: *** [all] Error 2
what might be the problem?
Did you read http://gcc.gnu.org/wiki/FAQ#configure_suffix ?
Have you installed GMP, MPFR and MPC? Are they in your library search path?
See http://gcc.gnu.org/wiki/InstallingGCC and make sure you've followed the basic instructions. By far the simplest way to build GCC (including as a cross compiler) is to follow these instructions:
Alternatively, after extracting the GCC source archive, simply run the ./contrib/download_prerequisites script in the GCC source directory. That will download the support libraries and create symlinks, causing them to be built automatically as part of the GCC build process.
"*Building GCC is not trivial, but is not difficult if you follow the instructions carefully.
Many people rush into trying to build it without reading the installation docs properly and make one or more of these common mistakes:
1) do not run ./configure from gcc src dir (this is not supported) => you need to run configure from outside the gcc source directory
2) Note: if GCC links dynamically to the prerequisite libs (GMP/MPFR/MPC) then the shared libraries must be in the dynamic linker's path (LD_LIBRARY_PATH), both when building gcc and when using the installed compiler.*"
Simple example (without dynamic link to GMP/MPFR/MPC):
tar xzf gcc-4.8.0.tar.gz
cd gcc-4.8.0
./contrib/download_prerequisites
cd ..
mkdir objdir
cd objdir
$PWD/../gcc-4.8.0/configure --prefix=/opt/gcc-4.8.0
make
make install
Sources:
Advogato Doc -
GNU Doc
export LD_LIBRARY_PATH=/path/for/libraries:$LD_LIBRARY_PATH
path/for/libraries is where the GMP MPFR and MPC libraries are present.
I was compiling GCC on ubuntu 12.04 and these linraries present in the path /usr/local/lib

why automake fails to generate Makefile.in

Trying to use automake/autoconf (versions 1.10 and 2.61, respectively). Everything is working OK, except automake is not generating Makefile.in.
There are some warnings generated, but I don't think they're significant. However, the last line makes me think it's generating something it shouldn't and stopping there. There is a md5.cc and md5.c file in the project.
xanadu:fsd wwilliam$ automake --add-missing
configure.ac:46: warning: AC_COMPILE_IFELSE was called before AC_USE_SYSTEM_EXTENSIONS
/var/tmp/autoconf/autoconf-15~193/SRC/autoconf/lib/autoconf/specific.m4:421: AC_USE_SYSTEM_EXTENSIONS is expanded from...
/var/tmp/autoconf/autoconf-15~193/SRC/autoconf/lib/autoconf/functions.m4:1677: AC_FUNC_STRNLEN is expanded from...
configure.ac:46: the top level
configure.ac:46: warning: AC_RUN_IFELSE was called before AC_USE_SYSTEM_EXTENSIONS
configure.ac:46: warning: AC_COMPILE_IFELSE was called before AC_GNU_SOURCE
/var/tmp/autoconf/autoconf-15~193/SRC/autoconf/lib/autoconf/specific.m4:340: AC_GNU_SOURCE is expanded from...
configure.ac:46: warning: AC_RUN_IFELSE was called before AC_GNU_SOURCE
configure.ac:46: warning: AC_COMPILE_IFELSE was called before AC_AIX
/var/tmp/autoconf/autoconf-15~193/SRC/autoconf/lib/autoconf/specific.m4:455: AC_AIX is expanded from...
configure.ac:46: warning: AC_RUN_IFELSE was called before AC_AIX
configure.ac:46: warning: AC_COMPILE_IFELSE was called before AC_MINIX
/var/tmp/autoconf/autoconf-15~193/SRC/autoconf/lib/autoconf/specific.m4:474: AC_MINIX is expanded from...
configure.ac:46: warning: AC_RUN_IFELSE was called before AC_MINIX
Makefile.am: object `md5.$(OBJEXT)' created by `md5.cc' and `md5.c'
Relevant contents of configure.ac:
AC_INIT(testapp, 1.1, user#blah.com)
AM_INIT_AUTOMAKE(testapp,1.1)
AC_OUTPUT(Makefile)
Contents of Makefile.am:
AUTOMAKE_OPTIONS = foreign
CFLAGS=-O2
bin_PROGRAMS = testapp
testapp_SOURCES = interface.cc interface.hh keymgr.cc keymgr.hh main.cc manage.cc manage.hh md5.c md5.cc md5.h mm.cc mm.hh mysqldb.cc mysqldb.h testapp.cc testapp.h
I've been googling the issue but haven't found anything helpful.
Commands run were:
autoscan
mv configure.scan configure.ac
(edit configure.ac)
autoconf
(edit Makefile.am)
aclocal
automake --add-missing
Anyone seen anything like this before or know perhaps how I could turn on some additional debugging to troubleshoot the problem?
Makefile.am: object `md5.$(OBJEXT)' created by `md5.cc' and `md5.c'
is an error message that causes Automake to abort. These two files would have to be compiled to md5.o, so that is a problem.
Can you rename one of these two files?
I have one program that I configure with automake. That program has a script to do the setup, which consists of:
aclocal -I config &&
libtoolize --automake &&
autoheader &&
automake --foreign --add-missing &&
autoconf
The difference, as I see it, is that in this the autoconf step is last, not in the middle.
It complains on line 46, which you do not provide to your question.
Anyhow, to fix this issue you have to add AC_USE_SYSTEM_EXTENSIONS in your configure.ac.
example:
AC_INIT(testapp, 1.1, user#blah.com)
AM_INIT_AUTOMAKE(testapp,1.1)
AC_OUTPUT(Makefile)
AC_USE_SYSTEM_EXTENSIONS
AC_PROG_C
...

Resources