Author Topic: Unable to compile ANY version with PHP Switcher and Selector / FPM selector  (Read 1057 times)

0 Members and 1 Guest are viewing this topic.

Offline
*
Hello,
just upgraded my CWP version to Pro to be able to switch easy between php versions.
On first installation - some time ago - i decided for php version 7.4.33 for compatibily reasons.

Now i wanted to install new sub-domain for a service which requires php >8.2.

After upgrading to pro, i tried to compile with the php selector version 8.2.28 - not working , also i can not compile a fpm version.

Then i tried to change the main version from 7.4.33 to 8.2 - it compiles (like the selectors did) with the end message


Code: [Select]
Build Completed
###################


Error:Can't add notification!


Also some errors in the log:

Code: [Select]
Package openldap-devel-2.4.46-21.el8_10.x86_64 is already installed.
Error: Unable to find a match: compat-openldap openldap-servers-sql
ln: failed to create symbolic link '/usr/lib/libldap.so': File exists
ln: failed to create symbolic link '/usr/lib/libldap_r.s': File exists


checking for BZ2_bzerror in -lbz2... no
configure: error: bz2 module requires libbz2 >= 1.0.0
make: *** No targets specified and no makefile found. Stop.
make: *** No rule to make target 'install'. Stop.
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory


checking target system type... x86_64-pc-linux-gnu
configure: error: Cannot find php-config. Please use --with-php-config=PATH
make: *** No targets specified and no makefile found. Stop.
make: *** No rule to make target 'install'. Stop.
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory


Package ImageMagick-perl-6.9.13.25-1.el8.x86_64 is already installed.
Dependencies resolved.
Nothing to do.
Complete!
chdir: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
Cloning into 'imagick'...
/usr/local/cwpsrv/htdocs/resources/conf/el8/php_selector/external_modules/8.2/imagick.sh: line 8: /opt/alt/php82/usr/bin/phpize: No such file or directory
ln: failed to create symbolic link '/usr/local/include/ImageMagick': File exists
/usr/local/cwpsrv/htdocs/resources/conf/el8/php_selector/external_modules/8.2/imagick.sh: line 10: ./configure: No such file or directory
cat clean.sh >clean
chmod a+x clean
make: *** No targets specified and no makefile found. Stop.
make: *** No rule to make target 'install'. Stop.

I am running CWP Pro on AlmaLinux8 - everything updated all the time.
I contacted the support why i can not compile ANY other version - someone tried to solve it, but it did not work.
Now they want me to pay for support - for getting what i am paying for the pro version...

Offline
*
I am seeing the same thing, and been pulling my hair out on this (cuz just realize the php patch level was way behind).

Note the "Error:Can't add notification!" is more cosmetic. if you go to your cpanel web admin, click on the bell to display notifications, and remove them (or just the php related ones), that error will go away.

As for solving the problem, for the php-selector one so far I did find a work around, that is dumb, but whatever.

- Start the build process via the UI
- in a terminal window to the server, cd to /usr/local/src
- copy the php-rebuild.sh to some place else (don't delete, just cp)
- once the build process completes (and fails), on a terminal window
- cd /usr/local/src
- cp php-rebuild.sh  to the /usr/local/src directory (since the UI build process removes it)
- now do a "sh php-rebuild.sh"

For some reason, if you run it that way, it works. But running from the UI it does not. I suspect the UI is not doing the "cd /usr/local/src" before running it.

Offline
*****
That is exactly what crouso discovered and reported privately to me in a personal message. I posted it to the other thread he had on the topic, but not this one. He cleaned out and then watched the /usr/local/src directory during the build process, captured the downloaded files, then ran the scripts from the CLI and was able to successfully install PHP 8.2.

Offline
*
Re: Unable to compile ANY version with PHP Switcher and Selector / FPM selector
« Reply #3 on: September 04, 2025, 10:08:42 PM »
Unable to update from PHP 7.4 to PHP 8.0, PHP 8.1, PHP 8.2, PHP 8.3

Quote from: Server cfg
Apache version: Apache/2.4.65
PHP version: 7.4.33
MySQL version: 10.5.27-MariaDB
FTP version: 1.0.52
SSH Port: 22
MySql Port: 3306
Web Servers: apache-only
CPU Model: Intel Core Processor (Broadwell, no TSX, IBRS)
CPU Details: 4 Core (2200 MHz)
Distro Name: AlmaLinux release 9.6 (Sage Margay)
Kernel Version: 5.14.0-570.21.1.el9_6.x86_64
Platform: x86_64 kvm

Quote from: tail /var/log/php-rebuild.log
php-autoupdate.log        php-dependencies.log      php-rebuild.log           php-selector-rebuild.log
[root@vmi2415107 src]# tail /var/log/php-rebuild.log
acme.sh               build-dir/            libavif-0.11.1.zip    mcrypt-1.0.4.tgz      php_switch_pre.conf
apache-rebuild.sh     cwp-el9-latest        libsodium-2.0.23/     package.xml           uploadprogress-2.0.2/
apcu-5.1.19/          imagick/              libsodium.tgz         pcre2-10.39/          uploadprogress.tgz
apcu-5.1.19.tgz       libavif-0.11.1/       mcrypt-1.0.4/         pcre2.zip
[root@vmi2415107 src]# tail /var/log/php-rebuild.log

See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------

Build complete.
Don't forget to run 'make test'.

Installing shared extensions:     /usr/local/lib/php/extensions/no-debug-non-zts-20190902/

[root@vmi2415107 src]# tail /var/log/php-rebuild.log  -n 50
checking if cc supports -c -o file.o... yes
checking whether the cc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... no

creating libtool
appending configuration tag "CXX" to libtool
configure: patching config.h.in
configure: creating ./config.status
config.status: creating config.h
/bin/sh /usr/local/src/libsodium-2.0.23/libtool --mode=compile cc  -I. -I/usr/local/src/libsodium-2.0.23 -DPHP_ATOM_INC -I/usr/local/src/libsodium-2.0.23/include -I/usr/local/src/libsodium-2.0.23/main -I/usr/local/src/libsodium-2.0.23 -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 /usr/local/src/libsodium-2.0.23/libsodium.c -o libsodium.lo
mkdir .libs
 cc -I. -I/usr/local/src/libsodium-2.0.23 -DPHP_ATOM_INC -I/usr/local/src/libsodium-2.0.23/include -I/usr/local/src/libsodium-2.0.23/main -I/usr/local/src/libsodium-2.0.23 -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 /usr/local/src/libsodium-2.0.23/libsodium.c  -fPIC -DPIC -o .libs/libsodium.o
/bin/sh /usr/local/src/libsodium-2.0.23/libtool --mode=link cc -DPHP_ATOM_INC -I/usr/local/src/libsodium-2.0.23/include -I/usr/local/src/libsodium-2.0.23/main -I/usr/local/src/libsodium-2.0.23 -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    -o sodium.la -export-dynamic -avoid-version -prefer-pic -module -rpath /usr/local/src/libsodium-2.0.23/modules  libsodium.lo -lsodium
cc -shared  .libs/libsodium.o  -lsodium  -Wl,-soname -Wl,sodium.so -o .libs/sodium.so
creating sodium.la
(cd .libs && rm -f sodium.la && ln -s ../sodium.la sodium.la)
/bin/sh /usr/local/src/libsodium-2.0.23/libtool --mode=install cp ./sodium.la /usr/local/src/libsodium-2.0.23/modules
cp ./.libs/sodium.so /usr/local/src/libsodium-2.0.23/modules/sodium.so
cp ./.libs/sodium.lai /usr/local/src/libsodium-2.0.23/modules/sodium.la
PATH="$PATH:/sbin" ldconfig -n /usr/local/src/libsodium-2.0.23/modules
----------------------------------------------------------------------
Libraries have been installed in:
   /usr/local/src/libsodium-2.0.23/modules

If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the `-LLIBDIR'
flag during linking and do at least one of the following:
   - add LIBDIR to the `LD_LIBRARY_PATH' environment variable
     during execution
   - add LIBDIR to the `LD_RUN_PATH' environment variable
     during linking
   - use the `-Wl,--rpath -Wl,LIBDIR' linker flag
   - have your system administrator add LIBDIR to `/etc/ld.so.conf'

See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------

Build complete.
Don't forget to run 'make test'.

Installing shared extensions:     /usr/local/lib/php/extensions/no-debug-non-zts-20190902/

Offline
*****
Re: Unable to compile ANY version with PHP Switcher and Selector / FPM selector
« Reply #4 on: September 05, 2025, 01:03:48 PM »
Clearly seems to be a bug on some systems. Do note that EL9 support is still in beta, so you will uncover some bugs. Did you try the workaround above -- capturing the downloaded php-rebuild.sh script and running it from the CLI?
(You should definitely update your MariaDB version to 10.11 or 11.4 LTS versions, by the way...)

Offline
*
Re: Unable to compile ANY version with PHP Switcher and Selector / FPM selector
« Reply #5 on: September 12, 2025, 08:28:11 PM »
Studying the php-dependencies.sh file with Grok, It came up with:

... but the original script was failing due to the powertools repository not existing in AlmaLinux 9. I replaced all powertools references with crb (CodeReady Builder), which is the equivalent for AlmaLinux 9. Additionally, the checkinstall package wasn't found in the default repositories, so I added a step to install it from source. ...

PS: checkinstall is non-existant in AlmaLinux 9 el9

Offline
*****
Re: Unable to compile ANY version with PHP Switcher and Selector / FPM selector
« Reply #6 on: September 12, 2025, 09:10:25 PM »
Interesting -- I've only heard of it failing on EL8 up to this point (an AlmaLinux 8 system and a CentOS 8 Stream system). So your experience opens the door to there being unmet dependencies in EL9 distributions (AlmaLinux), whereas that hasn't been the experience of Starburst. So it must be dependent on how the system was installed/configured. Did you install with an ISO (boot, minimal, DVD) or with a host-provided image?

Offline
*
Re: Unable to compile ANY version with PHP Switcher and Selector / FPM selector
« Reply #7 on: September 12, 2025, 10:58:02 PM »
It was installed with host provided image afaik:

Code: [Select]
Almalinux-9 Linux AlmaLinux 9 9 506 MB Feb 24, 2023
Clean bare setup with RTFM of CWP and all new freshly installed CWP.
Had prior issues with i guess amavisd or something like that (was not mentioned in the RTFM of CWP that amavisd must be installed BEFORE CWP (doh!)

Offline
*
Checking out logs I came across with:

Code: [Select]
checking for BZip2 support... yes
checking for BZ2_bzerror in -lbz2... no
configure: error: bz2 module requires libbz2 >= 1.0.0

I also see errors like:

Code: [Select]
rpm: -Ivh: unknown option
should'nt this be rpm -ivh?

Offline
*****
AlmaLinux 9 ISOs vary in size, but never seen an image that small (500G?):
Boot - 1.1G
Minimal - 2.2G
DVD - 11G
You could be missing a big chunk of required/recommended kit!

Offline
*
My PHP-FPM 8.0, 8.1, 8.2 and 8.3 were all auto-update enabled but although the latest versions comes up as 8.0.30, 8.1.33, 8.2.29 and 8.3.25, the running versions are currently 8.0.30, 8.1.31, 8.2.27 and 8.3.15

What should possibly cause the auto-updates to stop (ran them manually but no go)...

You could be missing a big chunk of required/recommended kit!
As I am running a build made by my VPS provider, I am unable to make any changes to it. I think the ISO for boot edition is somehow optimized... I will ask them...