Giter Site home page Giter Site logo

Comments (4)

Jomy10 avatar Jomy10 commented on September 24, 2024

I'm having the same error. I read that it could be something to do with c++17, as I can see in the build commands, the flag -std=c++14 is passed to the C compiler. I think changing to c++17 might fix this?

My Dockerfile is this:

FROM debian

RUN apt-get update
RUN apt-get install -y \
        ca-certificates \
        gnupg \
        lsb-release \
        curl \
        git \
        curl \
        libcurl4 \
        libcurl4-gnutls-dev \
        patch \
        clang \
        make \
        zlib1g \
        zlib1g-dev \
        libffi-dev \
        openssl \
        bzip2 \
        readline-common \
        libreadline8 \
        sqlite3 \
        libsqlite3-dev \
        bash \
        libicu-dev \
        libfreetype-dev \
        libharfbuzz-dev \
        postgresql-15 \
        postgresql-server-dev-15 \
        postgresql-client-15 \
        libpq5 \
        libpq-dev \
        cmake \
        make \
        libtiff-dev \
        libcli11-dev \
        libexpat1-dev \
        npm \
        python3-dev \
        ruby

ENV CC clang
ENV CXX clang++

# Boost
RUN curl -L https://github.com/boostorg/boost/releases/download/boost-1.84.0/boost-1.84.0.tar.xz -o boost.tar.xz
RUN tar -xvf boost.tar.xz
RUN cd boost-1.84.0 && ./bootstrap.sh --prefix=/usr --with-python=python3 --with-toolset=clang
RUN cd boost-1.84.0 && ./b2 install -j$(nproc) threading=multi link=shared toolset=clang

# Postgis
RUN curl https://www.postgresql.org/media/keys/ACCC4CF8.asc | gpg --dearmor | tee /etc/apt/trusted.gpg.d/apt.postgresql.org.gpg >/dev/null
RUN sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list'
RUN echo "Package: *\nPin: release o=apt.postgresql.org\nPin-Priority: 500"  >> /etc/apt/preferences.d/pgdg.pref
RUN apt-get update
RUN apt-get upgrade -y
RUN apt-get install -y postgresql-15-postgis-3

# Python
ENV PYENV_ROOT /root/.pyenv
ENV PATH $PYENV_ROOT/shims:$PYENV_ROOT/bin:$PATH
RUN curl curl https://pyenv.run | bash
RUN pyenv update
RUN pyenv install 3.10
RUN pyenv global 3.10
RUN pyenv rehash
RUN python --version

# Libproj
RUN curl -L https://download.osgeo.org/proj/proj-9.3.1.tar.gz -o proj.tar.gz
RUN tar -xvf proj.tar.gz
RUN cd proj-* && mkdir build && cd build && CC=clang CXX=clang++ cmake -DBUILD_TESTING=OFF .. && cmake --build . && cmake --build . --target install

# Mapnik
RUN git clone https://github.com/mapnik/mapnik.git
RUN cd mapnik && git submodule update --init
RUN cd mapnik && echo "PROJ_INCLUDES = '/usr/local/include:/usr/local/include/proj'" >> config.py && echo "PROJ_LIBS = '/usr/local/lib'" >> config.py && echo "PROJ='yes'" >> config.py
RUN cd mapnik && ruby -e "f = File.read('SConstruct'); i = f.index(\"    if env['PROJ']:\"); es = \"    else:\n        env['SKIPPED_DEPS'].append('proj')\"; e = f.index(es); File.write('SConstruct', f[..i-1] + f[e+1+es.length..])"
RUN cd mapnik && ./configure -Q VERBOSE=1 CC=clang CXX=clang++ && make && make install

from mapnik.

Jomy10 avatar Jomy10 commented on September 24, 2024

adding CXX_STD=17 might resolve the issue.

from mapnik.

hummeltech avatar hummeltech commented on September 24, 2024

If you are going to use a clone of https://github.com/mapnik/mapnik.git, I might suggest using CMake to build Mapnik. As far as I understand, it will be the recommended method (and potentially the only supported one) to build the upcoming 4.x.x releases.

from mapnik.

mkesper avatar mkesper commented on September 24, 2024

May I suggest updating the build instructions for modern systems. They are very out of date.

from mapnik.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.