Try Out the Latest GCC with Docker

May 12, 2015

GCC 5.1 was recently released!Following a contributed patch, ITK now builds against GCC 5.1, although there are still some issues to be addressed.

Previously, we wrote about how to use Docker to get easy access to cross-compiling toolchains. GCC also hosts official Docker images, so we can also easily test out new GCC versions. Here are the steps to do an Experimental build of ITK.

docker pull gcc:5.1

cd ~/src/
git clone git://
mkdir -p ~/bin/ITK-build

docker run --rm -it \
  -v ~/src/ITK:/usr/src/ITK:ro \
  -v ~/bin/ITK-build:/usr/src/ITK-build:rw \
cd /usr/src/ITK-build
apt-get update && apt-get install -y cmake
export MAKEFLAGS=-j$(nproc)
cmake ../ITK && ctest -D Experimental


1 Where did GCC 5.0 go? The versioning scheme has changed.

Leave a Reply