[Tile-serving] [openstreetmap/osm2pgsql] cmake failed at CentOS7 wihtin docker container (#583)

cogidoo notifications at github.com
Fri May 27 09:34:58 UTC 2016


On my windows-machine I run a docker-container (version 1.11.1) with CentOS Linux release 7.2.1511. 
```
My Dockerfile is:
FROM centos:latest
RUN yum install -y epel-release; yum clean all

# install requirements for osm2pgsql
RUN yum install -y cmake gcc-c++ boost-devel expat-devel zlib-devel bzip2-devel postgresql-devel geos-devel proj-devel proj-epsg lua-devel; yum clean all

# install git
RUN yum install -y git
RUN git config --global url.https://github.com/.insteadOf git://github.com/

# checkout osm2pgsql
RUN mkdir /src
WORKDIR /src
RUN git clone git://github.com/openstreetmap/osm2pgsql.git

CMD ["/bin/bash"]
```
>From there I start the container and manually execute the cmake:
```
[root at e357f253c076]# mkdir /src/osm2pgsql/build && cd /src/osm2pgsql/build
[root at e357f253c076]# cmake ..
```
This fails because of missing values for CMAKE_MAKE_PROGRAM, CMAKE_C_COMPILER_ENV_VAR, CMAKE_C_COMPILER, CMAKE_CXX_COMPILER_ENV_VAR and CMAKE_CXX_COMPILER. So I call cmake with following attributes:
```
[root at e357f253c076]# cmake .. -DCMAKE_MAKE_PROGRAM=/usr/bin/cmake -DCMAKE_C_COMPILER=cc -DCMAKE_CXX_COMPILER=cc -DCMAKE_C_COMPILER_ENV_VAR=CC -DCMAKE_CXX_COMPILER_ENV_VAR=CXX
```
And it fails with:
```
-- The C compiler identification is GNU 4.8.5
-- The CXX compiler identification is GNU 4.8.5
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- broken
CMake Error at /usr/share/cmake/Modules/CMakeTestCCompiler.cmake:61 (message):
  The C compiler "/usr/bin/cc" is not able to compile a simple test program.

  It fails with the following output:

   Change Dir: /src/osm2pgsql/build/CMakeFiles/CMakeTmp



  Run Build Command:/usr/bin/cmake "cmTryCompileExec1632481359/fast"

  CMake Error: The source directory
  "/src/osm2pgsql/build/CMakeFiles/CMakeTmp/cmTryCompileExec1632481359/fast"
  does not exist.

  Specify --help for usage, or press the help button on the CMake GUI.





  CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
  CMakeLists.txt:7 (project)


-- Configuring incomplete, errors occurred!
```
At the README the variable CMAKE_PREFIX_PATH is mentioned. I set it to `/src/osm2pgsql:/src/osm2pgsql/build`, but this has no effect on the output.

What do I miss?

---
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/osm2pgsql/issues/583
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/tile-serving/attachments/20160527/c031fc6e/attachment.html>


More information about the Tile-serving mailing list