[CMake] Forcing linking compatability to old libc / libstdc++ (Linux)

Alexander Neundorf a.neundorf-work at gmx.net
Fri Feb 3 15:46:01 EST 2017


On 2017 M02 2, Thu 20:07:29 CET you wrote:
> Hi Gonzalo,
> 
> Using the dockcross/manylinux-x64 docker image should allow to build you
> project out-of-the-box.
> It is based on Centos5, include recent gcc, CMake, Git, etc ...
> 
> See https://github.com/dockcross/dockcross
> 
> In a nutshell,
> 
> # Pull image
> docker pull dockcross/manylinux-x64
> 
> # Generate helper script
> docker run --rm dockcross/manylinux-x64 > dockcross-manylinux-x64
> chmod +x ./dockcross-manylinux-x64
> mv ./dockcross-manylinux-x64 ~/bin/
> 
> # Build your project
> cd /path/to/src
> dockcross cmake -Bbuild -H. -GNinja
> 
> 
> The directory build will then contain the build tree of your project
> compiled using gcc provided by the Centos5 image and link against an old
> glibc.

when docker starts, you are usually root in the container, and if then 
something is built, the files belong to root, and not the user as which you are 
logged in.
How do you handle that ?
I just found a hackish way (a shell script which sets up a user with the same 
numerical ID) to have the same user ID in the container as on the host system. 
Is there a better way ?

Alex



More information about the CMake mailing list