[CMake] Link to local glibc

Michele Portolan michele.portolan at grenoble-inp.fr
Mon Mar 13 08:02:41 EDT 2017


At the end of the day, here is what I did:

  1) create a development Centos 5.5 machine

  2) on the dev machine, I compiled gcc 4.9.3 from sources, installed it 
locally and updated the build system (cmake, etc..) with only local 
builds, if possible from source. By exploiting LD_LIBRARY_PATH, I link 
to the glibc et al. in the gcc 4.9.3 installation path

  3) I run Cmake on the dev machine, to obtain the executables and libraries

  4) I prepare a distribution with the Cmake-built exe and libs, and in 
case of dynamic linking, the dependecies found by ldd

  5) I unpack the distribution on my target Cento0S 5.5 machine and run 
the execs, if needed using LD_LIBRARY_PATH for the local libs


Quite the workaround, but it works better than manually handling all 
glibc dependencies!


Michele


On 08/03/17 17:57, Chuck Atkins wrote:
>
>     I'll try and see if I can compile a gcc 4.9.3 chain on the CentOS
>     5 machine (I need C++11).
>
> I'd suggest using the devtollset repo from 
> https://people.centos.org/tru/devtools/devtools.repo
>
>     The docker container looks interesting but I haven't used it yet:
>     does it need some specific install on the target machine? I don't
>     have any install rights on the Cento 5.11 machine....
>
>
> I think you misunderstand.  I meant to use a docker container on your 
> Ubuntu machine running CentOS 5 as a development environment.  That 
> way you can use your Ubuntu workstation to build in a CentOS 5 
> environment.
>
> - Chuck
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake/attachments/20170313/dbf76af8/attachment.html>


More information about the CMake mailing list