PHP 5.6 with htscanner=yes fails compilation on Debian 10

kristian

Verified User
Joined
Nov 4, 2005
Messages
458
Location
Norway
I'm not sure if PHP 5.6, htscanner=yes and Debian 10 is the only combo this fails on, but this is what I'm trying right now.

Bash:
# grep ^php._release options.conf
php1_release=7.4
php2_release=8.0
php3_release=5.6
php4_release=no

Bash:
# grep ^htsc php_extensions.conf
htscanner=yes

A fresh DA setup:

Bash:
./setup.sh <clientid> <licenseid> <hostname> <interface> <ip>

Everything compiles, until this happens:

Bash:
<....>
Found /usr/local/directadmin/custombuild/htscanner-1.0.1-enhanced.tgz
Extracting /usr/local/directadmin/custombuild/htscanner-1.0.1-enhanced.tgz...
Installing htscanner2-1.0.1-enhanced PHP extension for PHP 5.6...
Configuring for:
PHP Api Version:         20131106
Zend Module Api No:      20131226
Zend Extension Api No:   220131226
autoconf: warning: both `configure.ac' and `configure.in' are present.
autoconf: warning: proceeding with `configure.ac'.
autoheader: 'configure.ac' and 'configure.in' both present.
autoheader: proceeding with 'configure.ac'
: error: invalid feature name: htscanner
./configure: line 394: as_fn_exit: command not found
: error: invalid package name: php-config
./configure: line 394: as_fn_exit: command not found
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for a sed that does not truncate output... /usr/bin/sed
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for cc... cc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... ./configure: line 1552: as_fn_set_status: command not found
no
checking whether cc accepts -g... ./configure: line 1552: as_fn_set_status: command not found
./configure: line 1552: as_fn_set_status: command not found
./configure: line 1552: as_fn_set_status: command not found
no
checking for cc option to accept ISO C89... ./configure: line 1552: as_fn_set_status: command not found
./configure: line 1552: as_fn_set_status: command not found
./configure: line 1552: as_fn_set_status: command not found
./configure: line 1552: as_fn_set_status: command not found
./configure: line 1552: as_fn_set_status: command not found
./configure: line 1552: as_fn_set_status: command not found
./configure: line 1552: as_fn_set_status: command not found
unsupported
checking how to run the C preprocessor... ./configure: line 1589: as_fn_set_status: command not found
./configure: line 1589: as_fn_set_status: command not found
./configure: line 1589: as_fn_set_status: command not found
./configure: line 1589: as_fn_set_status: command not found
./configure: line 1589: as_fn_set_status: command not found
./configure: line 1589: as_fn_set_status: command not found
/lib/cpp
./configure: line 1589: as_fn_set_status: command not found
./configure: line 1589: as_fn_set_status: command not found
: error: in `/usr/local/directadmin/custombuild/htscanner-1.0.1-enhanced':
: error: C preprocessor "/lib/cpp" fails sanity check
See `config.log' for more details
./configure: line 394: as_fn_exit: command not found
checking for icc... no
checking for suncc... no
checking for system library directory... lib
checking if compiler supports -R... ./configure: line 1635: as_fn_set_status: command not found
no
checking if compiler supports -Wl,-rpath,... ./configure: line 1635: as_fn_set_status: command not found
no
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking target system type... x86_64-pc-linux-gnu
checking for PHP prefix... /usr/local/php56
checking for PHP includes... -I/usr/local/php56/include/php -I/usr/local/php56/include/php/main -I/usr/local/php56/include/php/TSRM -I/usr/local/php56/include/php/Zend -I/usr/local/php56/include/php/ext -I/usr/local/php56/include/php/ext/date/lib
checking for PHP extension directory... /usr/local/php56/lib/php/extensions/no-debug-non-zts-20131226
checking for PHP installed headers prefix... /usr/local/php56/include/php
checking if debug is enabled... no
checking if zts is enabled... no
checking for gawk... no
checking for nawk... nawk
checking if nawk is broken... no
checking whether to enable htscanner support... yes, shared
checking for a sed that does not truncate output... /usr/bin/sed
checking for non-GNU ld... /bin/ld
checking if the linker (/bin/ld) is GNU ld... yes
checking for /bin/ld option to reload object files... -r
checking for BSD-compatible nm... /usr/bin/nm -B
checking whether ln -s works... yes
checking how to recognize dependent libraries... pass_all
checking for ANSI C header files... ./configure: line 1552: as_fn_set_status: command not found
no
checking for sys/types.h... ./configure: line 1552: as_fn_set_status: command not found
no
checking for sys/stat.h... ./configure: line 1552: as_fn_set_status: command not found
no
checking for stdlib.h... ./configure: line 1552: as_fn_set_status: command not found
no
checking for string.h... (cached) no
checking for memory.h... (cached) no
checking for strings.h... ./configure: line 1552: as_fn_set_status: command not found
no
checking for inttypes.h... (cached) no
checking for stdint.h... (cached) no
checking for unistd.h... (cached) no
checking dlfcn.h usability... ./configure: line 1552: as_fn_set_status: command not found
no
checking dlfcn.h presence... ./configure: line 1589: as_fn_set_status: command not found
no
checking for dlfcn.h... no
checking the maximum length of command line arguments... 1572864
checking command to parse /usr/bin/nm -B output from cc object... ok
checking for objdir... .libs
checking for ar... ar
checking for ranlib... ranlib
checking for strip... strip
checking for cc option to produce PIC...
checking if cc static flag  works... yes
checking if cc supports -c -o file.o... yes
checking whether the cc linker (/bin/ld -m elf_x86_64) supports shared libraries... yes
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
: patching config.h.in
: creating ./config.status
config.status: creating config.h
Trying to make htscanner2-1.0.1-enhanced PHP extension...
/bin/sh /usr/local/directadmin/custombuild/htscanner-1.0.1-enhanced/libtool --mode=compile cc  -I. -I/usr/local/directadmin/custombuild/htscanner-1.0.1-enhanced -DPHP_ATOM_INC -I/usr/local/directadmin/custombuild/htscanner-1.0.1-enhanced/include -I/usr/local/directadmin/custombuild/htscanner-1.0.1-enhanced/main -I/usr/local/directadmin/custombuild/htscanner-1.0.1-enhanced -I/usr/local/php56/include/php -I/usr/local/php56/include/php/main -I/usr/local/php56/include/php/TSRM -I/usr/local/php56/include/php/Zend -I/usr/local/php56/include/php/ext -I/usr/local/php56/include/php/ext/date/lib  -DHAVE_CONFIG_H     -c /usr/local/directadmin/custombuild/htscanner-1.0.1-enhanced/htscanner.c -o htscanner.lo
mkdir .libs
 cc -I. -I/usr/local/directadmin/custombuild/htscanner-1.0.1-enhanced -DPHP_ATOM_INC -I/usr/local/directadmin/custombuild/htscanner-1.0.1-enhanced/include -I/usr/local/directadmin/custombuild/htscanner-1.0.1-enhanced/main -I/usr/local/directadmin/custombuild/htscanner-1.0.1-enhanced -I/usr/local/php56/include/php -I/usr/local/php56/include/php/main -I/usr/local/php56/include/php/TSRM -I/usr/local/php56/include/php/Zend -I/usr/local/php56/include/php/ext -I/usr/local/php56/include/php/ext/date/lib -DHAVE_CONFIG_H -c /usr/local/directadmin/custombuild/htscanner-1.0.1-enhanced/htscanner.c  -DPIC -o .libs/htscanner.o
/bin/sh /usr/local/directadmin/custombuild/htscanner-1.0.1-enhanced/libtool --mode=link cc -DPHP_ATOM_INC -I/usr/local/directadmin/custombuild/htscanner-1.0.1-enhanced/include -I/usr/local/directadmin/custombuild/htscanner-1.0.1-enhanced/main -I/usr/local/directadmin/custombuild/htscanner-1.0.1-enhanced -I/usr/local/php56/include/php -I/usr/local/php56/include/php/main -I/usr/local/php56/include/php/TSRM -I/usr/local/php56/include/php/Zend -I/usr/local/php56/include/php/ext -I/usr/local/php56/include/php/ext/date/lib  -DHAVE_CONFIG_H      -o htscanner.la -export-dynamic -avoid-version -prefer-pic -module -rpath /usr/local/directadmin/custombuild/htscanner-1.0.1-enhanced/modules  htscanner.lo
cc -shared  .libs/htscanner.o  -lc  -soname htscanner.so -o .libs/htscanner.so
cc: error: htscanner.so: No such file or directory
cc: error: unrecognized command line option '-soname'
make: *** [Makefile:196: htscanner.la] Error 1

I've not dug into details on this, but php 7.4 and 8.0 compiled and was started successfully. This is one of those moments it would be nice to be able to set htscanner=no only for PHP 5.6.

Is there anything I can do to make this build happen, or is there a bug somewhere in custombuild?
 
I just now ran this to see if it could be reproduced:

Bash:
# ./build php_expert 5.6 php-fpm

And the compile actually succeeded, which was a bit of a surprise. I got none of the autoconf warnings, errors or command not founds during the configure step either. So definitely looks like a bug somewhere.
 
After some further testing, I've found that the order of php releases seems to matter, and it only fails if 5.6 is built after 7.4, which seems to indicate some kind of cleanup issue maybe. These are the combinations I've tried so far, and their result:

Code:
php1_release=8.0
php2_release=5.6
./build php => success

php1_release=7.4
php2_release=5.6
./build php => failure

php1_release=7.4
php2_release=8.0
php3_release=5.6
./build php => failure

php1_release=8.0
php2_release=7.4
php3_release=5.6
./build php => failure

php1_release=5.6
php2_release=7.4
php3_release=8.0
./build php => success

php1_release=5.6
php2_release=8.0
php3_release=7.4
./build php => success

php1_release=7.3
php2_release=5.6
./build php => success

I also found these two releated forum threads that I commented on:
 
Last edited:
28/05/23 same issue.

Debian 11

php1_release=8.2
php2_release=7.4
php3_release=5.6
./build php => failure
 
Dear @Zhenypan

cat /etc/os-release
PRETTY_NAME="Debian GNU/Linux 11 (bullseye)"
NAME="Debian GNU/Linux"
VERSION_ID="11"
VERSION="11 (bullseye)"
VERSION_CODENAME=bullseye
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"

./build version

Build Options
# PHP Settings
php1_release=8.2
php1_mode=php-fpm
php2_release=7.4
php2_mode=php-fpm
php3_release=5.6
php3_mode=php-fpm
php4_release=no
php4_mode=php-fpm
secure_php=yes
php_ini=yes
php_timezone=Asia/Bangkok
php_ini_type=production
x_mail_header=yes

./build options
Nginx Unit: 1.30.0
Apache: 2.4.57
Nginx (reverse proxy): 1.24.0
LibModSecurity: 3.0.8
LibModSecurity Rule Set: no
htscanner: 1.0.1-enhanced
Dovecot: 2.3.20
Dovecot configuration: yes
AWstats: no
Exim: 4.96-58-g4e9ed49f8
exim.conf update: yes
BlockCracking: yes
Easy Spam Fighter: yes
Rspamd: yes
ClamAV: yes
MariaDB: 10.6.12
MySQL backup: yes
MySQL backup directory: /usr/local/directadmin/custombuild/mysql_backups
MySQL compress backups: no
PHP (default): 8.2 as php-fpm
PHP (additional): 7.4 as php-fpm
PHP (additional, 3rd): 5.6 as php-fpm
phpMyAdmin: 5.2.1-all-languages
ProFTPD: no
Pure-FTPd: 1.0.51
RoundCube webmail: 1.6.1
Replace "php.ini" with './build all' and './build php_ini': yes
Replace "php.ini" using type: production
Cron for notifications and (or) updates: yes
Cron frequency: daily
Run "clean" every time: yes
Run "clean_old_webapps" every time: no
Run "clean_old_tarballs" every time: yes
Show texts in bold: yes
SquirrelMail: no
Zend Guard Loader: yes
ionCube loader: 12.0.4
Suhosin: no


Error Message
checking for dlfcn.h... no
checking the maximum length of command line arguments... 1572864
checking command to parse /usr/bin/nm -B output from cc object... ok
checking for objdir... .libs
checking for ar... ar
checking for ranlib... ranlib
checking for strip... strip
checking for cc option to produce PIC...
checking if cc static flag works... yes
checking if cc supports -c -o file.o... yes
checking whether the cc linker (/bin/ld -m elf_x86_64) supports shared libraries... yes
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
: patching config.h.in
: creating ./config.status
config.status: creating config.h
Trying to make htscanner2-1.0.1-enhanced PHP extension...
/bin/bash /usr/local/directadmin/custombuild/htscanner-1.0.1-enhanced/libtool --mode=compile cc -I. -I/usr/local/directadmin/custombuild/htscanner-1.0.1-enhanced -DPHP_ATOM_INC -I/usr/local/directadmin/custombuild/htscanner-1.0.1-enhanced/include -I/usr/local/directadmin/custombuild/htscanner-1.0.1-enhanced/main -I/usr/local/directadmin/custombuild/htscanner-1.0.1-enhanced -I/usr/local/php56/include/php -I/usr/local/php56/include/php/main -I/usr/local/php56/include/php/TSRM -I/usr/local/php56/include/php/Zend -I/usr/local/php56/include/php/ext -I/usr/local/php56/include/php/ext/date/lib -DHAVE_CONFIG_H -c /usr/local/directadmin/custombuild/htscanner-1.0.1-enhanced/htscanner.c -o htscanner.lo
mkdir .libs
cc -I. -I/usr/local/directadmin/custombuild/htscanner-1.0.1-enhanced -DPHP_ATOM_INC -I/usr/local/directadmin/custombuild/htscanner-1.0.1-enhanced/include -I/usr/local/directadmin/custombuild/htscanner-1.0.1-enhanced/main -I/usr/local/directadmin/custombuild/htscanner-1.0.1-enhanced -I/usr/local/php56/include/php -I/usr/local/php56/include/php/main -I/usr/local/php56/include/php/TSRM -I/usr/local/php56/include/php/Zend -I/usr/local/php56/include/php/ext -I/usr/local/php56/include/php/ext/date/lib -DHAVE_CONFIG_H -c /usr/local/directadmin/custombuild/htscanner-1.0.1-enhanced/htscanner.c -DPIC -o .libs/htscanner.o
/bin/bash /usr/local/directadmin/custombuild/htscanner-1.0.1-enhanced/libtool --mode=link cc -DPHP_ATOM_INC -I/usr/local/directadmin/custombuild/htscanner-1.0.1-enhanced/include -I/usr/local/directadmin/custombuild/htscanner-1.0.1-enhanced/main -I/usr/local/directadmin/custombuild/htscanner-1.0.1-enhanced -I/usr/local/php56/include/php -I/usr/local/php56/include/php/main -I/usr/local/php56/include/php/TSRM -I/usr/local/php56/include/php/Zend -I/usr/local/php56/include/php/ext -I/usr/local/php56/include/php/ext/date/lib -DHAVE_CONFIG_H -o htscanner.la -export-dynamic -avoid-version -prefer-pic -module -rpath /usr/local/directadmin/custombuild/htscanner-1.0.1-enhanced/modules htscanner.lo
cc -shared .libs/htscanner.o -lc -soname htscanner.so -o .libs/htscanner.so
cc: error: htscanner.so: No such file or directory
cc: error: unrecognized command-line option '-soname'
make: *** [Makefile:196: htscanner.la] Error 1
*** The make has failed. Exiting..
 
Back
Top