wiktorn / Overpass-API

Overpass API docker image
MIT License
134 stars 48 forks source link

Failed to build docker #28

Closed lskrajny closed 4 years ago

lskrajny commented 4 years ago

Trying to build a latest docker image locally with following docker-compose:

overpass:
    container_name: overpass
    build: 0.7.55.7/.
    cpu_shares: 2048
    mem_limit: 4096M
    environment:
        - OVERPASS_META=yes
        - OVERPASS_MODE=init
        - OVERPASS_PLANET_URL=http://download.geofabrik.de/europe/monaco-latest.osm.bz2
        - OVERPASS_DIFF_URL=http://download.openstreetmap.fr/replication/europe/monaco/minute/
        - OVERPASS_RULES_LOAD=10
    ports:
        - 12345:80
    volumes:
        - ~/dump/db/:/db:rw

getting this:

/bin/bash ./libtool --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H -I. -O2 -MT template_db/dispatcher_client.lo -MD -MP -MF $depbase.Tpo -c -o template_db/dispatcher_client.lo template_db/dispatcher_client.cc &&\ mv -f $depbase.Tpo $depbase.Plo libtool: compile: g++ -DHAVE_CONFIG_H -I. -O2 -MT template_db/dispatcher_client.lo -MD -MP -MF template_db/.deps/dispatcher_client.Tpo -c template_db/dispatcher_client.cc -fPIC -DPIC -o template_db/.libs/dispatcher_client.o libtool: compile: g++ -DHAVE_CONFIG_H -I. -O2 -MT template_db/dispatcher_client.lo -MD -MP -MF template_db/.deps/dispatcher_client.Tpo -c template_db/dispatcher_client.cc -o template_db/dispatcher_client.o >/dev/null 2>&1 /bin/bash ./libtool --tag=CXX --mode=link g++ -O2 -o libexpatwrapper.la expat/expat_justparse_interface.lo -lexpat -lrt -lexpat libtool: error: 'expat/expat_justparse_interface.lo' is not a valid libtool object Makefile:1102: recipe for target 'libexpatwrapper.la' failed make[1]: [libexpatwrapper.la] Error 1 make[1]: Waiting for unfinished jobs.... make[1]: Leaving directory '/app/src' Makefile:1873: recipe for target 'install-recursive' failed make: *** [install-recursive] Error 1 ERROR: Service 'overpass' failed to build: The command '/bin/sh -c mkdir -p /app/src && cd /app/src && tar -x -z --strip-components 1 -f ../src.tar.gz && autoscan && aclocal && autoheader && libtoolize && automake --add-missing && autoconf && CXXFLAGS='-O2' CFLAGS='-O2' ./configure --prefix=/app --enable-lz4 && make -j $(grep -c ^processor /proc/cpuinfo) dist install clean && mkdir -p /db/diffs /app/etc && cp -r /app/src/rules /app/etc/rules && rm -rf /app/src /app/src.tar.gz' returned a non-zero code: 2

wiktorn commented 4 years ago

I tried to reproduce this error, so I cleared all images from my docker cache and still I couldn't reproduce this error. Have you tried building on different machine just to rule out hardware problems?

libtool: error: 'expat/expat_justparse_interface.lo' is not a valid libtool object

Look like major problem with compilation objects. You could try to investigate container filesystem to understand what happened.

lskrajny commented 4 years ago

Thanks, side question: what would be the easiest way to completely disable updates in init mode?

wiktorn commented 4 years ago

Just don't set OVERPASS_DIFF_URL, all updates will be skipped.