[MacPorts] #55382: cmake @3.10.0: Cannot find a C++ compiler supporting C++11 on this system
MacPorts
noreply at macports.org
Thu Nov 30 17:10:52 UTC 2017
#55382: cmake @3.10.0: Cannot find a C++ compiler supporting C++11 on this system
-------------------------+-------------------------------------------------
Reporter: ryandesign | Owner: michaelld
Type: defect | Status: new
Priority: High | Milestone:
Component: ports | Version:
Resolution: | Keywords: tiger leopard snowleopard lion
Port: cmake | mountainlion
-------------------------+-------------------------------------------------
Comment (by ryandesign):
Replying to [comment:28 kencu]:
> Sadly, clang-3.7 doesn't understand stdlib=macports-libstdc++, so it
can't build c++11 unless libc++ is used. That requires manual steps.
Yes, I am talking about using libc++.
I made my suggested changes, but cmake is for some reason that I fail to
understand failing to find libc++:
{{{
/opt/local/bin/clang++-mp-3.7 -pipe -Os -stdlib=libc++ -arch x86_64
-isysroot /Developer/SDKs/MacOSX10.6.sdk -mmacosx-version-min=10.6
-Wl,-search_paths_first -Wl,-headerpad_max_install_names -L/opt/local/lib
-Wl,-headerpad_max_install_names -arch x86_64
CMakeFiles/cmTC_53c5f.dir/testCXXCompiler.cxx.o -o cmTC_53c5f
ld: library not found for -lc++
}}}
It is there:
{{{
$ ls -l /usr/lib/libc++.*dylib
-rwxr-xr-x 1 root admin 2312760 Feb 2 2017 /usr/lib/libc++.1.dylib
lrwxr-xr-x 1 root admin 14 Feb 2 2017 /usr/lib/libc++.dylib ->
libc++.1.dylib
}}}
Oh wait, I see it now... it's because it's looking for it in the SDK.
Maybe we should just have the libcxx port also install itself into the
SDK.
> we should not be talking about libc++ really -- all the systems from
10.4 to 10.8 currently get access to c++11 from gcc's libstdc++.
So you would like to force 10.8 and earlier to use gcc6 to build cmake? I
admit I do not understand how this is now possible, since we had
previously thought it to be impossible to reliably exchange objects
between FSF GCC's libstdc++ and Apple GCC's libstdc++. If it is now
possible, I don't understand why we're not always doing that for C++11
support on 10.8 and earlier, and forget about trying to use clang and
libc++ there.
> 10.4 can't build cmake 3.10.0 due to libuv incompatibilities that we may
never figure out. libuv has said they are 10.7+, so we can expect further
troubles there in the future.
I see. That's unfortunate. Can't we
[https://cmake.org/pipermail/cmake/2016-November/064565.html tell cmake
not to use libuv]?
> cmake 3.9.6 should be able to build software that needs cmake for many
years.
Which is why I suggested that the cmake port offer that version to users
of older systems.
> A cmake39 port offers the chance of bootstrapping up to 3.10.x later,
either manually or automatically once we figure out how to do that safely
(per Marcus). It also would be immune to any future changes in the cmake
portfile that Michael might come up that could break cmake 3.9.6.
>
> But we would have years to figure that out, as cmake 3.9.6 will work for
a very long time I think.
>
> If we did this in the cmake PortGroup:
> {{{
> if {${os.version} > 12} {
> depends_build-append path:bin/cmake:cmake
> } else {
> depends_build-append path:bin/cmake:cmake39
> }
> }}}
> and made a cmake39 port, we're done with that for some years.
I explained above why this seems much more complicated and potentially
unreliable, unless we have cmake39 install to a different prefix, such as
/opt/local/libexec/cmake39.
Replying to [comment:29 kencu]:
> except for some older systems that already have cmake installed, I
realize. I can see a situation where some of those will try to upgrade
cmake, and probably fail.
Right; another reason to have the bootstrap port install to a different
location.
--
Ticket URL: <https://trac.macports.org/ticket/55382#comment:30>
MacPorts <https://www.macports.org/>
Ports system for macOS
More information about the macports-tickets
mailing list