postgis / docker-postgis

Docker image for PostGIS
https://hub.docker.com/r/postgis/postgis/
MIT License
1.37k stars 464 forks source link

Error when build Alpine #254

Open phungxuanvuong opened 3 years ago

phungxuanvuong commented 3 years ago

I build on Docker windows 10

Press Return to acknowledge the previous 6 paragraphs.
/usr/bin/gettextize: line 1309: can't open /dev/tty: No such device or address
+ ./autogen.sh
* Running /usr/bin/libtoolize (2.4.6)
   OPTIONS = --force --copy --install
configure: WARNING:
configure: WARNING:  | You are building using --with-pcredir. This option isn't standard and    |
configure: WARNING:  | might be incompatible with future releases of libpcre.                   |
configure: WARNING:  | You can instead adjust the PKG_CONFIG_PATH environment variable if you   |
configure: WARNING:  | installed software in a non-standard prefix.                             |
configure: WARNING:  | Alternatively, you may set the environment variables PCRE_CFLAGS and     |
configure: WARNING:  | PCRE_LIBS to avoid the need to call pkg-config.                          |
+ nproc
+ make -j8
make: /bin/sh: Operation not permitted
make: /bin/sh: Operation not permitted
make: /bin/sh: Operation not permitted
make: /bin/sh: Operation not permitted
make: /usr/bin/perl: Operation not permitted
make: *** [GNUmakefile:187: postgis_revision.h] Error 127
/usr/bin/perl utils/repo_revision.pl
The command '/bin/sh -c set -eux         && apk add --no-cache --virtual .fetch-deps         ca-certificates         openssl         tar         && wget -O postgis.tar.gz "https://github.com/postgis/postgis/archive/$POSTGIS_VERSION.tar.gz"     && echo "$POSTGIS_SHA256 *postgis.tar.gz" | sha256sum -c -     && mkdir -p /usr/src/postgis     && tar         --extract         --file postgis.tar.gz         --directory /usr/src/postgis         --strip-components 1     && rm postgis.tar.gz         && apk add --no-cache --virtual .build-deps         autoconf         automake         clang-dev         file         g++         gcc         gdal-dev         gettext-dev         json-c-dev         libtool         libxml2-dev         llvm11-dev         make         pcre-dev         perl         proj-dev         protobuf-c-dev           && if   [ $(printf %.1s "$POSTGIS_VERSION") == 3 ]; then             apk add --no-cache --virtual .build-deps-geos geos-dev cunit-dev ;         elif [ $(printf %.1s "$POSTGIS_VERSION") == 2 ]; then             apk add --no-cache --virtual .build-deps-geos cmake git ;             cd /usr/src ;             git clone https://github.com/libgeos/geos.git ;             cd geos ;             git checkout ${POSTGIS2_GEOS_VERSION} -b geos_build ;             mkdir cmake-build ;             cd cmake-build ;                 cmake -DCMAKE_BUILD_TYPE=Release .. ;                 make -j$(nproc) ;                 make check ;                 make install ;             cd / ;             rm -fr /usr/src/geos ;         else             echo ".... unknown PosGIS ...." ;         fi             && cd /usr/src/postgis     && gettextize     && ./autogen.sh     && ./configure         --with-pcredir="$(pcre-config --prefix)"     && make -j$(nproc)     && make install         && mkdir /tempdb     && chown -R postgres:postgres /tempdb     && su postgres -c 'pg_ctl -D /tempdb init'     && su postgres -c 'pg_ctl -D /tempdb start'     && cd regress     && make -j$(nproc) check RUNTESTFLAGS=--extension   PGUSER=postgres     && su postgres -c 'pg_ctl -D /tempdb --mode=immediate stop'     && rm -rf /tempdb     && rm -rf /tmp/pgis_reg     && apk add --no-cache --virtual .postgis-rundeps         gdal         json-c         libstdc++         pcre         proj         protobuf-c      && if [ $(printf %.1s "$POSTGIS_VERSION") == 3 ]; then             apk add --no-cache --virtual .postgis-rundeps-geos geos ;         fi     && cd /     && rm -rf /usr/src/postgis     && apk del .fetch-deps .build-deps .build-deps-geos' returned a non-zero code: 2

F:\learn\databases\timeScaleDb\docker-postgis\13-3.1\alpine>
ImreSamu commented 2 years ago

Hi @QuanJingHong !

make: /bin/sh: Operation not permitted + alpine

based on similar issues it is probably an Alpine 3.14 + faccessat2 issue : https://wiki.alpinelinux.org/wiki/Release_Notes_for_Alpine_3.14.0#faccessat2