Opened 7 months ago

Closed 6 months ago

Last modified 6 months ago

#71642 closed defect (fixed)

cadabra2: cmake can't find boost

Reported by: Schamschula (Marius Schamschula) Owned by: mascguy (Christopher Nielsen)
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc: michaelld (Michael Dickens)
Port: cadabra2 boost171 boost176 boost178

Description

As I was attempting to update cadabra2 to version 2.5.10, cmake @3.31.2_0 failed to detect either version of boost installed via MacPorts.

CMake Error at client_server/CMakeLists.txt:34 (find_package):
  By not providing "FindBoost.cmake" in CMAKE_MODULE_PATH this project has
  asked CMake to find a package configuration file provided by "Boost", but
  CMake did not find one.

  Could not find a package configuration file provided by "Boost" (requested
  version 1.71.0) with any of the following names:

    BoostConfig.cmake
    boost-config.cmake

  Add the installation prefix of "Boost" to CMAKE_PREFIX_PATH or set
  "Boost_DIR" to a directory containing one of the above files.  If "Boost"
  provides a separate development package or SDK, be sure it has been
  installed.

By downgrading to cmake @3.29.5_0 the configuration went was expected, and the I could complete the upgrade of cadabra2.

See: https://github.com/Schamschula/macports/commit/368ec0037476d5f02324c776a175ac3c663b378e

Change History (12)

comment:1 Changed 6 months ago by ryandesign (Ryan Carsten Schmidt)

Cc: mascguy added
Owner: set to michaelld
Port: cmake cmake-devel added
Status: newassigned
Summary: cmake 3.31.2 can't find boostcmake @3.31.2: can't find boost

cmake was updated to 3.31.3 today; does the problem remain with that version?

comment:2 Changed 6 months ago by mascguy (Christopher Nielsen)

Port: cadabra2 added

comment:3 Changed 6 months ago by mascguy (Christopher Nielsen)

Summary: cmake @3.31.2: can't find boostcadabra: cmake @3.31.2 can't find boost

comment:4 Changed 6 months ago by mascguy (Christopher Nielsen)

Summary: cadabra: cmake @3.31.2 can't find boostcadabra2: cmake @3.31.2 can't find boost

comment:5 Changed 6 months ago by Schamschula (Marius Schamschula)

Nope!

I upgraded cmake to 3.31.3 and then ran

sudo port -v configure cadabra2

and got the same error as before.

comment:6 Changed 6 months ago by mascguy (Christopher Nielsen)

Cc: michaelld added; mascguy removed
Owner: changed from michaelld to mascguy
Port: cmake cmake-devel removed
Summary: cadabra2: cmake @3.31.2 can't find boostcadabra2: cmake can't find boost

EDIT: Corrected my original comment, as the initial conclusion was incorrect.

This is a problem on the MacPorts side: By default, MacPorts isn't installing the cmake find scripts for out Boost ports. But that needs to be done unconditionally, to ensure projects can find it.

I've provided the details in the issue you submitted (https://github.com/kpeeters/cadabra2/issues/331).

Last edited 6 months ago by mascguy (Christopher Nielsen) (previous) (diff)

comment:7 in reply to:  6 Changed 6 months ago by mascguy (Christopher Nielsen)

Port: boost171 boost176 boost178 boost181 added

Replying to mascguy:

EDIT: Corrected my original comment, as the initial conclusion was incorrect.

This is a problem on the MacPorts side: By default, MacPorts isn't installing the cmake find scripts for out Boost ports. But that needs to be done unconditionally, to ensure projects can find it.

I've provided the details in the issue you submitted (https://github.com/kpeeters/cadabra2/issues/331).

So in short, our Boost ports have a non-default variant cmake_scripts, which installs what it says. We need to enable that behavior always, and eliminate the variant.

I'll try to take care of that today.

comment:8 Changed 6 months ago by Schamschula (Marius Schamschula)

cmake without the scripts is useless!

comment:9 in reply to:  8 Changed 6 months ago by mascguy (Christopher Nielsen)

Replying to Schamschula:

cmake without the scripts is useless!

The reason we haven't seen this with other ports, is that most projects don't set policy CMP0167 to NEW. As a result, the stock FindBoost scripts [provided by CMake] are used.

comment:10 Changed 6 months ago by Christopher Nielsen <mascguy@…>

In be86b731cd5f65ac9c027d82af67bb30382dcae5/macports-ports (master):

boost17{1,6,8}: install cmake scripts, eliminating variant

  • Note that boost181 is already setup this way, so no change needed

See: #71642

comment:11 Changed 6 months ago by Christopher Nielsen <mascguy@…>

Resolution: fixed
Status: assignedclosed

In c0f4706e68bd090eebd448b89c71af8691c9092a/macports-ports (master):

cadabra2: add boost to cmake module path

Fixes: #71642

comment:12 Changed 6 months ago by mascguy (Christopher Nielsen)

Port: boost181 removed
Note: See TracTickets for help on using tickets.