icecube / nuflux

A library for calculating atmospheric neutrino fluxes.
https://docs.icecube.aq/nuflux/main
GNU Lesser General Public License v3.0
15 stars 5 forks source link

Meson build system can't find boost #6

Closed BenSmithers closed 3 years ago

BenSmithers commented 3 years ago

Bug, reproduced by @arguelles

Meson fails to find the boost-python libraries while building nuflux on the cobalt testbed - at least in the py3-v4.1.1 CVMFS environment. The full text of the error is included in an attached file, see outlog.txt

I tried having meson look for boost-projects python and python3 by modifying the meson.build file manually, but that didn't work. I tried setting the environmental variables specified in the readme (and below) to the values specified therein, but that didn't work either. $SROOT evaluates to /cvmfs/icecube.opensciencegrid.org/py3-v4.1.1/RHEL_7_x86_64 in my build environment.

The readme also has some issues; the instructions for building it on the cobalts don't work. For example, the line

 MAKE_PREFIX_PATH=${SROOT} BOOST_ROOT=${SROOT} meson setup --prefix=/path/to/instal/to

fails, and simply produces the error

ERROR: Must specify at least one directory name.

I think this should be a series of commands?

export MAKE_PREFIX_PATH=${SROOT}
export BOOST_ROOT=${SROOT}
meson setup . /path/to/install/to

Admittedly, this does also fail to find boost, but at least it doesn't raise a syntax error.

kjmeagher commented 3 years ago

the instructions are off by one character, the variable should be CMAKE_PREFIX_PATH. And the directory should be included in the instructions, but you don't need to use export

BenSmithers commented 3 years ago

As @kjmeagher pointed out over slack, the issue is reproducible only in newer versions of meson. The build system is successful in finding boost-python in meson version 0.53.0, but fails for newer ones. Since this appears to be a meson problem and not a nuflux problem, I'm closing this issue.

The issue is further described here: https://github.com/mesonbuild/meson/issues/6844

kjmeagher commented 3 years ago

Meson overhauled their boost detection code in a way that added extra restrictions which didn't play nice with our cvmfs environment. It will work if you use BOOST_ROOT=/cvmfs/icecube.opensciencegrid.org/py3-v4.1.1/RHEL_7_x86_64/spack/opt/spack/linux-centos7-x86_64/gcc-9.2.0spack/boost-1.71.0-gcw4axdhsqe44hdnbqiwxgfiinffreka/

However, I submitted a PR to meson about this https://github.com/mesonbuild/meson/pull/7909