How to solve `Building CXX object src/CMakeFiles/qpidcommon.dir/qpid/sys/posix/Condition.cpp.o` while compiling qpid-cpp within Docker Alpine?

Qpid-cpp has been compiled in a Ubuntu docker image and the current size is 1.86GB:

REPOSITORY          TAG       IMAGE ID       CREATED             SIZE
ubuntu-qpid-cpp     latest    7e60a5eabee1   44 hours ago        1.86 GB


  • How to open port for docker container?
  • Docker build process for javascript frontends with tons of dependencies
  • Make docker use IPv4 for port binding
  • Docker Could not connect to a primary node for replica set #<Moped::Cluster:69840575665060 @seeds=[<Moped::Node resolved_address=“”>]>
  • Automatic Docker stop after running in CentOS [closed]
  • setting up local drone server: Unable to login. Registration is closed
  • To compile qpid-cpp within docker alpine to reduce the disk size of the image


    Some packages that are available in Ubuntu are omitted or different in Alpine, e.g.:


    RUN apt-get update -y && \
        apt-get install -y wget && \
        apt-get install -y build-essential python ruby && \
        apt-get install -y cmake libblkid-dev e2fslibs-dev libboost-all-dev libaudit-dev


    In order to find the substitution packages the Dockerfile was built and when an error occurred the required package that is available in Alpine was added.


    RUN apk update && \
        apk add wget python ruby cmake build-base boost-dev util-linux-dev

    Although most errors were solved, the following issue occurs while compile qpid-cpp within alpine:

    [ 17%] Building CXX object 
    In file included from
    from /qpid-cpp/bld/qpid-cpp-1.36.0/src/qpid/sys/posix/Condition.cpp:22:
    /usr/include/sys/errno.h:1:2: error: #warning redirecting incorrect
    #include <sys/errno.h> to <errno.h> [-Werror=cpp]
     #warning redirecting incorrect #include <sys/errno.h> to <errno.h>
    cc1plus: all warnings being treated as errors
    make[2]: *** [src/CMakeFiles/qpidcommon.dir/build.make:2727: 
    src/CMakeFiles/qpidcommon.dir/qpid/sys/posix/Condition.cpp.o] Error 1
    make[1]: *** [CMakeFiles/Makefile2:1494: src/CMakeFiles/qpidcommon.dir/all] 
    Error 2 make: *** [Makefile:161: all] Error 2
    The command '/bin/sh -c cd qpid-cpp/bld/qpid-cpp-1.36.0 && make all && make 
    install' returned a non-zero code: 2


    How to solve the compilation issue Building CXX object src/CMakeFiles/qpidcommon.dir/qpid/sys/posix/Condition.cpp.o while compiling qpid-cpp within Docker Alpine?

  • GC overhead limit exceeded in Docker when trying to build project by sbt
  • Volumes with docker microsoft/iis
  • Wierd Docker DNS error referencing C file?
  • PHP - how precisely should I define version
  • Using mysql image from docker
  • How to deploy using capistrano without current release symlink?
  • One Solution collect form web for “How to solve `Building CXX object src/CMakeFiles/qpidcommon.dir/qpid/sys/posix/Condition.cpp.o` while compiling qpid-cpp within Docker Alpine?”

    I tried this with Ubuntu and Alpine docker images, and I get the same problem on Alpine. It appears that qpid won’t build on Alpine Linux.

    Be aware that the Ubuntu:16.04 image is 130 MB, 750 MB with dependencies installed. Compared to Alpine’s 5 MB, and 476 MB with dependencies.

    So those 1.86 GB are mostly made up of build dependencies and qpid itself. You won’t be able to escape that with any other image. Maybe you could purge some of the build dependencies after building to decrease the final size.

    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.