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


[CMake] cmake build issue with symlinks and dependencies

2018-03-28 Thread Ben Sferrazza
 I'm trying to build libvnc, and I have run into this when building other
source code as well. For some reason cmake errors out when checking the
dependency of a symlinked file, after executing 'cmake --build .'. I'm not
sure I'm even describing that properly. It's best understood by looking at
the below. This is the relevant section of the build.make file.

libvncclient.so.0.9.12: CMakeFiles/vncclient.dir/link.txt
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --bold
--progress-dir=/home/bsferrazza/lfs/sources/libvncserver/build/CMakeFiles
--progress-num=$(CMAKE_PROGRESS_10) "Linking C shared library
libvncclient.so"
$(CMAKE_COMMAND) -E cmake_link_script CMakeFiles/vncclient.dir/link.txt
--verbose=$(VERBOSE)
$(CMAKE_COMMAND) -E cmake_symlink_library libvncclient.so.0.9.12
libvncclient.so.1 libvncclient.so

libvncclient.so.1: libvncclient.so.0.9.12
@$(CMAKE_COMMAND) -E touch_nocreate libvncclient.so.1

libvncclient.so: libvncclient.so.0.9.12
@$(CMAKE_COMMAND) -E touch_nocreate libvncclient.so

And here's the terminal output.

[  1%] Linking C shared library libvncclient.so
/home/tools/bin/cmake -E cmake_link_script CMakeFiles/vncclient.dir/link.txt
--verbose=1
/home/tools/bin/cc -fPIC   -shared -Wl,-soname,libvncclient.so.1 -o
libvncclient.so.0.9.12 CMakeFiles/vncclient.dir/libvncclient/cursor.c.o
CMakeFiles/vncclient.dir/libvncclient/listen.c.o
CMakeFiles/vncclient.dir/libvncclient/rfbproto.c.o
CMakeFiles/vncclient.dir/libvncclient/sockets.c.o
CMakeFiles/vncclient.dir/libvncclient/vncviewer.c.o
CMakeFiles/vncclient.dir/common/minilzo.c.o
CMakeFiles/vncclient.dir/common/turbojpeg.c.o
CMakeFiles/vncclient.dir/libvncclient/tls_gnutls.c.o
CMakeFiles/vncclient.dir/libvncclient/sasl.c.o -lpthread
/home/tools/lib/libgcrypt.so /home/tools/lib/libsasl2.so
/home/tools/lib/libz.so /home/tools/lib/libjpeg.so
/home/tools/lib/libgnutls.so /home/tools/lib/libssl.so
/home/tools/lib/libcrypto.so
/home/tools/bin/cmake -E cmake_symlink_library libvncclient.so.0.9.12
libvncclient.so.1 libvncclient.so
make[2]: *** [CMakeFiles/vncclient.dir/build.make:317: libvncclient.so]
Error 1
make[2]: *** Deleting file 'libvncclient.so'
make[2]: Leaving directory '/nfs/home/bsferrazza/lfs/
sources/libvncserver/build'
make[1]: *** [CMakeFiles/Makefile2:68: CMakeFiles/vncclient.dir/all] Error 2
make[1]: Leaving directory '/nfs/home/bsferrazza/lfs/
sources/libvncserver/build'
make: *** [Makefile:141: all] Error 2

You can see it run the ' cmake -E cmake_symlink_library
libvncclient.so.0.9.12' command and yet it errors out on libvncclient.so.
Oddly, if I then run that same command in the shell, and re-run 'cmake
--build .' it continues just fine. So why was that command not properly
executed within the cmake file?

Thanks,
Ben
-- 

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] failure to build Cmake to / against non-standard directory under Linux

2018-03-02 Thread Ben Sferrazza
I was able to get 3.9.6 to compile setting CMAKE_PREFIX_PATH to the same
path that I pass .bootstrap with --prefix. I also had to patch
the Modules/Compiler/GNU.cmake file to use -idirafter rather than -isystem
as the latter leads to issues with #include_next.

I'm still perplexed why 3.10.2 thinks doesn't think my compiler, GCC 7.3.0,
is C++11 compliant. The only thing I can think of is that I am using a
somewhat older version of Glibc, 2.19, as that is the newest version
compatible with the host's kernel of 2.6.18. However, that glibc was
released in 2014, so I would think that wouldn't be the case.

On Fri, Mar 2, 2018 at 10:04 AM, Ben Sferrazza 
wrote:

> I have a completely insulated boostrapped toolchain+binaries setup
> (located under /home/tools), following much of the Linux From Scratch book,
> that has been able to build everything that I throw at it. Most things
> just work with a simple --prefix option, as I have also edited the GCC
> specs file to include my /home/tools/include directory (using -isystem) and
> link against my /home/tools/lib directory (also with an rpath set, so that
> all binaries I build are complete insulated from the host libraries). The
> lone exception to this is Cmake. It appears to have a lot of hardcoded
> paths in its build environment to standard /usr/* directories.
>
> I first got wind that something was awry when Cmake 3.10.2 claimed my
> compiler, GCC 7.3.0, isn't C++11 compliant. Clearly this isn't the case,
> given that it's the latest release. So I then tried building Cmake 3.9.6,
> which doesn't require C++11, and it was finding zlib and other libraries
> under /usr/lib as opposed to my /home/tools/lib. I don't even have
> LD_LIBRARY_PATH set, as I use rpath in the specs file like I mentioned. Can
> anyone provide any help into how I can get Cmake to build against
> non-standard include and library locations?
>
> Thank you,
> Ben
>
-- 

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] failure to build Cmake to / against non-standard directory under Linux

2018-03-02 Thread Ben Sferrazza
 I have a completely insulated boostrapped toolchain+binaries setup
(located under /home/tools), following much of the Linux From Scratch book,
that has been able to build everything that I throw at it. Most things just
work with a simple --prefix option, as I have also edited the GCC specs
file to include my /home/tools/include directory (using -isystem) and link
against my /home/tools/lib directory (also with an rpath set, so that all
binaries I build are complete insulated from the host libraries). The lone
exception to this is Cmake. It appears to have a lot of hardcoded paths in
its build environment to standard /usr/* directories.

I first got wind that something was awry when Cmake 3.10.2 claimed my
compiler, GCC 7.3.0, isn't C++11 compliant. Clearly this isn't the case,
given that it's the latest release. So I then tried building Cmake 3.9.6,
which doesn't require C++11, and it was finding zlib and other libraries
under /usr/lib as opposed to my /home/tools/lib. I don't even have
LD_LIBRARY_PATH set, as I use rpath in the specs file like I mentioned. Can
anyone provide any help into how I can get Cmake to build against
non-standard include and library locations?

Thank you,
Ben
-- 

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