There is an issue at RTBC status to make D8 at least compatible with PHP 5.6 #2332295: Unicode requirements check not working with PHP 5.6

It stands to reason we need a test container for 5.6.

CommentFileSizeAuthor
#5 travis.yml2.37 KBnick_schuch
#5 console.txt493.86 KBnick_schuch

Comments

ricardoamaro’s picture

Assigned: Unassigned » ricardoamaro
ricardoamaro’s picture

Working on this now

ricardoamaro’s picture

Repos are just being a pain...

Failed to fetch http://http.debian.net/debian/pool/main/n/netcat/netcat_1.10-40_all.deb Cannot initiate the connection to http.debian.net:80 (2a01:4f8:131:152c::42). - connect (101: Network is unreachable) [IP: 2a01:4f8:131:152c::42 80]

I'll connect tomorrow

ricardoamaro’s picture

got some more progress and made the base compatible with phpenv.

Will be back later to try and fix this error:

Step 1 : RUN sudo php-build -i development --pear 5.6.0 $HOME/.phpenv/versions/5.6.0
 ---> Running in 7d9e20bc25cc
[Warning]: Installing Pear alongside of Pyrus is still experimental.
[Info]: Loaded apc Plugin.
[Info]: Loaded pyrus Plugin.
[Info]: Loaded xdebug Plugin.
[Info]: Loaded xhprof Plugin.
[Info]: php.ini-development gets used as php.ini
[Info]: Building 5.6.0 into //.phpenv/versions/5.6.0
[Downloading]: http://php.net/distributions/php-5.6.0.tar.bz2
[Preparing]: /tmp/php-build/source/5.6.0
[Compiling]: /tmp/php-build/source/5.6.0
[Pyrus]: Downloading from http://pear2.php.net/pyrus.phar
[Pyrus]: Installing executable in //.phpenv/versions/5.6.0/bin/pyrus
[XDebug]: Downloading http://xdebug.org/files/xdebug-2.2.5.tgz
[XDebug]: Compiling in /tmp/php-build/source/xdebug-2.2.5

-----------------
|  BUILD ERROR  |
-----------------

Here are the last 10 lines from the log:

-----------------------------------------
/tmp/php-build/source/5.6.0/ext/standard/string.c:5209:13: warning: assignment discards 'const' qualifier from pointer target type [enabled by default]
/tmp/php-build/source/5.6.0/ext/standard/url_scanner_ex.c: In function 'handle_form':
/tmp/php-build/source/5.6.0/ext/standard/url_scanner_ex.c:269:20: warning: initialization discards 'const' qualifier from pointer target type [enabled by default]
/tmp/php-build/source/5.6.0/ext/xsl/xsltprocessor.c: In function 'zif_xsl_xsltprocessor_transform_to_doc':
/tmp/php-build/source/5.6.0/ext/xsl/xsltprocessor.c:672:18: warning: assignment discards 'const' qualifier from pointer target type [enabled by default]
/tmp/php-build/source/5.6.0/main/getopt.c: In function 'php_getopt':
/tmp/php-build/source/5.6.0/main/getopt.c:95:12: warning: assignment discards 'const' qualifier from pointer target type [enabled by default]
/tmp/php-build/source/5.6.0/Zend/zend_string.c: In function 'zend_interned_strings_init':
/tmp/php-build/source/5.6.0/Zend/zend_string.c:65:28: warning: assignment discards 'const' qualifier from pointer target type [enabled by default]
PEAR package PHP_Archive not installed: generated phar will require PHP's phar extension be enabled.
-----------------------------------------

The full Log is available at '/tmp/php-build.5.6.0.20140907233307.log'.
[Warn]: Aborting build.
nick_schuch’s picture

StatusFileSize
new493.86 KB
new2.37 KB

I added a php5.6 container last week with the goal of testing 5.6, 5.5 and 5.4. I am now up to the stage where I can do this. Attached is the output.

ricardoamaro’s picture

That is great work indeed and we saw it. :)
The problem I am dealing here now is to get some of that phpenv logic ported to our containers on drupal-ci, since they are a bit different and are using Debian.
I'll paste more on this later.
Thanks!

ricardoamaro’s picture

PHP takes a lot of time to compile when using phpenv compared to native deb packages install, nevertheless big kudos and attribute authorship to @nick_schuch on http://cgit.drupalcode.org/drupalci_testbot/commit/?id=40680e0
@nick_schuch and everyone else: feel free to contribute using copy on https://github.com/ricardoamaro/drupalci_testbot or via the git repo on D.o.

ricardoamaro’s picture

The command:

php-build -i development --pear 5.6.0 $HOME/.phpenv/versions/5.6.0

on the Dockerfile container for 5.6 fails to build php with this error:

root@32f1fbee9ea1:/# cat /tmp/php-build.5.6.0.20140908182421.log
1 out of 1 hunk FAILED -- saving rejects to file Makefile.rej
/tmp/php-build/source/5.6.0/ext/opcache/ZendAccelerator.c: In function 'accel_use_shm_interned_strings':
/tmp/php-build/source/5.6.0/ext/opcache/ZendAccelerator.c:397:28: warning: assignment discards 'const' qualifier from pointer target type [enabled by default]
/tmp/php-build/source/5.6.0/ext/zlib/zlib.c:1023:2: warning: initialization from incompatible pointer type [enabled by default]
/tmp/php-build/source/5.6.0/ext/zlib/zlib.c:1023:2: warning: (near initialization for 'php_zlib_module_entry.globals_ctor') [enabled by default]
/tmp/php-build/source/5.6.0/ext/curl/interface.c: In function '_php_curl_setopt':
/tmp/php-build/source/5.6.0/ext/curl/interface.c:2639:17: warning: assignment discards 'const' qualifier from pointer target type [enabled by default]
/tmp/php-build/source/5.6.0/ext/curl/interface.c:2642:21: warning: assignment discards 'const' qualifier from pointer target type [enabled by default]
/tmp/php-build/source/5.6.0/ext/curl/interface.c: In function 'zif_curl_getinfo':
/tmp/php-build/source/5.6.0/ext/curl/interface.c:3092:7: warning: call to '_curl_easy_getinfo_err_curl_slist' declared with attribute warning: curl_easy_getinfo expects a pointer to struct curl_slist * for this info [enabled by default]
/tmp/php-build/source/5.6.0/ext/curl/interface.c:3127:9: warning: call to '_curl_easy_getinfo_err_curl_slist' declared with attribute warning: curl_easy_getinfo expects a pointer to struct curl_slist * for this info [enabled by default]
/tmp/php-build/source/5.6.0/ext/curl/interface.c: In function '_php_curl_setopt':
/tmp/php-build/source/5.6.0/ext/curl/interface.c:2707:4: warning: call to '_curl_easy_setopt_err_progress_cb' declared with attribute warning: curl_easy_setopt expects a curl_progress_callback argument for this option [enabled by default]
/tmp/php-build/source/5.6.0/ext/mbstring/libmbfl/filters/mbfilter_iso2022jp_mobile.c:51:2: warning: initialization from incompatible pointer type [enabled by default]
/tmp/php-build/source/5.6.0/ext/mbstring/libmbfl/filters/mbfilter_iso2022jp_mobile.c:51:2: warning: (near initialization for 'mbfl_encoding_2022jp_kddi.aliases') [enabled by default]
/tmp/php-build/source/5.6.0/ext/mbstring/mbstring.c: In function 'php_mb_parse_encoding_list':
/tmp/php-build/source/5.6.0/ext/mbstring/mbstring.c:724:14: warning: assignment discards 'const' qualifier from pointer target type [enabled by default]
/tmp/php-build/source/5.6.0/ext/mbstring/mbstring.c:737:12: warning: assignment discards 'const' qualifier from pointer target type [enabled by default]
/tmp/php-build/source/5.6.0/ext/mcrypt/mcrypt_filter.c: In function 'php_mcrypt_filter_create':
/tmp/php-build/source/5.6.0/ext/mcrypt/mcrypt_filter.c:210:2: warning: passing argument 1 of 'mcrypt_module_open' discards 'const' qualifier from pointer target type [enabled by default]
In file included from /usr/include/mcrypt.h:4:0,
                 from /tmp/php-build/source/5.6.0/ext/mcrypt/mcrypt_filter.c:25:
/usr/include/mutils/mcrypt.h:38:9: note: expected 'char *' but argument is of type 'const char *'
/tmp/php-build/source/5.6.0/ext/phar/phar.c: In function 'phar_split_fname':
/tmp/php-build/source/5.6.0/ext/phar/phar.c:2256:11: warning: assignment discards 'const' qualifier from pointer target type [enabled by default]
/tmp/php-build/source/5.6.0/ext/session/session.c: In function 'ps_srlzr_decode_php_serialize':
/tmp/php-build/source/5.6.0/ext/session/session.c:885:2: warning: passing argument 2 of 'php_var_unserialize' from incompatible pointer type [enabled by default]
In file included from /tmp/php-build/source/5.6.0/ext/session/php_session.h:24:0,
                 from /tmp/php-build/source/5.6.0/ext/session/session.c:42:
/tmp/php-build/source/5.6.0/ext/standard/php_var.h:53:12: note: expected 'const unsigned char **' but argument is of type 'const char **'
/tmp/php-build/source/5.6.0/ext/standard/file.c: In function 'zif_file':
/tmp/php-build/source/5.6.0/ext/standard/file.c:767:11: warning: assignment discards 'const' qualifier from pointer target type [enabled by default]
/tmp/php-build/source/5.6.0/ext/standard/string.c: In function 'php_explode':
/tmp/php-build/source/5.6.0/ext/standard/string.c:1018:5: warning: assignment discards 'const' qualifier from pointer target type [enabled by default]
/tmp/php-build/source/5.6.0/ext/standard/string.c:1026:16: warning: assignment discards 'const' qualifier from pointer target type [enabled by default]
/tmp/php-build/source/5.6.0/ext/standard/string.c: In function 'php_explode_negative_limit':
/tmp/php-build/source/5.6.0/ext/standard/string.c:1045:5: warning: assignment discards 'const' qualifier from pointer target type [enabled by default]
/tmp/php-build/source/5.6.0/ext/standard/string.c:1064:16: warning: assignment discards 'const' qualifier from pointer target type [enabled by default]
/tmp/php-build/source/5.6.0/ext/standard/string.c: In function 'php_stristr':
/tmp/php-build/source/5.6.0/ext/standard/string.c:1629:2: warning: return discards 'const' qualifier from pointer target type [enabled by default]
/tmp/php-build/source/5.6.0/ext/standard/string.c: In function 'zif_strstr':
/tmp/php-build/source/5.6.0/ext/standard/string.c:1781:9: warning: assignment discards 'const' qualifier from pointer target type [enabled by default]
/tmp/php-build/source/5.6.0/ext/standard/string.c:1788:9: warning: assignment discards 'const' qualifier from pointer target type [enabled by default]
/tmp/php-build/source/5.6.0/ext/standard/string.c: In function 'zif_strpos':
/tmp/php-build/source/5.6.0/ext/standard/string.c:1833:9: warning: assignment discards 'const' qualifier from pointer target type [enabled by default]
/tmp/php-build/source/5.6.0/ext/standard/string.c:1843:9: warning: assignment discards 'const' qualifier from pointer target type [enabled by default]
/tmp/php-build/source/5.6.0/ext/standard/string.c: In function 'zif_stripos':
/tmp/php-build/source/5.6.0/ext/standard/string.c:1893:9: warning: assignment discards 'const' qualifier from pointer target type [enabled by default]
/tmp/php-build/source/5.6.0/ext/standard/string.c:1901:9: warning: assignment discards 'const' qualifier from pointer target type [enabled by default]
/tmp/php-build/source/5.6.0/ext/standard/string.c: In function 'php_str_to_str_ex':
/tmp/php-build/source/5.6.0/ext/standard/string.c:3684:26: warning: assignment discards 'const' qualifier from pointer target type [enabled by default]
/tmp/php-build/source/5.6.0/ext/standard/string.c:3696:31: warning: assignment discards 'const' qualifier from pointer target type [enabled by default]
/tmp/php-build/source/5.6.0/ext/standard/string.c:3729:15: warning: assignment discards 'const' qualifier from pointer target type [enabled by default]
/tmp/php-build/source/5.6.0/ext/standard/string.c:3755:27: warning: assignment discards 'const' qualifier from pointer target type [enabled by default]
/tmp/php-build/source/5.6.0/ext/standard/string.c:3772:31: warning: assignment discards 'const' qualifier from pointer target type [enabled by default]
/tmp/php-build/source/5.6.0/ext/standard/string.c: In function 'zif_substr_count':
/tmp/php-build/source/5.6.0/ext/standard/string.c:5209:13: warning: assignment discards 'const' qualifier from pointer target type [enabled by default]
/tmp/php-build/source/5.6.0/ext/standard/url_scanner_ex.c: In function 'handle_form':
/tmp/php-build/source/5.6.0/ext/standard/url_scanner_ex.c:269:20: warning: initialization discards 'const' qualifier from pointer target type [enabled by default]
/tmp/php-build/source/5.6.0/ext/xsl/xsltprocessor.c: In function 'zif_xsl_xsltprocessor_transform_to_doc':
/tmp/php-build/source/5.6.0/ext/xsl/xsltprocessor.c:672:18: warning: assignment discards 'const' qualifier from pointer target type [enabled by default]
/tmp/php-build/source/5.6.0/main/getopt.c: In function 'php_getopt':
/tmp/php-build/source/5.6.0/main/getopt.c:95:12: warning: assignment discards 'const' qualifier from pointer target type [enabled by default]
/tmp/php-build/source/5.6.0/Zend/zend_string.c: In function 'zend_interned_strings_init':
/tmp/php-build/source/5.6.0/Zend/zend_string.c:65:28: warning: assignment discards 'const' qualifier from pointer target type [enabled by default]
PEAR package PHP_Archive not installed: generated phar will require PHP's phar extension be enabled.
nick_schuch’s picture

You will need to look at my "base" and "phpenv" containers to install the dependencies.

ricardoamaro’s picture

All dependencies are already there. The only diference could be on the Ruby version :(
I'll try and see if that's the issue. Still php takes more than 8minutes to compile.

ricardoamaro’s picture

FIXED!!

root@8bb64c6c44e9:/# time CFLAGS="-g" php-build -i development --pear 5.6.0 $HOME/.phpenv/versions/5.6.0
[Warning]: Installing Pear alongside of Pyrus is still experimental.
[Info]: Loaded apc Plugin.
[Info]: Loaded pyrus Plugin.
[Info]: Loaded xdebug Plugin.
[Info]: Loaded xhprof Plugin.
[Info]: php.ini-development gets used as php.ini
[Info]: Building 5.6.0 into //.phpenv/versions/5.6.0
[Downloading]: http://php.net/distributions/php-5.6.0.tar.bz2
[Preparing]: /tmp/php-build/source/5.6.0
[Compiling]: /tmp/php-build/source/5.6.0
[Pyrus]: Downloading from http://pear2.php.net/pyrus.phar
[Pyrus]: Installing executable in //.phpenv/versions/5.6.0/bin/pyrus
[XDebug]: Downloading http://xdebug.org/files/xdebug-2.2.5.tgz
[XDebug]: Compiling in /tmp/php-build/source/xdebug-2.2.5
[XDebug]: Installing XDebug configuration in //.phpenv/versions/5.6.0/etc/conf.d/xdebug.ini
[XDebug]: Cleaning up.
[Info]: Enabling Opcache...
[Info]: Done
config-set succeeded
config-set succeeded
[Info]: The Log File is not empty, but the Build did not fail. Maybe just warnings got logged. You can review the log in /tmp/php-build.5.6.0.20140909134046.log
[Success]: Built 5.6.0 successfully.

real	7m39.422s
user	5m18.845s
sys	2m25.923s

Still takes 7 minutes, but we can probably live with that...
ping @jthorson

ricardoamaro’s picture

I've cleaned up a lot of stuff from the Dockerfiles after this fix and going to commit the results in a few minutes.
We had minutes of performance gain, ~170MB size reduction on the web_base container and some more space reduction on the other containers.

  • ricardoamaro committed c95de11 on master
    #2334471 PHP 5.6 Test Container + performance improvements and size...
ricardoamaro’s picture

Last test to see if all is running on php5.6 using a DrupalCI config file:

~/repos/drupalci_testbot$ cat ~/.drupalci/config
# DrupalCI config definitions file

DCI_DBTYPE='mysql' 
DCI_DBVER='5.5' 
DCI_PHPVERSION='5.6' 
DCI_TESTGROUPS='Bootstrap,Action'
DCI_DRUPALBRANCH='8.0.x'  
DCI_RUNSCRIPT="php ./core/scripts/run-tests.sh --php /usr/bin/php --url 'http://localhost' --color --concurrency 4  --xml '/var/workspace/results'"
DCI_PATCH="https://www.drupal.org/files/issues/remove-language_list-2328293-9.patch,."
ricardoamaro’s picture

PHP 5.6 testing supported

~/repos/drupalci_testbot$ sudo ./run.sh 
Sourcing your default variables from /home/ricardo/.drupalci/config 
------------------------------------------------------------------------------
Containers: web-5.6 and drupaltestbot-db-mysql-5.5 available
Running PHP5.6/mysql on drupalci/web-5.6 at Wed Sep 10 00:51:38 UTC 2014
------------------------------------------------------------------------------
Local Drupal repo found on /home/ricardo/testbotdata/drupal/
Local Drush found on /home/ricardo/testbotdata/vendor/drush/drush/drush
Cloning into '/home/ricardo/testbotdata/build_2014_09_10_015138'...
done.
Checking out files: 100% (10712/10712), done.
Already on '8.0.x'
Your branch is up-to-date with 'origin/8.0.x'.

NOTICE: $DCI_DEPENDENCIES has no modules declared...

NOTICE: $DCI_DEPENDENCIES_GIT has nothing declared...

NOTICE: $DCI_DEPENDENCIES_TGZ has nothing declared...

Applying Patch: https://www.drupal.org/files/issues/remove-language_list-2328293-9.patch
patch: unified diff output, ASCII text
Checking patch core/includes/bootstrap.inc...
Checking patch core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php...
Checking patch core/lib/Drupal/Core/Session/UserSession.php...
Checking patch core/modules/content_translation/src/ContentTranslationHandler.php...
Checking patch core/modules/language/src/Form/LanguageDeleteForm.php...
Checking patch core/modules/language/src/Form/LanguageEditForm.php...
Checking patch core/modules/language/src/Form/NegotiationBrowserForm.php...
Checking patch core/modules/language/src/Form/NegotiationUrlForm.php...
Checking patch core/modules/language/src/Plugin/Condition/Language.php...
Checking patch core/modules/locale/src/Form/TranslateEditForm.php...
Checking patch core/modules/locale/src/Form/TranslateFormBase.php...
Checking patch core/modules/node/src/Plugin/views/field/Node.php...
Checking patch core/modules/user/src/Entity/User.php...
Checking patch core/modules/user/src/Plugin/views/field/Language.php...
Applied patch core/includes/bootstrap.inc cleanly.
Applied patch core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php cleanly.
Applied patch core/lib/Drupal/Core/Session/UserSession.php cleanly.
Applied patch core/modules/content_translation/src/ContentTranslationHandler.php cleanly.
Applied patch core/modules/language/src/Form/LanguageDeleteForm.php cleanly.
Applied patch core/modules/language/src/Form/LanguageEditForm.php cleanly.
Applied patch core/modules/language/src/Form/NegotiationBrowserForm.php cleanly.
Applied patch core/modules/language/src/Form/NegotiationUrlForm.php cleanly.
Applied patch core/modules/language/src/Plugin/Condition/Language.php cleanly.
Applied patch core/modules/locale/src/Form/TranslateEditForm.php cleanly.
Applied patch core/modules/locale/src/Form/TranslateFormBase.php cleanly.
Applied patch core/modules/node/src/Plugin/views/field/Node.php cleanly.
Applied patch core/modules/user/src/Entity/User.php cleanly.
Applied patch core/modules/user/src/Plugin/views/field/Language.php cleanly.
Done!

------------------------ ENVIRONMENT VARIABLES IN USE ------------------------
DCI_IDENTIFIER="build_2014_09_10_015138"
DCI_DRUPALBRANCH="8.0.x"
DCI_DRUPALVERSION="8"
DCI_UPDATEREPO="false"
DCI_REPODIR="/home/ricardo/testbotdata"
DCI_DRUPALREPO="http://git.drupal.org/project/drupal.git"
DCI_DRUSHREPO="https://github.com/drush-ops/drush.git"
DCI_BUILDSDIR="/home/ricardo/testbotdata"
DCI_WORKSPACE="/home/ricardo/testbotdata/build_2014_09_10_015138/"
DCI_DEPENDENCIES=""
DCI_DEPENDENCIES_GIT=""
DCI_DEPENDENCIES_TGZ=""
DCI_MODULESPATH="./modules"
DCI_PATCH="https://www.drupal.org/files/issues/remove-language_list-2328293-9.patch,."
DCI_DBUSER="drupaltestbot"
DCI_DBPASS="drupaltestbotpw"
DCI_DBTYPE="mysql"
DCI_DBVER="5.5"
DCI_DBCONTAINER="drupaltestbot-db-mysql-5.5"
DCI_DBLINK="--link=drupaltestbot-db-mysql-5.5:db"
DCI_CMD=""
DCI_INTERACTIVE=""
DCI_INSTALLER="none"
DCI_VERBOSE="false"
DCI_PHPVERSION="5.6"
DCI_CONCURRENCY="4"
DCI_RUNSCRIPT="php ./core/scripts/run-tests.sh --php /usr/bin/php --url 'http://localhost' --color --concurrency 4  --xml '/var/workspace/results'"
DCI_TESTGROUPS="Bootstrap,Action"
VERBO=""

------------------------ STARTING DOCKER CONTAINER ---------------------------
Operation [start]...
Starting apache2 service

DCI_DRUPALVERSION is 8
Skipping operation [install], using core tester instead...

Operation [run tests]...
export TERM=linux && cd /var/www && php ./core/scripts/run-tests.sh --php /usr/bin/php --url 'http://localhost' --color --concurrency 4  --xml '/var/workspace/results' --sqlite /var/www/test.sqlite --dburl mysql://drupaltestbot:drupaltestbotpw@172.17.1.108/build_2014_09_10_015138 --keep-results Bootstrap,Action | tee /var/www/test.stdout

Drupal test run
---------------

Tests to be run:
  - Drupal\system\Tests\Bootstrap\GetFilenameUnitTest
  - Drupal\system\Tests\Bootstrap\PageCacheTest
  - Drupal\system\Tests\Bootstrap\ResettableStaticUnitTest
  - Drupal\system\Tests\Action\ActionUnitTest

Test run started:
  Wednesday, September 10, 2014 - 00:51

Test summary
------------

Drupal\system\Tests\Bootstrap\GetFilenameUnitTest              7 passes                                      
Drupal\system\Tests\Bootstrap\ResettableStaticUnitTest         5 passes                                      
Drupal\system\Tests\Bootstrap\PageCacheTest                    0 passes             1 exceptions             
Drupal\system\Tests\Action\ActionUnitTest                     15 passes                                      

Test run duration: 14 sec


Notice: Undefined offset: 1 in /var/www/core/scripts/run-tests.sh on line 941

Call Stack:
    0.0032     406224   1. {main}() /var/www/core/scripts/run-tests.sh:0
   19.6442  204202904   2. simpletest_script_reporter_write_xml_results() /var/www/core/scripts/run-tests.sh:92

real 20.92
user 0.01
sys 0.01

Saving image build_2014_09_10_015138 at Wed Sep 10 00:52:03 UTC 2014:
ec60383da44f50494e52ada34d8b3ec002e88c9709b06925e1bc0a3052438c15
------------------------------------------------------------------------------
Results directory: /home/ricardo/testbotdata/build_2014_09_10_015138/results/
Make sure to clean up old Builds on /home/ricardo/testbotdata to save disk space
------------------------------------------------------------------------------
Docker run command:
/usr/bin/time -p docker run --link=drupaltestbot-db-mysql-5.5:db --name=build_2014_09_10_015138 -v=/home/ricardo/testbotdata/build_2014_09_10_015138/:/var/workspace:rw -v=/home/ricardo/testbotdata/build_2014_09_10_015138/:/var/www:rw -p 80  -t drupalci/web-5.6 
ricardoamaro’s picture

Status: Active » Fixed
cilefen’s picture

@ricardoamaro You are fast!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.