[MacPorts] #59822: cmake @3.16.1: error: no matching constructor for initialization of 'const std::vector<ExpectedSpec>'
MacPorts
noreply at macports.org
Thu Dec 12 20:38:14 UTC 2019
#59822: cmake @3.16.1: error: no matching constructor for initialization of 'const
std::vector<ExpectedSpec>'
----------------------+------------------------------------
Reporter: letaage | Owner: michaelld
Type: defect | Status: assigned
Priority: High | Milestone:
Component: ports | Version: 2.6.2
Resolution: | Keywords: mountainlion mavericks
Port: cmake |
----------------------+------------------------------------
Comment (by RJVB):
I just built cmake 3.16.1 on 10.9.5; the vector error doesn't occur with
`port:clang-5` (and newer I'd guess, possibly certain older versions too).
Not that that helps during a clean install from source, where you
obviously cannot use a MacPorts clang compiler.
Anyway, I had to apply another patch:
{{{
diff --git Utilities/std/cm/optional Utilities/std/cm/optional
index
80b0951604ef8688f5a27d6b5a8caab2a70fe5cb..304120a6cb7598af2057fd04ff8a6b388c552a50
100644
--- Utilities/std/cm/optional
+++ Utilities/std/cm/optional
@@ -6,9 +6,9 @@
#ifndef cm_optional
#define cm_optional
-#if __cplusplus >= 201703L || (defined(_MSVC_LANG) && _MSVC_LANG >=
201703L)
-# define CMake_HAVE_CXX_OPTIONAL
-#endif
+// #if __cplusplus >= 201703L || (defined(_MSVC_LANG) && _MSVC_LANG >=
201703L)
+// # define CMake_HAVE_CXX_OPTIONAL
+// #endif
#if defined(CMake_HAVE_CXX_OPTIONAL)
# include <optional> // IWYU pragma: export
diff --git Utilities/std/cm/shared_mutex Utilities/std/cm/shared_mutex
index
2ac9447dc7593221b1564490d1aa58493ffa722a..c3419e4509651dcb8b5b3c99d57e5cd47bd7c600
100644
--- Utilities/std/cm/shared_mutex
+++ Utilities/std/cm/shared_mutex
@@ -9,9 +9,9 @@
#if __cplusplus >= 201402L || defined(_MSVC_LANG) && _MSVC_LANG >=
201402L
# define CMake_HAVE_CXX_SHARED_LOCK
#endif
-#if __cplusplus >= 201703L || defined(_MSVC_LANG) && _MSVC_LANG >=
201703L
-# define CMake_HAVE_CXX_SHARED_MUTEX
-#endif
+// #if __cplusplus >= 201703L || defined(_MSVC_LANG) && _MSVC_LANG >=
201703L
+// # define CMake_HAVE_CXX_SHARED_MUTEX
+// #endif
#if defined(CMake_HAVE_CXX_SHARED_LOCK)
# include <shared_mutex> // IWYU pragma: export
}}}
I get a clear message that std::shared_mutex is available only 10.12 and
up (never saw that before!). I'm assuming that the same is true for
std::bad_optional_access so I apply the patch above on `${os.major} <=
15`.
BTW, Michael, you can really speed things up with another tweak, to the
bootstrap script which makes it use the pre-existing cmake command in case
of an upgrade or repeated build:
{{{
diff --git bootstrap bootstrap
index
1f8eaa50394a6f32a0121ef911ca8b7e6f2f2f35..69687faa7b26d9e9ea8c8d623cd28e23ef0224d6
100755
--- bootstrap
+++ bootstrap
@@ -1644,15 +1644,20 @@ fi
echo "---------------------------------------------"
-# Run make to build bootstrap cmake
-if [ "x${cmake_parallel_make}" != "x" ]; then
- ${cmake_make_processor} ${cmake_make_flags}
+if [ -x ${cmake_prefix_dir}/bin/cmake ] ;then
+ # use the existing cmake that we'll be replacing.
+ ln -s ${cmake_prefix_dir}/bin/cmake ${cmake_bootstrap_dir}/cmake
else
- ${cmake_make_processor}
-fi
-RES=$?
-if [ "${RES}" -ne "0" ]; then
- cmake_error 9 "Problem while running ${cmake_make_processor}"
+ # Run make to build bootstrap cmake
+ if [ "x${cmake_parallel_make}" != "x" ]; then
+ ${cmake_make_processor} ${cmake_make_flags}
+ else
+ ${cmake_make_processor}
+ fi
+ RES=$?
+ if [ "${RES}" -ne "0" ]; then
+ cmake_error 9 "Problem while running ${cmake_make_processor}"
+ fi
fi
cd "${cmake_binary_dir}"
}}}
--
Ticket URL: <https://trac.macports.org/ticket/59822#comment:7>
MacPorts <https://www.macports.org/>
Ports system for macOS
More information about the macports-tickets
mailing list