Blogs

Docker images for XL C/C++ for Linux, Community Edition are now available

By Archive User posted Tue July 12, 2016 12:12 PM

  

Originally posted by: Ray Kivisto


The XL C/C++ for Linux, Community Edition compiler is now available as a Docker image, you can find it at:
    https://hub.docker.com/r/ibmcom/xlc-ce/*
For the details how this image was built, see:
    https://github.com/IBM/xlc-community-edition-dockerfile

To run this image interactively:
    docker run -ti ibmcom/xlc-ce

The entrypoint is a script that will interactively display the license text and then configure the compiler.
To automatically accept the license, add "-e LICENSE=accept" to your run command:
    docker run -ti -e LICENSE=accept ibmcom/xlc-ce

Here is an example of using make to build an application at optimization level 3 (-O3), and then running it, in non-interactive mode:
    docker run -e LICENSE=accept -v /home/user/source:/source --workdir /source ibmcom/xlc-ce bash -cx 'make CC=xlc CFLAGS=-O3 CXX=xlC CXXFLAGS=-O3 hello && ./hello'  
    + make CC=xlc CFLAGS=-O3 CXX=xlC CXXFLAGS=-O3 hello  
    xlC -O3    hello.cpp   -o hello  
    + ./hello  
    Hello C++ World!

For more details about the XL C/C++ for Linux, Community Edition compiler, see:
 A must-have for Power developers: XL C/C++ for Linux, V13.1.4 with the no-charge, unlimited license for production use Community Edition

 

*This link was originally https://hub.docker.com/r/ppc64le/xlc-ce/, but as of Sept 2017, we have moved from ppc64le to the ibmcom organization. Our ppc64le images will be removed soon, and when they are, anyone using them will notice their automated builds fail until they switch over.

0 comments
4 views

Permalink