[MacPorts] #71871: cmake can't find boost

MacPorts noreply at macports.org
Sat Jan 18 04:49:56 UTC 2025


#71871: cmake can't find boost
-----------------------+--------------------
  Reporter:  dershow   |      Owner:  (none)
      Type:  defect    |     Status:  new
  Priority:  Normal    |  Milestone:
 Component:  ports     |    Version:
Resolution:            |   Keywords:
      Port:  boost181  |
-----------------------+--------------------

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:
> [https://trac.macports.org/ticket/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:

 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.

--

Comment (by ryandesign):

 MacPorts offers multiple versions of boost, installed to nonstandard
 locations so that they do not conflict with one another, so it's not
 unexpected that you would need to tell your build system which one you
 want it to use.

 Perhaps you used to (also?) have the old boost port installed which
 installs to the standard location and which cmake would probably find
 automatically. The old [ticket:71318 boost port will be removed
 eventually] so you shouldn't rely on it.

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


More information about the macports-tickets mailing list