[MacPorts] #59782: cmake @3.16.0: error: no matching constructor for initialization of 'const std::vector<ExpectedSpec>'

MacPorts noreply at macports.org
Fri Dec 6 04:42:02 UTC 2019

#59782: cmake @3.16.0: error: no matching constructor for initialization of 'const
  Reporter:  lemzwerg  |      Owner:  michaelld
      Type:  defect    |     Status:  assigned
  Priority:  High      |  Milestone:
 Component:  ports     |    Version:  2.6.99
Resolution:            |   Keywords:  lion
      Port:  cmake     |

Comment (by kencu):

 If some c++ genius comes along, perhaps we can figure out how to change
 the troublesome `<vector>` code to something that `clang-3.4` can
 understand -- AFAICT it is something to do with the default allocator, and
 it was fixed in clang-3.7.

 I did figure out how to better control the `cmake` build using the
 `bootstrap` script, and you can pass in cmake arguments in the normal way
 to the bootstrap cmake that is building the final cmake to be installed.
 That lets you turn off the piece of code that is erroring out, and with
 that, cmake does build and install with clang-3.4, so our current
 bootstrapping will continue to work.

 This little bit does that (and also, with a small bit of work, we could
 fully control the cmake build, and pass in all kinds of different,
 potentially useful, cmake defines that currently aren't able to be used).

 $ diff -u Portfile `port file cmake`
 --- Portfile    2019-12-05 20:34:42.000000000 -0800
 2019-12-05 20:33:27.000000000 -0800
 @@ -122,6 +122,8 @@
  # system libuv is the default as of 20160830 (g320f5)
  depends_lib-append  path:lib/pkgconfig/libuv.pc:libuv

 +configure.cmd ./bootstrap
  configure.env-append \
                      CMAKE_PREFIX_PATH=${prefix} \
                      CMAKE_INCLUDE_PATH=${prefix}/include/ncurses \
 @@ -139,6 +141,7 @@
  # Clang 3.4 works. But Clang 3.7 doesn't work.
  if {${os.platform} eq "darwin" && ${os.major} == 11 &&
 ${configure.cxx_stdlib} eq "libc++"} {
      compiler.whitelist macports-clang-3.4
 +    configure.post_args -- -DBUILD_TESTING=OFF

  platform darwin {
 @@ -173,7 +176,7 @@


  # CMake's configure script doesn't recognize `--host`.
  array set merger_host {i386 {} x86_64 {} ppc {} ppc64 {}}

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

More information about the macports-tickets mailing list