Opened 2 years ago

Closed 2 years ago

#65308 closed defect (fixed)

cpptoml: builds failing for 10.13 and earlier: cmake cannot find libcxx

Reported by: mascguy (Christopher Nielsen) Owned by: mascguy (Christopher Nielsen)
Priority: Normal Milestone:
Component: ports Version: 2.7.2
Keywords: Cc:
Port: cpptoml

Description

Details:

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

  Could not find a package configuration file provided by "LIBCXX" with any
  of the following names:

    LIBCXXConfig.cmake
    libcxx-config.cmake

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

https://ports.macports.org/port/cpptoml/builds/

Change History (3)

comment:1 Changed 2 years ago by mascguy (Christopher Nielsen)

Summary: cpptoml: builds failing for 10.13 and earliercpptoml: builds failing for 10.13 and earlier: cmake cannot find libcxx

comment:2 Changed 2 years ago by mascguy (Christopher Nielsen)

It looks like this port is using the project's default behavior, which includes building examples. But those aren't provided by the port anyway, so that phase can be disabled.

Meanwhile, based on comparing our current published binaries, the port simply provides architecture-independent components:

$ port contents cpptoml
  /opt/local/include/cpptoml.h
  /opt/local/lib/cmake/cpptoml/cpptomlConfig.cmake
  /opt/local/lib/cmake/cpptoml/cpptomlConfigVersion.cmake
  /opt/local/lib/cmake/cpptoml/cpptomlTargets.cmake

Based on initial testing on 10.12, we can provide the following two flags to CMake, to completely eliminate the need for compilation (and libcxx):

-DENABLE_LIBCXX:BOOL=OFF \
-DCPPTOML_BUILD_EXAMPLES:BOOL=OFF

That also allows us to remove the dependency on Boost, and simplify the portfile.

comment:3 Changed 2 years ago by Christopher Nielsen <mascguy@…>

Resolution: fixed
Status: assignedclosed

In d414dd3965b6298353ff45c76d81d2d36b7d496a/macports-ports (master):

cpptoml: eliminate compilation; declare noarch
Fixes: #65308

Note: See TracTickets for help on using tickets.