CMake Error at /usr/share/cmake/Modules/FindBoost.cmake:1128

Asked by jstults on 2011-11-23

Using the development version of dorsal; on Fedora 14. I defined the BOOST_LIBRARYDIR environment variable, because the build failed when it was unable to find boost_mpi:
  export BOOST_LIBRARYDIR=/usr/lib:/usr/lib/openmpi/lib
That fixes the cmake error for boost_mpi, but I still get an error for boost_math_tr1. I have boost-math package installed. Not sure where boost_math_tr1 is though. Here's the error message:

CMake Error at /usr/share/cmake/Modules/FindBoost.cmake:1128 (message):
  Unable to find the requested Boost libraries.

  Boost version: 1.44.0

  Boost include path: /usr/include

  The following Boost libraries could not be found:

          boost_math_tr1

  Some (but not all) of the required Boost libraries were found. You may
  need to install these additional Boost libraries. Alternatively, set
  BOOST_LIBRARYDIR to the directory containing Boost libraries or BOOST_ROOT
  to the location of Boost.

[... lots of lines ...]

-- The following optional packages were found:
-- -------------------------------------------
-- (OK) OPENMP
-- (OK) MPI
-- (OK) PETSC
-- (OK) SLEPC
-- (OK) TRILINOS
-- (OK) MTL4
-- (OK) UMFPACK
-- (OK) CHOLMOD
-- (OK) SCOTCH
-- (OK) PARMETIS
-- (OK) CGAL
-- (OK) ZLIB
-- (OK) PYTHON
-- (OK) SPHINX
--
-- The following optional packages were not enabled:
-- -------------------------------------------------
-- (--) GMP
--
-- Enabling generation of documentation.
-- Initializing sphinx projects
-- Enabling generation of html-documentation
-- Configuring incomplete, errors occurred!
Failure with exit status: 1
Exit message: There was a problem configuring dolfin-1.0-rc1.

Question information

Language:
English Edit question
Status:
Solved
For:
Dorsal Edit question
Assignee:
No assignee Edit question
Solved by:
Johannes Ring
Solved:
2011-12-22
Last query:
2011-12-22
Last reply:
2011-12-22

This question was reopened

jstults (joshua-stults) said : #1

I also have the gmp and gmp-devel packages installed. What should I change to get dorsal to find those?

Johannes Ring (johannr) said : #2

I'm not sure DOLFIN uses GMP anymore, but, if you really need it, add -DDOLFIN_ENABLE_GMP:BOOL=ON to CONFOPTS in FEniCS/packages/dolfin.package. If GMP is installed in a non-standard location, you may also need to define GMP_DIR in your .platform file.

Regarding libboost_math_tr1: Have you tried to install the boost-math package?

BTW, I don't know much about Fedora, but should boost-openmpi-devel be listed among the packages that Dorsal assumes to be installed?

jstults (joshua-stults) said : #3

On Nov 25, 2011 2:41 AM, "Johannes Ring" <
<email address hidden>> wrote:
>
> Your question #179760 on Dorsal changed:
> https://answers.launchpad.net/dorsal/+question/179760
>
> Status: Open => Answered
>
> Johannes Ring proposed the following answer:
> I'm not sure DOLFIN uses GMP anymore, but, if you really need it, add
> -DDOLFIN_ENABLE_GMP:BOOL=ON to CONFOPTS in
> FEniCS/packages/dolfin.package. If GMP is installed in a non-standard
> location, you may also need to define GMP_DIR in your .platform file.
>
The only reason I mention it is because Dorsal noted it in the output. I'm
happy to ignore it if Doin no longer uses GMP.

> Regarding libboost_math_tr1: Have you tried to install the boost-math
> package?
>

I have that one installed. Maybe there's a *-devel package I'm missing.

> BTW, I don't know much about Fedora, but should boost-openmpi-devel be
> listed among the packages that Dorsal assumes to be installed?
>
Yes, I think you should add this one (I installed it after the first time I
got the boost_mpi error).

Thanks for your help. I will let you know if I find what Fedora package
hides the libboost_math_tr1. I have a math_tr1.hpp, but no library that I
can locate so far.

jstults (joshua-stults) said : #4

This failed build has the same error that I'm seeing: https://launchpad.net/~fenics-packages/+archive/fenics-dev/+build/2899860
  https://launchpadlibrarian.net/84403148/buildlog_ubuntu-natty-i386.dolfin_1.0-beta2-2%2Bbzr6409~ppa1~natty1_FAILEDTOBUILD.txt.gz

"""
  The following Boost libraries could not be found:

          boost_math_tr1

  Some (but not all) of the required Boost libraries were found.
"""
On Fedora the boost-devel package provides boos/math/tr1.hpp; but I haven't found any package that includes a libboost_math_tr1.so (if such a thing exists?).

Johannes Ring (johannr) said : #5

I have looked into this and it seems that the Boost.Math libraries are not in any of the Boost packages in Fedora. The packaging file (http://goo.gl/oo37k) states that the Boost.Math library is header-only and that the package (boost-math) is empty:

180 %package math
181 Summary: Stub that used to contain boost math library
182 Group: System Environment/Libraries
183
184 %description math
185
186 This package is a stub that used to contain run-time component of boost
187 math library. Now that boost math library is header-only, this
188 package is empty. It's kept around only so that during yum-assisted
189 update, old libraries from boost-math package aren't left around.

This was changed early in 2010:

1152 * Thu Jan 14 2010 Petr Machata <email address hidden> - 1.41.0-2
1153 - Replace a boost-math subpackage with a stub

I guess Boost should therefore be built by Dorsal on Fedora. Harish?

Harish Narayanan (hnarayanan) said : #6

The fedora platforms now build boost.

jstults (joshua-stults) said : #7

By "now", do you mean Fedora 16? As I mentioned above, on Fedora 14 all you get is the header. Fedora 14 just reached end-of-life last Friday (9 Dec 2011). Has anyone successfully built on Fedora 15 or 16?

jstults (joshua-stults) said : #8

Upgraded to Fedora 16. This seems to have worked:
./dorsal.sh FEniCS/platforms/supported/fedora15.platform

jstults (joshua-stults) said : #9

I spoke too soon. I get this error: OSError: The Boost math library was not found, trying to run 'python demo_navier-stokes.py'.

"yum info boost-math" gives:
Description :
: This package is a stub that used to contain run-time component of
: boost math library. Now that boost math library is header-only,
: this package is empty. It's kept around only so that during
: yum-assisted update, old libraries from boost-math package aren't
: left around.

So I'm left wondering (with my shiny new Fedora 16 install, very nice btw) for which values of "now" does Fedora build the libraries?

Johannes Ring (johannr) said : #10

By "now" we mean that the latest Dorsal now builds boost on Fedora platforms (since the boost-math package in Fedora is broken).

jstults (joshua-stults) said : #11

Thank you Johannes; I understand what you mean now. I updated dorsal to the latest development version (bzr branch lp:dorsal), and executing the script does indeed grab and build the Boost libraries. I sourced the dolfin.conf file as stated at the end of the script output, and then tried python -i demo_navier-stokes.py.

I get:
  OSError: The Boost math library was not found.
  If Boost math library is installed in a nonstandard location,
  set the environment variable BOOST_DIR.

It looks like the boost libraries were installed in ~/Work/FEniCS/lib/. So I set BOOST_DIR=${HOME}/Work/FEniCS/lib, then export BOOST_DIR. I still get the same error when I try the demo.

What should I set the BOOST_DIR variable to? Should this be something that is set by dolfin.conf?

jstults (joshua-stults) said : #12

Sorry, the error I get now that I've set BOOST_DIR is different:
  OSError: The Boost headers was not found.
  If Boost is installed in a nonstandard location,
  set the environment variable BOOST_DIR.

Best Johannes Ring (johannr) said : #13

Try:

  export BOOST_DIR=${HOME}/Work/FEniCS

jstults (joshua-stults) said : #14

Thanks Johannes Ring, that solved my question.