1

After some point, Scrutinizer started permanently failing when trying to analyse Sylius plugins code with next errors:

- sylius/sylius v1.7.3 requires ext-gd * -> the requested PHP extension gd is missing from your system.
- sylius/sylius v1.7.2 requires ext-gd * -> the requested PHP extension gd is missing from your system.
- sylius/sylius v1.7.1 requires ext-gd * -> the requested PHP extension gd is missing from your system.
- sylius/sylius v1.7.0 requires ext-gd * -> the requested PHP extension gd is missing from your system.

Example: https://scrutinizer-ci.com/g/Setono/SyliusPronavicPlugin/inspections/c6ead08f-5fad-405e-b557-9d0adf987c0c

It can't find any of php7.4-gd / php7.0-gd / php-gd packages (I've tried all variants as don't know which Ubuntu is using there) and also it fail if I trying to specify compiler options compile_options: '--enable-gd' (because it looks like rewrite some default options which aren't specified at docs, but required for scrutinizer to run successfully, see https://scrutinizer-ci.com/g/Setono/SyliusPronavicPlugin/inspections/e198ca2c-125d-4d57-b8ef-2314a62c5ecc).

Have someone an idea how to configure Scrutinizer to install ext-gd for php7.4? Official docs is not informative :(

UPD: Looks like Scrutinizer work under old Ubuntu 14.04 (Scrutinizer old Ubuntu 14.04) and there are no php7.4 packages exists for it (googling installing php7.4-gd at ubuntu 14.04 will not give you correct results, so the only way to use ext-gd with php7.4 is provide compile options.

UPD2: See Sam Dark's answer below

Thanks

igormukhingmailcom
  • 465
  • 1
  • 6
  • 9

2 Answers2

1

You need to specify GD flags in compile options:

environment:
        php:
            version: 7.4.14
            compile_options: '--with-config-file-path=/home/scrutinizer/.phpenv/versions/7.4.14/etc --with-config-file-scan-dir=/home/scrutinizer/.phpenv/versions/7.4.14/etc/conf.d --prefix=/home/scrutinizer/.phpenv/versions/7.4.14 --libexecdir=/home/scrutinizer/.phpenv/versions/7.4.14/libexec --enable-intl --with-openssl --enable-gd --with-jpeg-dir=/usr --with-png-dir=/usr --with-freetype-dir=/usr --enable-exif --with-libzip --with-zlib --with-zlib-dir=/usr --with-sodium --with-pdo-sqlite --enable-soap --enable-xmlreader --with-xsl --enable-ftp --with-tidy --with-xmlrpc --enable-sysvsem --enable-sysvshm --enable-sysvmsg --enable-shmop --with-mysqli=mysqlnd --with-pdo-mysql=mysqlnd --enable-pcntl --with-readline --enable-mbstring --with-curl --with-pgsql --with-pdo-pgsql --with-gettext --enable-sockets --with-bz2 --enable-bcmath --enable-calendar --with-libdir=lib --enable-fpm --enable-maintainer-zts --with-gmp --with-kerberos --with-imap --with-imap-ssl --with-apxs2=/usr/bin/apxs --with-ldap --with-pear=/home/scrutinizer/.phpenv/versions/7.4.14/pear'             compile_options: '--with-config-file-path=/home/scrutinizer/.phpenv/versions/7.4.14/etc --with-config-file-scan-dir=/home/scrutinizer/.phpenv/versions/7.4.14/etc/conf.d --prefix=/home/scrutinizer/.phpenv/versions/7.4.14 --libexecdir=/home/scrutinizer/.phpenv/versions/7.4.14/libexec --enable-intl --with-openssl --with-gd --enable-gd --with-jpeg-dir=/usr --with-png-dir=/usr --with-freetype-dir=/usr --enable-exif --with-libzip --with-zlib --with-zlib-dir=/usr --with-sodium --with-pdo-sqlite --enable-soap --enable-xmlreader --with-xsl --enable-ftp --with-tidy --with-xmlrpc --enable-sysvsem --enable-sysvshm --enable-sysvmsg --enable-shmop --with-mysqli=mysqlnd --with-pdo-mysql=mysqlnd --enable-pcntl --with-readline --enable-mbstring --with-curl --with-pgsql --with-pdo-pgsql --with-gettext --enable-sockets --with-bz2 --enable-bcmath --enable-calendar --with-libdir=lib --enable-fpm --enable-maintainer-zts --with-gmp --with-kerberos --with-imap --with-imap-ssl --with-apxs2=/usr/bin/apxs --with-ldap --with-pear=/home/scrutinizer/.phpenv/versions/7.4.14/pear'
Sam Dark
  • 5,291
  • 1
  • 34
  • 52
-1

You need to add ondrej/php repository, update package list and then install php7.4-gd:

sudo add-apt-repository ppa:ondrej/php
sudo apt update
sudo apt-get install php7.4-gd
Dr.X
  • 853
  • 9
  • 15
  • Thanks for the answer, but `ppa:ondrej/php` have packages for Ubuntu 16+ only and not supports Ubuntu 14.04 – igormukhingmailcom May 11 '20 at 21:46
  • @igor_mukhin so what is the solution for 14.04 ? – shamaseen May 22 '20 at 19:43
  • @shamaseen, Solution from UPD section is just theoretical, in practice - compilation fail if you just provide single option. I haven't found a solution and as that took too much time - we think about temporarily remove Scrutinizer from our CI workflow. – igormukhingmailcom May 25 '20 at 09:24
  • 1
    @igor_mukhin oh, I'd like to know if there someone has a solution or how to upgrade to ubuntu 18.04 in Scrutinizer, it has been now 2 days searching for a solution but none actually work. I think I am just going to ignore Scrutinizer and maybe move to Travis or something else. – shamaseen May 25 '20 at 19:21