Get the most out of your Centmin Mod LEMP stack
Become a Member

PHP-FPM PHP 8.1.27 build fails on xxhash

Discussion in 'Install & Upgrades or Pre-Install Questions' started by xsion, Jan 5, 2024.

  1. xsion

    xsion New Member

    7
    1
    3
    Jan 5, 2024
    Ratings:
    +1
    Local Time:
    9:06 PM
    latest
    • CentOS Version: CentOS 7.9.2009 (Core)
    • Centmin Mod Version Installed: 124.00stable
    • Nginx Version Installed: 1.25.3
    • PHP Version Installed: 8.0.30 (as 8.1.27 fails)
    • MariaDB MySQL Version Installed: i.e. 10.3.xx or 10.4.xx or 10.6.xx
    • When was last time updated Centmin Mod code base ? : latest version.
    • Persistent Config: Yes
    • Code (Text):
      MARCH_TARGETNATIVE='n'
      NGINX_SSLCACHE_ALLOWOVERRIDE='y'
      SET_DEFAULT_MYSQLCHARSET='utf8mb4'
      AUTOHARDTUNE_NGINXBACKLOG='y'
      ZSTD_LOGROTATE_NGINX='y'
      ZSTD_LOGROTATE_PHPFPM='y'
      LETSENCRYPT_DETECT='y'
      DUALCERTS='y'
      ACMEDEBUG='y'
      NGINX_LIBBROTLI='y'
      NGXDYNAMIC_BROTLI='y'
      PHP_PGO_ALWAYS='y'
      PHP_PGO='y'
      PHP_BROTLI='y'
      PHP_LZFOUR='y'
      PHP_LZF='y'
      PHP_ZSTD='y'
      PHPFINFO='y'
      NGINX_ZERODT='y'
      DISABLE_TLSONEZERO_PROTOCOL='y'
      

    When trying to build php 8.1.27 it fails and the log do not provide me with a lot of information. no errors during the build process, but fails with this part.
    make[1]: *** [ext/hash/hash_xxhash.lo] Error 1
    make[1]: *** Waiting for unfinished jobs....
    make[1]: Leaving directory `/svr-setup/php-8.1.27/fpm-build'
    make: *** [prof-use] Error 2


    I'll upload the logs in a second.
     
  2. xsion

    xsion New Member

    7
    1
    3
    Jan 5, 2024
    Ratings:
    +1
    Local Time:
    9:06 PM
    latest
  3. eva2000

    eva2000 Administrator Staff Member

    52,657
    12,071
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,597
    Local Time:
    5:06 AM
    Nginx 1.25.x
    MariaDB 10.x
    Does PHP 8.1.27 update if you disable PHP profile guided optimizations (PGO) ?

    Comment them out in persistent config file /etc/centminmod/custom_config.inc and then re-run centmin.sh menu option 5 to update to PHP 8.1.27 and see
    Code (Text):
    #PHP_PGO_ALWAYS='y'
    #PHP_PGO='y'
    

    If that doesn't work, I noticed you have some PHP extensions not loading too, so you can force a recompile of them if also set when recompiling same PHP major version i.e. 8.1 as usually without below variable, PHP extensions only recompile on major PHP version changes i.e. from PHP 8.0 to 8.1 to 8.2 or from 8.1 to 8.0.

    The below variable also recompiles PHP extensions for recompiles of same major versions.
    Code (Text):
    AUTODETECPHP_OVERRIDE='y'
    
     
  4. xsion

    xsion New Member

    7
    1
    3
    Jan 5, 2024
    Ratings:
    +1
    Local Time:
    9:06 PM
    latest
    I've tried with PGO disabled, that didn't make a difference.
    I'll try the autodetecphp now.
    I'm doing the major upgrade from 8.0.30 to 8.1.27
     
  5. eva2000

    eva2000 Administrator Staff Member

    52,657
    12,071
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,597
    Local Time:
    5:06 AM
    Nginx 1.25.x
    MariaDB 10.x
    You can try using GCC 11 instead of GCC 10, setting in persistent config file /etc/centminmod/custom_config.inc BEFORE running centmin.sh menu option 5
    Code (Text):
    DEVTOOLSETTEN='n'
    DEVTOOLSETELEVEN='y'
    
     
  6. xsion

    xsion New Member

    7
    1
    3
    Jan 5, 2024
    Ratings:
    +1
    Local Time:
    9:06 PM
    latest
    Just tried that, unfortunately didn't resolve the issue.
    it's odd as php 8.0 has no problems compiling and all the extensions are properly loading.
     
  7. eva2000

    eva2000 Administrator Staff Member

    52,657
    12,071
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,597
    Local Time:
    5:06 AM
    Nginx 1.25.x
    MariaDB 10.x
    PHP 8.1 added xxhash has support which wasn't available in PHP 8.0 PHP 8.1: xxHash hash algorithms support

    I wonder if it's a bug in Centmin Mod 124.00stable that might have been fixed in Centmin Mod 130.00beta01. You can switch to 130.00beta01 https://community.centminmod.com/threads/centmin-mod-124-00stable-130-00beta01-releases.22673/ as outlined at https://community.centminmod.com/th...table-130-00beta01-releases.22673/#post-92727
    Code (Text):
    cmupdate
    cmupdate update-beta
    cmdir
    centmin
    

    then exit centmin.sh menu and re-run centmin.sh menu option 5
     
  8. xsion

    xsion New Member

    7
    1
    3
    Jan 5, 2024
    Ratings:
    +1
    Local Time:
    9:06 PM
    latest
    tried the beta, same issue, even tried to compile latest php 8.2, same issue.
    tried to compile and older php 8.1.5, this works as expected.
     
  9. eva2000

    eva2000 Administrator Staff Member

    52,657
    12,071
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,597
    Local Time:
    5:06 AM
    Nginx 1.25.x
    MariaDB 10.x
    Oh so PHP 8.1.5 works but PHP 8.1.27 doesn't work ? What about PHP 8.1.25 or 8.1.26 ?
     
  10. eva2000

    eva2000 Administrator Staff Member

    52,657
    12,071
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,597
    Local Time:
    5:06 AM
    Nginx 1.25.x
    MariaDB 10.x
    Oh also check if xxhash is installed on your system
    Code (Text):
    yum -q list xxhash*
    

    Code (Text):
    yum -q list xxhash*
    Installed Packages
    xxhash.x86_64                           0.8.2-1.el7                      @epel
    xxhash-devel.x86_64                     0.8.2-1.el7                      @epel
    xxhash-libs.x86_64                      0.8.2-1.el7                      @epel
    Available Packages
    xxhash-doc.noarch                       0.8.2-1.el7                      epel
    
     
  11. xsion

    xsion New Member

    7
    1
    3
    Jan 5, 2024
    Ratings:
    +1
    Local Time:
    9:06 PM
    latest
    so I've been compiling many versions.
    From 8.1.5 to 8.1.26 failed.
    When I went with steps in between, it has no problems anymore. I'm confused.
    8.1.5 to 8.1.15 to 8.1.20 to 8.1.25 to 8.1.26 seemed to work strangely enough.
     
  12. eva2000

    eva2000 Administrator Staff Member

    52,657
    12,071
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,597
    Local Time:
    5:06 AM
    Nginx 1.25.x
    MariaDB 10.x
    That's a strange one I haven't seen before. Maybe you have network connectivity issues to EPEL repo which has xxhash so previous attempts didn't install xxhash when upgrading to PHP 8.1

    You can check when was xxhash-devel installed or updated by checking yum history
    Code (Text):
    yum -q history list xxhash-devel