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

2018-04-06 Thread Eric Wing
On 4/5/18, Robert Maynard  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


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

2018-04-05 Thread 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  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


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

2018-04-05 Thread Alexander Neundorf
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


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

2018-04-05 Thread Alexander Neundorf
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


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

2018-04-05 Thread 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 > 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/ 


 


    (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


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

2018-04-05 Thread Juan E. Sanchez

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 > 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/


(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


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

2018-04-05 Thread Ben Sferrazza
On Thu, Apr 5, 2018 at 12:30 PM, Alexander Neundorf 
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/
> (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


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

2018-04-05 Thread Alexander Neundorf
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/
(but the docker image didn't build, it was killed by a dockerhub timeout).

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


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

2018-04-05 Thread Alexander Neundorf
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.

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


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

2018-04-05 Thread Juan E. Sanchez

Hello,

SHORT VERSION:

BTW, Ubuntu 12 is officially End of Life on April 28, 2017

http://releases.ubuntu.com/12.04/

So unless you are paying them for support, you should really upgrade to 
Ubuntu 14.


LONG VERSION:

I recommend starting a docker image of centos 6 in a newer version of 
Ubuntu.  This would be a virtual machine environment you can build a 
version with a newer compiler, g++, but with an older glibc.  The 
libstdc++ you link against would then be compatible with most modern 
distributions.


This is by getting the devtoolset-6 or devtoolset-7 tools provided by 
redhat.  You can communicate with me offline on how to do this, but in 
principle the installation of the compiler is this:


yum install -y centos-release-scl
yum install -y devtoolset-6-gcc devtoolset-6-gcc-c++ 
devtoolset-6-libquadmath-devel devtoolset-6-gcc-gfortran


Docker is freely available and used across the open source community to 
build for multiple linux versions.  It can be installed directly from 
ubuntu as a standard package.


You can then package the application, and it would more than likely run 
on your system.


Regards,

Juan

On 4/4/18 10:23 PM, Eric Wing 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


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

2018-04-05 Thread Patrick Griffiths
I had a similar problem on 14.04 and solved it by installing gcc 4.9 (other
version are also available) from the ubuntu-toolchain-r PPA.

This worked for me. YMMV:

$ sudo add-apt-repository ppa:ubuntu-toolchain-r/test
$ sudo apt-get update
$ sudo apt-get install gcc-4.9
$ sudo apt-get install g++-4.9

When building CMake I set the CXX and CC variables at the command line

$ CXX=g++-4.9 CC=gcc-4.9 ../path/to/bootstrap ...etc ..
$ CXX=g++-4.9 CC=gcc-4.9 make install

HTH
Patrick

On Thu, Apr 5, 2018 at 7:15 AM, Robert Maynard 
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
>
> On Thu, Apr 5, 2018 at 3:09 AM, 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.
> >
> > Anyway, CMake seems to already know how to ship binaries that work
> > across Linux distros. I'm pretty sure they just statically linked
> > libstdc++ and libgcc. In fact, I just built it with -static-libstdc++
> > -static-libgcc on a newer Linux and tested it on 12.04 and it seemed
> > to work.
> >
> > But I wanted to know for sure how CMake is building their own binaries
> > in case there are subtle problems with what I did, and they have a
> > completely different way of building it, e.g. statically libmusl for C
> > and libc++ for C++, avoiding gcc entirely.
> >
> > Also, I did not take care of the libssl, libcrypto, and libz
> > dependencies. I'm curious in practice how much trouble these are. (My
> > recollection with zlib is that it is extremely stable and they care a
> > great deal about not breaking backwards compatibility. I don't know
> > about the others.)
> >
> > 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
> --
>
> 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


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

2018-04-05 Thread Robert Maynard
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

On Thu, Apr 5, 2018 at 3:09 AM, 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.
>
> Anyway, CMake seems to already know how to ship binaries that work
> across Linux distros. I'm pretty sure they just statically linked
> libstdc++ and libgcc. In fact, I just built it with -static-libstdc++
> -static-libgcc on a newer Linux and tested it on 12.04 and it seemed
> to work.
>
> But I wanted to know for sure how CMake is building their own binaries
> in case there are subtle problems with what I did, and they have a
> completely different way of building it, e.g. statically libmusl for C
> and libc++ for C++, avoiding gcc entirely.
>
> Also, I did not take care of the libssl, libcrypto, and libz
> dependencies. I'm curious in practice how much trouble these are. (My
> recollection with zlib is that it is extremely stable and they care a
> great deal about not breaking backwards compatibility. I don't know
> about the others.)
>
> 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
-- 

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


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

2018-04-05 Thread Stephen McDowell
Hi Suzuki,

(Note: to other CMake mailing list readers, this pertains very little to CMake 
itself.  I’m sending it to the mailing list so that future users with this 
issue may also have a possible solution).

Getting a newer version of GCC is quite challenging by yourself indeed, but you 
may be interested in the Spack package manager: 
http://spack.readthedocs.io/en/latest/getting_started.html 


It’s designed for high performance computing, but has a special emphasis on 
supporting older distributions (since updating HPC cluster operating systems is 
the devil).

Some quick tips:

1. Once you start installing things, you cannot move the spack directory.  So 
decide where you want it and clone it there.  For example, I keep all of my 
installations in /opt/spack

cd /opt
sudo git clone https://github.com/spack/spack.git

Assuming you are `user` on this system (echo $USER)
sudo chown -R user spack/

Then proceed with the getting started tutorial.

2. You have many possible newer versions of GCC available, by default `spack 
install gcc` installs the newest one.  Run `spack info gcc` to see the versions 
available.  Suppose you installed gcc@6.4.0 (which will as you know take a 
while).  You will want to make this available as a compiler, so you `spack load 
gcc@6.4.0` (it might tell you to source a script, so do that) and run `spack 
compiler find`.  When `spack compiler list` shows your shiny new GCC compiler, 
you can now `spack install cmake %gcc@6.4.0` to use GCC 6.4.0 to compile Cmake! 
 Note you don’t need to install GCC 6.4.0, that was purely an example.  I know 
there have been some issues with really old GCC versions compiling newer 
versions, but I think we fixed the underlying problem that caused that.  AKA my 
hope is this works seamlessly, but you may run into trouble.  If you do, you 
might try installing an older version of GCC (in this example, say 6.4.0 didn’t 
work, maybe try GCC 5.5.0).

I hope this is helpful for you!  There’s a lot more to spack, but if you get 
stuck raise an issue on GitHub.  The spack user community is very helpful and 
friendly to newcomers :)

Good luck!

-Stephen

-- 

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


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

2018-04-05 Thread suzuki toshiya
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".

If you can give the preferred prefix to install gcc-4.8.5 + cmake-3.11.0,
I would be able to a tarball of the binaries. but please prepare
some virus + malware checking :-)

Regards,
mpsuzuki

> Anyway, CMake seems to already know how to ship binaries that work
> across Linux distros. I'm pretty sure they just statically linked
> libstdc++ and libgcc. In fact, I just built it with -static-libstdc++
> -static-libgcc on a newer Linux and tested it on 12.04 and it seemed
> to work.
> 
> But I wanted to know for sure how CMake is building their own binaries
> in case there are subtle problems with what I did, and they have a
> completely different way of building it, e.g. statically libmusl for C
> and libc++ for C++, avoiding gcc entirely.
> 
> Also, I did not take care of the libssl, libcrypto, and libz
> dependencies. I'm curious in practice how much trouble these are. (My
> recollection with zlib is that it is extremely stable and they care a
> great deal about not breaking backwards compatibility. I don't know
> about the others.)
> 
> 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


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

2018-04-05 Thread Eric Wing
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.

Anyway, CMake seems to already know how to ship binaries that work
across Linux distros. I'm pretty sure they just statically linked
libstdc++ and libgcc. In fact, I just built it with -static-libstdc++
-static-libgcc on a newer Linux and tested it on 12.04 and it seemed
to work.

But I wanted to know for sure how CMake is building their own binaries
in case there are subtle problems with what I did, and they have a
completely different way of building it, e.g. statically libmusl for C
and libc++ for C++, avoiding gcc entirely.

Also, I did not take care of the libssl, libcrypto, and libz
dependencies. I'm curious in practice how much trouble these are. (My
recollection with zlib is that it is extremely stable and they care a
great deal about not breaking backwards compatibility. I don't know
about the others.)

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


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

2018-04-04 Thread suzuki toshiya
Dear Bo Zhou,

Thank you for the info! Now I'm checking Ubuntu 12.04 in LXC.
So, gcc-4.8.5 or later would be needed for C++11, it seems that the last version
of gcc officially provided for Ubuntu-12 was 4.7. oh.
According to https://clang.llvm.org/cxx_status.html , clang-3.3 supports C++11,
and the last version of clang officially provided for Ubuntu-12 was 3.4. ooh.
I will check if clang-3.4 for Ubuntu-12.04 can compile cmake (or any other
dependency problems would arise).

> 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.

Indeed.

Regards,
mpsuzuki

Bo Zhou wrote:
> 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 
> > 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
> 
> 
> 

-- 

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


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

2018-04-04 Thread Bo Zhou
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  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
>
-- 

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


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

2018-04-04 Thread Eric Wing
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