Bug #12821

AtoM docker container triggers errors when building on non Linux hosts

Added by Steve Breker about 1 month ago. Updated about 1 month ago.

Status:VerifiedStart date:02/16/2019
Priority:MediumDue date:
Assignee:-% Done:

0%

Category:Docker
Target version:Release 2.5.0
Google Code Legacy ID: Tested version:2.5
Sponsored:No Requires documentation:

Description

AtoM's Dockerfile was specifying:

FROM php:7-fpm-alpine

...which now defaults to installing Alpine with PHP 7.3.x fpm. Memcache will not install correctly from pecl as specified in our Dockerfile under this version of PHP. This issue appears that it could be limited to affecting Windows and Mac hosts and not Linux. I have tested under both Windows 10 Home and macOS Mojave and see the failure to install on both - Radda verified that it was working under Linux for him.

Update the Dockerfile to install Alpine with PHP 7.2.x until this is resolved. Add code to also load libzip library which is necessary under PHP 7.3 but also works for 7.0 and up.


Related issues

Related to Access to Memory (AtoM) - Task #12004: Remove PHP mcrypt installation dependency QA/Review 02/27/2018
Copied to Access to Memory (AtoM) - Bug #12822: AtoM docker container triggers errors when building using... Duplicate 02/16/2019

History

#1 Updated by Steve Breker about 1 month ago

Related info about available packages for alpine 7.3 here:
https://github.com/codecasts/php-alpine/issues/53

Alpine release tags here:
https://hub.docker.com/_/php/

#2 Updated by Steve Breker about 1 month ago

Error that occurs when installing memcache:

creating libtool
appending configuration tag "CXX" to libtool
configure: creating ./config.status
config.status: creating config.h
+ make
/bin/sh /pecl-memcache-NON_BLOCKING_IO_php7/libtool --mode=compile cc -I/usr/local/include/php -I. -I/pecl-memcache-NON_BLOCKING_IO_php7 -DPHP_ATOM_INC -I/pecl-memcache-NON_BLOCKING_IO_php7/include -I/pecl-memcache-NON_BLOCKING_IO_php7/main -I/pecl-memcache-NON_BLOCKING_IO_php7 -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  -DHAVE_CONFIG_H  -g -O2   -c /pecl-memcache-NON_BLOCKING_IO_php7/php7/memcache.c -o php7/memcache.lo 
mkdir php7/.libs
 cc -I/usr/local/include/php -I. -I/pecl-memcache-NON_BLOCKING_IO_php7 -DPHP_ATOM_INC -I/pecl-memcache-NON_BLOCKING_IO_php7/include -I/pecl-memcache-NON_BLOCKING_IO_php7/main -I/pecl-memcache-NON_BLOCKING_IO_php7 -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 -DHAVE_CONFIG_H -g -O2 -c /pecl-memcache-NON_BLOCKING_IO_php7/php7/memcache.c  -fPIC -DPIC -o php7/.libs/memcache.o
/pecl-memcache-NON_BLOCKING_IO_php7/php7/memcache.c: In function 'mmc_find_persistent':
/pecl-memcache-NON_BLOCKING_IO_php7/php7/memcache.c:731:19: error: lvalue required as left operand of assignment
   GC_REFCOUNT(le) = 1;
                   ^
/pecl-memcache-NON_BLOCKING_IO_php7/php7/memcache.c: In function 'php_mmc_pool_addserver':
/pecl-memcache-NON_BLOCKING_IO_php7/php7/memcache.c:789:24: error: lvalue required as increment operand
   GC_REFCOUNT(list_res)++;
                        ^~
/pecl-memcache-NON_BLOCKING_IO_php7/php7/memcache.c: In function 'php_mmc_connect':
/pecl-memcache-NON_BLOCKING_IO_php7/php7/memcache.c:873:24: error: lvalue required as increment operand
   GC_REFCOUNT(list_res)++;
                        ^~
make: *** [Makefile:194: php7/memcache.lo] Error 1
ERROR: Service 'atom' failed to build: The command '/bin/sh -c set -xe         && apk add --no-cache --virtual .phpext-builddeps             gettext-dev             libxslt-dev             libzip-dev             zlib-dev             libmemcached-dev             autoconf             build-base         && docker-php-ext-install             calendar             gettext             mbstring         mysqli             opcache             pdo_mysql             sockets             xsl zip         && docker-php-ext-configure zip --with-libzip         && docker-php-ext-install zip         && curl -Ls https://github.com/websupport-sk/pecl-memcache/archive/NON_BLOCKING_IO_php7.tar.gz | tar xz -C /         && cd /pecl-memcache-NON_BLOCKING_IO_php7         && phpize && ./configure && make && make install         && docker-php-ext-enable memcache         && rm -rf /pecl-memcache-NON_BLOCKING_IO_php7         && apk add --virtual .phpext-rundeps         gettext             libxslt             libmemcached-libs         && apk del .phpext-builddeps' returned a non-zero code: 2
halibut:atom steve$ 

My notes on steps to replicate the issue:

https://docs.google.com/document/d/1LonTzqOC315sQ16OrI_XHZ7WYnTfacnF5jJVxcT03OM/edit?usp=sharing

#3 Updated by Steve Breker about 1 month ago

  • Status changed from In progress to Code Review
  • Assignee changed from Steve Breker to José Raddaoui Marín

#4 Updated by José Raddaoui Marín about 1 month ago

  • Status changed from Code Review to Feedback
  • Assignee changed from José Raddaoui Marín to Steve Breker

#5 Updated by Steve Breker about 1 month ago

  • Copied to Bug #12822: AtoM docker container triggers errors when building using Alpine Linux 7.3.x added

#6 Updated by Steve Breker about 1 month ago

  • Related to Task #12004: Remove PHP mcrypt installation dependency added

#7 Updated by Steve Breker about 1 month ago

  • Status changed from Feedback to QA/Review
  • Assignee changed from Steve Breker to José Raddaoui Marín
  • Tested version 2.5 added

Merged to qa/2.5.x.

Can you give this a test and verify that the container builds correctly for you José?

#8 Updated by José Raddaoui Marín about 1 month ago

  • Status changed from QA/Review to Verified
  • Assignee deleted (José Raddaoui Marín)

It works nicely, thanks Steve!

Also available in: Atom PDF