Htscanner failure on PHP 5.6

wattie

Verified User
Joined
May 31, 2008
Messages
1,234
Location
Bulgaria
I have FreeBSD 11.3. Htscanner builds fine on PHP 5.4, PHP 7.3 and PHP 7.4, but it does not on PHP 5.6. The error is shown below:

Code:
...
Starting php-fpm56:  done
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: as_fn_exit: not found
: error: invalid package name: php-config
./configure: as_fn_exit: 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/local/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
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: as_fn_set_status: not found
no
checking whether clang accepts -g... ./configure: as_fn_set_status: not found
./configure: as_fn_set_status: not found
./configure: as_fn_set_status: not found
no
checking for clang option to accept ISO C89... ./configure: as_fn_set_status: not found
./configure: as_fn_set_status: not found
./configure: as_fn_set_status: not found
./configure: as_fn_set_status: not found
./configure: as_fn_set_status: not found
./configure: as_fn_set_status: not found
./configure: as_fn_set_status: not found
unsupported
checking how to run the C preprocessor... clang-cpp
./configure: as_fn_set_status: not found
./configure: as_fn_set_status: not found
: error: in `/usr/local/directadmin/custombuild/htscanner-1.0.1-enhanced':
: error: C preprocessor "clang-cpp" fails sanity check
See `config.log' for more details
./configure: as_fn_exit: not found
checking for icc... no
checking for suncc... no
checking for system library directory... lib
checking if compiler supports -R... ./configure: as_fn_set_status: not found
no
checking if compiler supports -Wl,-rpath,... ./configure: as_fn_set_status: not found
no
checking build system type... x86_64-unknown-freebsd11.3
checking host system type... x86_64-unknown-freebsd11.3
checking target system type... x86_64-unknown-freebsd11.3
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... /usr/local/bin/ld
checking if the linker (/usr/local/bin/ld) is GNU ld... yes
checking for /usr/local/bin/ld option to reload object files... -r
checking for BSD-compatible nm... /usr/local/bin/nm -B
checking whether ln -s works... yes
checking how to recognize dependent libraries... pass_all
checking for ANSI C header files... ./configure: as_fn_set_status: not found
no
checking for sys/types.h... ./configure: as_fn_set_status: not found
no
checking for sys/stat.h... ./configure: as_fn_set_status: not found
no
checking for stdlib.h... ./configure: as_fn_set_status: not found
no
checking for string.h... (cached) no
checking for memory.h... (cached) no
checking for strings.h... ./configure: as_fn_set_status: 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: as_fn_set_status: not found
no
checking dlfcn.h presence... ./configure: as_fn_set_status: not found
no
checking for dlfcn.h... no
checking the maximum length of command line arguments... 196608
checking command to parse /usr/local/bin/nm -B output from clang object... ok
checking for objdir... .libs
checking for ar... ar
checking for ranlib... ranlib
checking for strip... strip
checking for clang option to produce PIC...
checking if clang static flag  works... yes
checking if clang supports -c -o file.o... yes
checking whether the clang linker (/usr/local/bin/ld) supports shared libraries... yes
checking dynamic linker characteristics... freebsd11.3 ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... no
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
checking whether the clang++ linker (/usr/local/bin/ld) supports shared libraries... yes
checking for clang++ option to produce PIC...
checking if clang++ static flag  works... yes
checking if clang++ supports -c -o file.o... yes
checking whether the clang++ linker (/usr/local/bin/ld) supports shared libraries... yes
checking dynamic linker characteristics... freebsd11.3 ld.so
(cached) (cached) checking how to hardcode library paths into programs... unsupported
: 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 clang  -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
clang -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 clang -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
clang -shared  .libs/htscanner.o   -soname htscanner.so -o ./.libs/htscanner.so
clang: error: unknown argument: '-soname'
clang: error: no such file or directory: 'htscanner.so'
*** Error code 1

Stop.
make: stopped in /usr/local/directadmin/custombuild/htscanner-1.0.1-enhanced
 
For comparison it builds just fine on PHP 5.4 on the same machine:

Code:
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.4...
Configuring for:
PHP Api Version:         20100412
Zend Module Api No:      20100525
Zend Extension Api No:   220100525
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'
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 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... yes
checking whether clang accepts -g... yes
checking for clang option to accept ISO C89... none needed
checking how to run the C preprocessor... clang-cpp
checking for icc... no
checking for suncc... no
checking whether clang and cc understand -c and -o together... yes
checking for system library directory... lib
checking if compiler supports -R... no
checking if compiler supports -Wl,-rpath,... yes
checking build system type... x86_64-unknown-freebsd11.3
checking host system type... x86_64-unknown-freebsd11.3
checking target system type... x86_64-unknown-freebsd11.3
checking for PHP prefix... /usr/local/php54
checking for PHP includes... -I/usr/local/php54/include/php -I/usr/local/php54/include/php/main -I/usr/local/php54/include/php/TSRM -I/usr/local/php54/include/php/Zend -I/usr/local/php54/include/php/ext -I/usr/local/php54/include/php/ext/date/lib
checking for PHP extension directory... /usr/local/php54/lib/php/extensions/no-debug-non-zts-20100525
checking for PHP installed headers prefix... /usr/local/php54/include/php
checking if debug is enabled... no
checking if zts is enabled... no
checking for re2c... re2c
checking for re2c version... 0.14.3 (ok)
checking for gawk... no
checking for nawk... nawk
checking if nawk is broken... no
checking whether to enable htscanner support... yes, shared
checking for ld used by clang... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for /usr/bin/ld option to reload object files... -r
checking for BSD-compatible nm... /usr/local/bin/nm -B
checking whether ln -s works... yes
checking how to recognize dependent libraries... pass_all
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking dlfcn.h usability... yes
checking dlfcn.h presence... yes
checking for dlfcn.h... yes
checking the maximum length of command line arguments... 196608
checking command to parse /usr/local/bin/nm -B output from clang object... ok
checking for objdir... .libs
checking for ar... ar
checking for ranlib... ranlib
checking for strip... strip
checking if clang supports -fno-rtti -fno-exceptions... yes
checking for clang option to produce PIC... -fPIC
checking if clang PIC flag -fPIC works... yes
checking if clang static flag -static works... yes
checking if clang supports -c -o file.o... yes
checking whether the clang linker (/usr/bin/ld) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... freebsd11.3 ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... no
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
checking whether the clang++ linker (/usr/bin/ld) supports shared libraries... no
checking for clang++ option to produce PIC... 
checking if clang++ static flag  works... yes
checking if clang++ supports -c -o file.o... yes
checking whether the clang++ linker (/usr/bin/ld) supports shared libraries... no
checking dynamic linker characteristics... freebsd11.3 ld.so
(cached) (cached) checking how to hardcode library paths into programs... unsupported
configure: creating ./config.status
config.status: creating config.h
config.status: config.h is unchanged
Trying to make htscanner2-1.0.1-enhanced PHP extension...
/bin/sh /usr/local/directadmin/custombuild/htscanner-1.0.1-enhanced/libtool --mode=compile clang  -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/php54/include/php -I/usr/local/php54/include/php/main -I/usr/local/php54/include/php/TSRM -I/usr/local/php54/include/php/Zend -I/usr/local/php54/include/php/ext -I/usr/local/php54/include/php/ext/date/lib  -DHAVE_CONFIG_H  -g -O2   -c /usr/local/directadmin/custombuild/htscanner-1.0.1-enhanced/htscanner.c -o htscanner.lo
mkdir .libs
 clang -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/php54/include/php -I/usr/local/php54/include/php/main -I/usr/local/php54/include/php/TSRM -I/usr/local/php54/include/php/Zend -I/usr/local/php54/include/php/ext -I/usr/local/php54/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /usr/local/directadmin/custombuild/htscanner-1.0.1-enhanced/htscanner.c  -fPIC -DPIC -o .libs/htscanner.o
/bin/sh /usr/local/directadmin/custombuild/htscanner-1.0.1-enhanced/libtool --mode=link clang -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/php54/include/php -I/usr/local/php54/include/php/main -I/usr/local/php54/include/php/TSRM -I/usr/local/php54/include/php/Zend -I/usr/local/php54/include/php/ext -I/usr/local/php54/include/php/ext/date/lib  -DHAVE_CONFIG_H  -g -O2   -o ./htscanner.la -export-dynamic -avoid-version -prefer-pic -module -rpath /usr/local/directadmin/custombuild/htscanner-1.0.1-enhanced/modules  htscanner.lo 
clang -shared  .libs/htscanner.o   -Wl,-soname -Wl,libhtscanner.so.0.0 -o ./.libs/libhtscanner.so.0.0
creating ./htscanner.la
(cd ./.libs && rm -f htscanner.la && ln -s ../htscanner.la htscanner.la)
/bin/sh /usr/local/directadmin/custombuild/htscanner-1.0.1-enhanced/libtool --mode=install cp ./htscanner.la /usr/local/directadmin/custombuild/htscanner-1.0.1-enhanced/modules
cp ./.libs/libhtscanner.so.0.0 /usr/local/directadmin/custombuild/htscanner-1.0.1-enhanced/modules/libhtscanner.so.0.0
cp ./.libs/htscanner.lai /usr/local/directadmin/custombuild/htscanner-1.0.1-enhanced/modules/htscanner.la
----------------------------------------------------------------------
Libraries have been installed in:
   /usr/local/directadmin/custombuild/htscanner-1.0.1-enhanced/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'.

Make complete
Installing htscanner2-1.0.1-enhanced  PHP extension...
Installing shared extensions:     /usr/local/php54/lib/php/extensions/no-debug-non-zts-20100525/
find . -name \*.gcno -o -name \*.gcda | xargs rm -f
find . -name \*.lo -o -name \*.o | xargs rm -f
find . -name \*.la -o -name \*.a | xargs rm -f
find . -name \*.so | xargs rm -f
find . -name .libs -a -type d|xargs rm -rf
find . -name \*.1 | xargs rm -f
rm -f libphp.la   modules/* libs/*
htscanner 1.0.1-enhanced is now installed for PHP 5.4.
htscanner2 PHP extension has been installed successfully.
 
I've been having similar problems with PHP 5.6 (alongside 7.4 and 8.0) on a Debian 10 server, where I get the same error as in the original message in this thread. (My post is at https://forum.directadmin.com/threa...ner-yes-fails-compilation-on-debian-10.63592/.) I've discovered that it only fails if 5.6 is built after 7.4, but not if 5.6 is built after 8.0, or built first. This suggests that there's maybe some leftover files somewhere that are not cleaned up properly between the build of 7.4, and the build of 5.6, causing this error.

It also does not seem to fail if 5.6 is release 2 or higher, but I build only 5.6 with ./build php_expert 5.6 php-fpm, which strengthens the theory that the order of builds is causing some issues.
 
Last edited:
Back
Top