[CMake] How to build CMake so it works on an older Linux?

Bo Zhou bo.schwarzstein at gmail.com
Thu Apr 5 00:05:36 EDT 2018


The latest CMake requires C++11 compiler, so what you need is just a newer
GCC which supports C++11 at your platform, that's it.

Usually the ABI is not the problem but the libstdc++, you can use a old
Ubuntu with old libstdc++ but build CMake with new compiler and make sure
it links with old libstdc++. This is the trick.

I don't know how to do this on Ubuntu, but on CentOS, it's possible to
build CMake in that way, so the CMake would be portable at older CentOS
platform with old libstdc++ .

Good luck.

On Thu, Apr 5, 2018 at 12:23 PM, Eric Wing <ewmailing at gmail.com> wrote:

> I just discovered that CMake no longer builds on my Ubuntu 12.04. I
> need to build binaries that are compatible with that ABI.
>
> I see that your binary distribution of CMake 3.11 still works on
> Ubuntu 12.04. Can you tell me what you do to achieve this? What are
> you doing for your official builds?
>
> Are you just using -static-libstdc++ -static-libgcc for
> CMAKE_CXX_FLAGS, or is there more?
>
> (I just noticed that ldd shows that you don't have dependencies on
> libssl, libcrypto, and libz, whereas I do.)
>
> Thanks,
> Eric
> --
>
> Powered by www.kitware.com
>
> Please keep messages on-topic and check the CMake FAQ at:
> http://www.cmake.org/Wiki/CMake_FAQ
>
> Kitware offers various services to support the CMake community. For more
> information on each offering, please visit:
>
> CMake Support: http://cmake.org/cmake/help/support.html
> CMake Consulting: http://cmake.org/cmake/help/consulting.html
> CMake Training Courses: http://cmake.org/cmake/help/training.html
>
> Visit other Kitware open-source projects at http://www.kitware.com/
> opensource/opensource.html
>
> Follow this link to subscribe/unsubscribe:
> https://cmake.org/mailman/listinfo/cmake
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://cmake.org/pipermail/cmake/attachments/20180405/15970bce/attachment.html>


More information about the CMake mailing list