[MacPorts] #55280: ceres-solver refuses to build under 10.8

MacPorts noreply at macports.org
Tue Jan 9 03:10:52 UTC 2018


#55280: ceres-solver refuses to build under 10.8
---------------------------+--------------------------
  Reporter:  SchmollTroll  |      Owner:  mamoll
      Type:  defect        |     Status:  assigned
  Priority:  Normal        |  Milestone:
 Component:  ports         |    Version:  2.4.2
Resolution:                |   Keywords:  mountainlion
      Port:  ceres-solver  |
---------------------------+--------------------------

Comment (by kencu):

 This software goes to some considerable lengths to try to control the
 c++11 requirements. See point 9 here <http://ceres-
 solver.org/installation.html#options-controlling-ceres-configuration>.

 The thing that seems to cause the issue building the examples is in
 `examples/CMakeLists.txt`, where it does this:
 {{{
 add_executable(curve_fitting_c curve_fitting.c)
 target_link_libraries(curve_fitting_c ceres)
 # Force CMake to link curve_fitting_c using the C linker, this is
 important
 # when Ceres was compiled using C++11 to ensure that -std=c++11 is not
 passed
 # through.
 set_target_properties(curve_fitting_c PROPERTIES LINKER_LANGUAGE C)
 }}}

 indeed, commenting out that line
 {{{
 # set_target_properties(curve_fitting_c PROPERTIES LINKER_LANGUAGE C)
 }}}

 allows the build to build through without adding `-lc++` to the ldflags.

 It is also possible to just not build the examples and tests, as I notice
 they are not installed anyway. These are controlled with a couple of
 options in the main CMakeLists.txt file.
 {{{
 option(BUILD_TESTING "Enable tests" ON)
 option(BUILD_EXAMPLES "Build examples" ON)
 }}}

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


More information about the macports-tickets mailing list