New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
mapnik fails to build with ubuntu/debian with scons: building terminated because of errors #4429
Comments
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 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 |
adding CXX_STD=17 might resolve the issue. |
If you are going to use a clone of https://github.com/mapnik/mapnik.git, I might suggest using |
May I suggest updating the build instructions for modern systems. They are very out of date. |
Hi all,
I am trying to build mapnik with ubuntu (LTS and 23.10). Also with debian 12.
All dependencies seem to be installed.
I have no clue what to do in this situation. Anyone an idea what is going on?
The error message is as follows
My Containerfile to reproduce this error is:
image can be build via docker/podman
docker build -t mapnik:latest .
Here is the complete output from the Last RUN section
output.md
The text was updated successfully, but these errors were encountered: