[GenABEL-dev] automake boost
Frank, Alvaro Jesus
alvaro.frank at rwth-aachen.de
Tue Jun 24 14:11:24 CEST 2014
I am truly stuck with this. The library installs correctly but including it just breaks the compile.
________________________________________
From: genabel-devel-bounces at lists.r-forge.r-project.org [genabel-devel-bounces at lists.r-forge.r-project.org] on behalf of Frank, Alvaro Jesus [alvaro.frank at rwth-aachen.de]
Sent: Tuesday, June 24, 2014 1:19 PM
To: L.C. Karssen; genabel-devel at lists.r-forge.r-project.org
Subject: Re: [GenABEL-dev] automake boost
Thanks for the info,
I tried my version (which fails to recognize boost at all) and yours (which configure doesnt recognize boost but I can still get the compiler to include the files) and I get the following error (lots of similar ones after this):
/usr/include/boost/iterator/iterator_facade.hpp:43:19: error: expected identifier before ‘(’ token
template <class I, class V, class TC, class R, class D> class iterator_facade;
by just including once the following:
#include <boost/math/special_functions/erf.hpp>
Any Ideas?
________________________________________
From: genabel-devel-bounces at lists.r-forge.r-project.org [genabel-devel-bounces at lists.r-forge.r-project.org] on behalf of L.C. Karssen [lennart at karssen.org]
Sent: Tuesday, June 24, 2014 12:02 PM
To: genabel-devel at lists.r-forge.r-project.org
Subject: Re: [GenABEL-dev] automake boost
Hi Alvaro,
On 24-06-14 11:51, Frank, Alvaro Jesus wrote:
> Hi Lennart,
>
> I am, having trouble with automake recognizing boost root path.
> I used AX_BOOST_BASE but the root path (/usr/local/) is still not being
> recognized. and the path $Boost_root is still not helping me, perhaps I
> am setting it wrong.
> Do you also compile it all or keep the macros as they are?
I use the Boost package provided by Ubuntu, so I haven't compiled them
myself. In that case the libraries are installed in /usr/include/boost/.
In ProbABEL's configure.ac I test for boost as follows (see the branch
at
https://r-forge.r-project.org/scm/viewvc.php/branches/ProbABEL-pvals/ProbABEL/?root=genabel):
----------------------------------------
if test "x$with_boost_math" != "xno"; then
AC_MSG_NOTICE([building using the Boost Math library enabled])
AC_ARG_WITH([boost-include-path],
[AS_HELP_STRING([--with-boost-include-path],
[location of the Boost headers, defaults to /usr/include/boost])],
[CXXFLAGS+=" -I${withval}"
CPPFLAGS+=" -I${withval}"],
[CXXFLAGS+=' -I/usr/include/boost'
CPPFLAGS+=' -I/usr/include/boost'])
# Check for the Boost Math header files
AC_CHECK_HEADERS([boost/math/distributions.hpp])
if test x$ac_cv_header_boost_math_distributions_hpp = xno; then
AC_MSG_ERROR([Could not find the Boost Math header files. Did \
you specify --with-boost-include-path correctly? Or use --without-boost \
to disable the calculation of p-values.])
fi
else
AC_MSG_NOTICE([not using the Boost Math libraries, so no p-values in
the \
output])
fi
AM_CONDITIONAL([WITH_BOOST_MATH], test "x$with_boost_math" != "xno")
----------------------------------------
This creates a variable WITH_BOOST_MATH that can be used in AutoMake's
Makefile.am files:
----------------------------------------
if WITH_BOOST_MATH
palinear_CXXFLAGS += -DWITH_BOOST_MATH
endif
----------------------------------------
And then in the .cpp files, for example:
----------------------------------------
#if WITH_BOOST_MATH
std::vector<std::ostringstream *> pval;
#endif
----------------------------------------
Hope that helps.
Lennart.
>
> Thanks!
>
>
> _______________________________________________
> genabel-devel mailing list
> genabel-devel at lists.r-forge.r-project.org
> https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/genabel-devel
>
--
*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
L.C. Karssen
Utrecht
The Netherlands
lennart at karssen.org
http://blog.karssen.org
GPG key ID: A88F554A
-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-
_______________________________________________
genabel-devel mailing list
genabel-devel at lists.r-forge.r-project.org
https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/genabel-devel
More information about the genabel-devel
mailing list