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

classic Classic list List threaded Threaded
25 messages Options
12
Reply | Threaded
Open this post in threaded view
|

Re: How to build CMake so it works on an older Linux?

Juan E. Sanchez
The example I just sent was for building in centos 6, because 5 is gone.

docker run -it  --name centos6 centos:6 /bin/bash

Regards,

Juan

On 4/5/18 3:13 PM, Juan E. Sanchez wrote:

> Hello,
>
> Centos 5, Redhat 5 is EOL as of March 31, 2017.
>
> Building cmake in docker:
>
> cd /root;
> curl -L -O https://cmake.org/files/v3.11/cmake-3.11.0.tar.gz;
> tar xzvf cmake-3.11.0.tar.gz;
> yum install -y centos-release-scl;
> yum install -y devtoolset-6-gcc devtoolset-6-gcc-c++
> devtoolset-6-libquadmath-devel devtoolset-6-gcc-gfortran;
> source /opt/rh/devtoolset-6/enable;
> cd cmake-3.11.0;
> ./bootstrap --prefix=/root/cmake --parallel=4;
> make -j4;
> make install;
> cd /root;
> tar czvf cmake.tgz;
>
> Please note that cmake will silently ignore features for packages that
> haven't been installed into the image, (ncurses, curl).
>
> Regards,
>
> Juan
>
> On 4/5/18 2:50 PM, Ben Sferrazza wrote:
>>
>>
>> On Thu, Apr 5, 2018 at 12:30 PM, Alexander Neundorf <[hidden email]
>> <mailto:[hidden email]>> wrote:
>>
>>     On 2018 M04 5, Thu 21:24:40 CEST Alexander Neundorf wrote:
>>     > On 2018 M04 5, Thu 16:15:17 CEST suzuki toshiya wrote:
>>     > > Dear Eric,
>>     > >
>>     > > # if anybody think "how C++11 environment should be prepared
>>     > > # on legacy GNU/Linux" is off-topic and should be discussed
>>     > > # in off-list, please let me know. I will do so.
>>     > >
>>     > > Eric Wing wrote:
>>     > > > Thanks for the responses. Yes, I just need this to run on
>> Ubuntu 12.04
>>     > > > (and some other old Linux's in that era). Yes, I think the
>> probably is
>>     > > > the libstdc++ dependency.
>>     > > >
>>     > > > As pointed out, it is really hard to get a newer compiler on
>> Ubuntu
>>     > > > 12.04. I've been down this road before, and if memory
>> serves, the gcc
>>     > > > bootstrapping process to get a newer compiler doesn't seem
>> to work
>>     > > > with a compiler older than gcc 4.8. Same goes for clang,
>> which also
>>     > > > weirdly relies on gcc 4.8 to bootstrap itself.
>>     > >
>>     > > At least, gcc-4.6.3, the last official gcc for Ubuntu-12.04,
>> could
>>     > > build gcc-4.8.5 manually (without shared libstdc++, so confused
>>     > > dependency could be avoided). And, I could build cmake-3.11.0
>> by it.
>>     > > Now I'm checking "make test".
>>     >
>>     > I have recently built a gcc 4.9.5 on Centos 5, i.e. gcc 4.1.
>> There were no
>>     > issues after getting the configure flags right.
>>
>>     4.9.4 I mean.
>>     You can see the flags here:
>>    
>> https://hub.docker.com/r/aneundorf/docker-centos5-build-svn-gcc/~/dockerfile/ 
>>
>>    
>> <https://hub.docker.com/r/aneundorf/docker-centos5-build-svn-gcc/~/dockerfile/>
>>
>>     (but the docker image didn't build, it was killed by a dockerhub
>>     timeout).
>>
>>     Alex
>>
>>
>> Were you able to actually build the newer versions of Cmake that
>> require c++11 on Centos 5? I have built up a bootstrapped toolchain,
>> following much of the guidance found in Linux From Scratch, on a
>> Centos 5 system at work (which unfortunately cannot be upgrade due to
>> the support of legacy software). The toolchain uses the latest gcc
>> 7.3.0, binutils 2.30, and glibc 2.19 (the latest version of glibc
>> supported by the 2.6.18 kernel of Centos 5). Yet cmake complains that
>> my toolchain does not support c++11. Which kernel and glibc version do
>> you have on your Centos 5 box? Thank you.
>>
>>
>

--

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
Reply | Threaded
Open this post in threaded view
|

Re: How to build CMake so it works on an older Linux?

Alexander Neundorf
In reply to this post by Ben Sferrazza
On 2018 M04 5, Thu 12:50:04 CEST Ben Sferrazza wrote:
>
> Were you able to actually build the newer versions of Cmake that require
> c++11 on Centos 5?

I didn't try that.

Alex

--

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
Reply | Threaded
Open this post in threaded view
|

Re: How to build CMake so it works on an older Linux?

Alexander Neundorf
In reply to this post by Juan E. Sanchez
On 2018 M04 5, Thu 15:15:21 CEST Juan E. Sanchez wrote:
> The example I just sent was for building in centos 6, because 5 is gone.

not really gone, it's still in vault.centos.org :-)
https://hub.docker.com/r/aneundorf/centos5-build-base/~/dockerfile/

Alex

--

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
Reply | Threaded
Open this post in threaded view
|

Re: How to build CMake so it works on an older Linux?

Bo Zhou
When use Devtoolset of CentOS, don't forget to install the binutils from that devtoolset, or else, the compilation might generate strange error.

On Fri, Apr 6, 2018 at 6:13 AM, Alexander Neundorf <[hidden email]> wrote:
On 2018 M04 5, Thu 15:15:21 CEST Juan E. Sanchez wrote:
> The example I just sent was for building in centos 6, because 5 is gone.

not really gone, it's still in vault.centos.org :-)
https://hub.docker.com/r/aneundorf/centos5-build-base/~/dockerfile/

Alex

--

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


--

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
Reply | Threaded
Open this post in threaded view
|

Re: How to build CMake so it works on an older Linux?

Eric Wing
In reply to this post by Robert Maynard
On 4/5/18, Robert Maynard <[hidden email]> wrote:
> The official CMake binaries do the same thing as you and build with a
> static libstdc++ and libgcc.
> As far as dependencies we use static builds of those too, with most
> being the version provided inside CMake, and an external openssl.
>
> You can find the more information on the exact flags we are using at:
> https://gitlab.kitware.com/cmake/cmake/blob/master/Utilities/Release/linux64_release.cmake
>

Thank you.
--

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
12