matiasdelellis / facerecognition

Nextcloud app that implement a basic facial recognition system.
GNU Affero General Public License v3.0
510 stars 46 forks source link

Docker Way Installation: Error "configure: error: dlib-1 not found" during "RUN docker-php-ext-install pdlib-master" #764

Open schnillerman opened 2 months ago

schnillerman commented 2 months ago

Expected behaviour

Dlib installs without errors in docker image according to this guide https://github.com/matiasdelellis/facerecognition/wiki/Docker

Actual behaviour

CLI output:

[5/7] RUN docker-php-ext-install pdlib-master;:                                                                    
#0 10.03 fetch https://dl-cdn.alpinelinux.org/alpine/v3.20/main/x86_64/APKINDEX.tar.gz                                
#0 10.38 fetch https://dl-cdn.alpinelinux.org/alpine/v3.20/community/x86_64/APKINDEX.tar.gz                           
#0 11.11 (1/19) Installing m4 (1.4.19-r3)                                                                             
#0 11.14 (2/19) Installing perl (5.38.2-r0)                                                                           
#0 11.98 (3/19) Installing autoconf (2.72-r0)
#0 12.07 (4/19) Installing dpkg-dev (1.22.6-r1)
#0 12.42 (5/19) Installing dpkg (1.22.6-r1)
#0 12.48 (6/19) Installing libmagic (5.45-r1)
#0 12.58 (7/19) Installing file (5.45-r1)
#0 12.60 (8/19) Installing libstdc++-dev (13.2.1_git20240309-r0)
#0 13.85 (9/19) Installing binutils (2.42-r0)
#0 14.88 (10/19) Installing libatomic (13.2.1_git20240309-r0)
#0 14.91 (11/19) Installing isl26 (0.26-r1)
#0 14.97 (12/19) Installing mpfr4 (4.2.1-r0)
#0 15.01 (13/19) Installing mpc1 (1.3.1-r1)
#0 15.03 (14/19) Installing gcc (13.2.1_git20240309-r0)
#0 17.43 (15/19) Installing musl-dev (1.2.5-r0)
#0 17.69 (16/19) Installing g++ (13.2.1_git20240309-r0)
#0 18.50 (17/19) Installing make (4.4.1-r2)
#0 18.54 (18/19) Installing re2c (3.1-r0)
#0 18.74 (19/19) Installing .phpize-deps (20240712.115527)
#0 18.75 Executing busybox-1.36.1-r29.trigger
#0 18.89 OK: 563 MiB in 236 packages
#0 19.74 Configuring for:
#0 19.74 PHP Api Version:         20220829
#0 19.74 Zend Module Api No:      20220829
#0 19.74 Zend Extension Api No:   420220829
#0 23.02 checking for grep that handles long lines and -e... /bin/grep
#0 23.37 checking for egrep... /bin/grep -E
#0 23.37 checking for a sed that does not truncate output... /bin/sed
#0 23.39 checking for pkg-config... /usr/bin/pkg-config
#0 23.39 checking pkg-config is at least version 0.9.0... yes
#0 23.49 checking for cc... cc
#0 23.53 checking whether the C compiler works... yes
#0 23.82 checking for C compiler default output file name... a.out
#0 23.82 checking for suffix of executables... 
#0 23.90 checking whether we are cross compiling... no
#0 24.00 checking for suffix of object files... o
#0 24.07 checking whether the compiler supports GNU C... yes
#0 24.16 checking whether cc accepts -g... yes
#0 24.24 checking for cc option to enable C11 features... none needed
#0 24.39 checking how to run the C preprocessor... cc -E
#0 24.51 checking for egrep -e... (cached) /bin/grep -E
#0 24.51 checking for icc... no
#0 24.54 checking for suncc... no
#0 24.57 checking for system library directory... lib
#0 24.57 checking if compiler supports -Wl,-rpath,... yes
#0 24.64 checking build system type... x86_64-pc-linux-musl
#0 24.65 checking host system type... x86_64-pc-linux-musl
#0 24.65 checking target system type... x86_64-pc-linux-musl
#0 24.78 checking for PHP prefix... /usr/local
#0 24.78 checking for PHP includes... -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib
#0 24.78 checking for PHP extension directory... /usr/local/lib/php/extensions/no-debug-non-zts-20220829
#0 24.78 checking for PHP installed headers prefix... /usr/local/include/php
#0 24.78 checking if debug is enabled... no
#0 24.84 checking if zts is enabled... no
#0 24.87 checking for gawk... no
#0 24.87 checking for nawk... no
#0 24.87 checking for awk... awk
#0 24.87 checking if awk is broken... no
#0 24.87 checking for pdlib support... yes, shared
#0 24.88 checking for g++... g++
#0 24.92 checking whether the compiler supports GNU C++... yes
#0 25.00 checking whether g++ accepts -g... yes
#0 25.06 checking for g++ option to enable C++11 features... none needed
#0 25.30 checking how to run the C++ preprocessor... g++ -E
#0 25.41 checking for pkg-config... checking for pkg-config... /usr/bin/pkg-config
#0 25.41 found
#0 25.41 checking for dlib-1... configure: error: dlib-1 not found
------
failed to solve: executor failed running [/bin/sh -c docker-php-ext-install pdlib-master;]: exit code: 1

Steps to reproduce

Use following Dockerfile for the nextcloud docker app (taken from https://github.com/matiasdelellis/facerecognition/wiki/Docker):

FROM nextcloud:29-fpm-alpine

RUN set -ex; \
    apk add -X http://dl-cdn.alpinelinux.org/alpine/edge/testing dlib;

RUN set -ex; \
    wget https://github.com/goodspb/pdlib/archive/master.zip; \
    mkdir -p /usr/src/php/ext/; \
    unzip -d /usr/src/php/ext/ master.zip; \
    rm master.zip;

RUN docker-php-ext-install pdlib-master;

RUN set -ex; \
    apk add bzip2-dev;

RUN docker-php-ext-install bz2;

Server configuration

Linux Alpine