[MacPorts] #71871: pg boost: for cmake projects, add boost to module path (was: cmake can't find boost)

MacPorts noreply at macports.org
Sun Jan 19 19:10:39 UTC 2025


#71871: pg boost: for cmake projects, add boost to module path
-----------------------+-----------------------
  Reporter:  dershow   |      Owner:  mascguy
      Type:  defect    |     Status:  assigned
  Priority:  Normal    |  Milestone:
 Component:  ports     |    Version:  2.10.5
Resolution:            |   Keywords:  portgroup
      Port:  pg-boost  |
-----------------------+-----------------------
Changes (by mascguy):

 * keywords:   => portgroup
 * version:   => 2.10.5
 * port:  boost176 => pg-boost


Old description:

> I'm not really sure if this is a cmake issue or a boost issue.
> I'm trying to build a non-macports app (OpenModelica) using cmake, and
> worked fine until recently.  When I run cmake I now get these errors:
>

> {{{
> CMake Error at
> /opt/local/share/cmake-3.31/Modules/FindPackageHandleStandardArgs.cmake:233
> (message):
>   Could NOT find Boost (missing: Boost_INCLUDE_DIR program_options
>   filesystem)
> Call Stack (most recent call first):
> /opt/local/share/cmake-3.31/Modules/FindPackageHandleStandardArgs.cmake:603
> (_FPHSA_FAILURE_MESSAGE)
>   /opt/local/share/cmake-3.31/Modules/FindBoost.cmake:2409
> (find_package_handle_standard_args)
> }}}
>
> I see this ticket that is having the same problem:
> #71642
> Which suggests that it's a boost issue, but then has a fix of the
> cadabra2 port, where the problem was showing up.
> I do have boost176 and boost181 ports installed.  I hadn't installed
> either directly, so they are dependents of other ports.
> I'm not familiar enough with Boost to understand how to make cmake "find"
> it.

New description:

 When the CMake pgs are in use, add Boost to the module path. Something
 like this, which was recently added to port `cadabra2`:

 {{{
 # Ensure CMake can find the selected boost port
 # TODO: Do this automatically via Boost portgroup
 cmake.module_path-append \
                     [boost::lib_dir]/cmake
 }}}

 Original description:

 I'm not really sure if this is a cmake issue or a boost issue. I'm trying
 to build a non-macports app (OpenModelica) using cmake, and worked fine
 until recently. When I run cmake I now get these errors:

 {{{
 CMake Error at
 /opt/local/share/cmake-3.31/Modules/FindPackageHandleStandardArgs.cmake:233
 (message):
   Could NOT find Boost (missing: Boost_INCLUDE_DIR program_options
   filesystem)
 Call Stack (most recent call first):
 /opt/local/share/cmake-3.31/Modules/FindPackageHandleStandardArgs.cmake:603
 (_FPHSA_FAILURE_MESSAGE)
   /opt/local/share/cmake-3.31/Modules/FindBoost.cmake:2409
 (find_package_handle_standard_args)
 }}}

 I see this ticket that is having the same problem: #71642 Which suggests
 that it's a boost issue, but then has a fix of the cadabra2 port, where
 the problem was showing up.

 I do have boost176 and boost181 ports installed. I hadn't installed either
 directly, so they are dependents of other ports. I'm not familiar enough
 with Boost to understand how to make cmake "find" it.

--

-- 
Ticket URL: <https://trac.macports.org/ticket/71871#comment:6>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list