getgrav / docker-grav

Official Docker Image for Grav
https://getgrav.org
199 stars 123 forks source link

Fix build using PHP 7.2.20 #14

Closed jakubjosef closed 4 years ago

jakubjosef commented 5 years ago

New image was released for PHP 7.2-apache tag, new version is 7.2.20.

This image contains new version of FreeType 2: libfreetype6:amd64 (2.9.1-3) Previous working version was: libfreetype6:amd64 (2.6.3-3.2) ...

QUICK FIX: You can enforce FROM php:7.2.19-apache image in your Dockerfile.

Error:

checking for FreeType 2... /usr/include/
checking whether to enable JIS-mapped Japanese font support in GD... no
If configure fails try --with-webp-dir=<DIR>
checking for jpeg_read_header in -ljpeg... yes
checking for png_write_image in -lpng... yes
If configure fails try --with-xpm-dir=<DIR>
configure: error: freetype-config not found.
Error: error building at step {Env:[PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin PHPIZE_DEPS=autoconf      dpkg-dev        file        g++         gcc         libc-dev        make        pkg-config      re2c PHP_INI_DIR=/usr/local/etc/php APACHE_CONFDIR=/etc/apache2 APACHE_ENVVARS=/etc/apache2/envvars PHP_EXTRA_BUILD_DEPS=apache2-dev PHP_EXTRA_CONFIGURE_ARGS=--with-apxs2 --disable-cgi PHP_CFLAGS=-fstack-protector-strong -fpic -fpie -O2 PHP_CPPFLAGS=-fstack-protector-strong -fpic -fpie -O2 PHP_LDFLAGS=-Wl,-O1 -Wl,--hash-style=both -pie GPG_KEYS=1729F83938DA44E27BA0F4D3DBDB397470D12172 B1B44D8F021E4E2D6021E995DC9FF8D3EE5AF27F PHP_VERSION=7.2.20 PHP_URL=https://www.php.net/get/php-7.2.20.tar.xz/from/this/mirror PHP_ASC_URL=https://www.php.net/get/php-7.2.20.tar.xz.asc/from/this/mirror PHP_SHA256=eff09da83e235c2ba25c85deea1d4f663bd71d50fd51ad11e1acebe26d733494 PHP_MD5=] Command:run Args:[apt-get update && apt-get install -y         unzip         libfreetype6-dev         libjpeg62-turbo-dev         libpng-dev         libyaml-dev         git     && docker-php-ext-install opcache     && docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/     && docker-php-ext-install -j$(nproc) gd     && docker-php-ext-install zip] Flags:[] Attrs:map[] Message:RUN apt-get update && apt-get install -y         unzip         libfreetype6-dev         libjpeg62-turbo-dev         libpng-dev         libyaml-dev         git     && docker-php-ext-install opcache     && docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/     && docker-php-ext-install -j$(nproc) gd     && docker-php-ext-install zip Original:RUN apt-get update && apt-get install -y         unzip         libfreetype6-dev         libjpeg62-turbo-dev         libpng-dev         libyaml-dev         git     && docker-php-ext-install opcache     && docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/     && docker-php-ext-install -j$(nproc) gd     && docker-php-ext-install zip}: error while running runtime: exit status 1
rioncarter commented 5 years ago

You can also use FROM php:7.2-apache-stretch if you don't want to be pegged to a specific sub-version of PHP

jakubjosef commented 5 years ago

@rioncarter AFAIK this is about version of PHP, not apache.

rioncarter commented 5 years ago

@jakubjosef I updated my comment to better reflect that I was talking about a php base image as opposed to an apache image (lost the colon there and mistakenly mentioned Apache :)).

SimJoSt commented 5 years ago

I build the image and didn't run into any errors. As the error log is quite unspecific about the actual nature or origin of the error, I wouldn't know how to reproduce and debug it.

Does the error still occur on your system? If so, please try and supply a more detailed error log.

jakubjosef commented 5 years ago

@rioncarter AFAIK php 7.2. is a synonym for latest php 7.2. with apache on Debian stretch. So using this tag is also not a fix.

@SimJoSt Unfortunately using local docker it's working for me as well, it's failing just on Gitlab CI/CD runner running on k8s cluster. I tested it again and it still broken using PHP 7.2.20.

I understand it's probably not grav-related problem, it looks like there is some problem with PHP 7.2.20 and freetype 2.9.1-3 - PHP hot see the freetype (build check failed).

rhukster commented 4 years ago

Using php:7.3-apache now