Project

Profile

Help

Support #5137

open

Unable to build Saxon EE/C 1.2.1 and HE/C 1.2.1 as a PHP 5 extension

Added by Christina Spies 11 months ago. Updated 11 months ago.

Status:
AwaitingInfo
Priority:
Low
Category:
PHP Build
Start date:
2021-10-19
Due date:
% Done:

0%

Estimated time:
Found in version:
1.2.1
Platforms:

Description

I've been trying to build Saxon-EE/C 1.2.1 as an extension for PHP 5.6.38 in a 64-bit version of Puppy Linux.

I think it probably almost worked, but there were some errors with the "make" command (which didn't finish compiling) and the "configure" command (which seemed to run successfully despite the errors).

Those errors are shown below, and also in the attached file "EEC-1.2.1-build-transcript.txt".

I also tried building Saxon HE/C 1.2.1 mostly the same way (except a different installation path and SAXONC_HOME path), and had similar errors. (Included in the attached file "HEC-1.2.1-build-transcript.txt".)

I'm very unfamiliar with C and C++, so, despite trying, I was unable to fix the problems myself.


A few years ago, I was able to successfully build PHP 5.6.38 extensions of Saxon-HE/C 1.1.0 (with [your assistance](https://saxonica.plan.io/issues/4030) - thanks again!) and Saxon-HE/C 1.0.2 on this same computer, so I'm optimistic that Saxon-EE/C 1.2.1 and Saxon-HE/C 1.2.1 can probably also work on this computer, even though I'm still using an increasingly old OS - the Lighthouse 64 6.02 Beta 2 version of Puppy Linux, released in 2013.

Happily, I already have Saxon-EE 10.6 for Java working fine on this computer, and I love it!

So, I'm not in any rush here - I could probably get by with that alone if I had to. But I have a lot of legacy PHP 5 software I'm stuck with for now, so it would be nice (though not urgent or essential) for me to be able to use Saxon EE/C 1.2.1 as a PHP 5 extension.

Thanks for any help!


Here's a description of what I did to try to build Saxon-EE/C 1.2.1:
  • I unzipped "libsaxon-EEC-setup64-v1.2.1.zip" into this folder:

/root/apbin/APSK-GLMP-GTK/Saxon-C/v1.2.1-EEC


  • Then, I went there and ran this:

./libsaxon-EEC-setup64-v1.2.1


  • I installed it with the default destination path it gave me:

/root/apbin/APSK-GLMP-GTK/Saxon-C/v1.2.1-EEC/Saxonica/SaxonEEC1.2.1

I attached the install.log file as "EEC-1.2.1-install.log", in case it might help.


  • Then I set the environment variable SAXONC_HOME by adding this line to the file "/etc/profile.log":

export SAXONC_HOME="/root/apbin/APSK-GLMP-GTK/Saxon-C/v1.2.1-EEC/Saxonica/SaxonEEC1.2.1"


Quote:

The use of symbolic links to specify where the Saxon/C library is installed is no longer recommended. It is better to set the SAXONC_HOME environment variable directly.


  • I removed the old symlinks I had to Saxon-HE/C 1.0.2's "rt" folder and "libsaxonhec.so".

  • In the "Saxon.C.API" folder, I overwrote "config.m4" with "PHP5-Build/config.m4".

  • I ran this:

phpize

Which produced this successful-looking output:

bash-4.1# phpize
Configuring for:
PHP Api Version:         20131106
Zend Module Api No:      20131226
Zend Extension Api No:   220131226

  • Then I ran:

./configure --enable-saxon --prefix "/root/apbin/APSK-GLMP-GTK/Saxon-C/v1.2.1-EEC/Saxonica/SaxonEEC1.2.1"

Which seemed to run successfully despite a few errors:

bash-4.1# ./configure --enable-saxon --prefix "/root/apbin/APSK-GLMP-GTK/Saxon-C/v1.2.1-EEC/Saxonica/SaxonEEC1.2.1"
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for a sed that does not truncate output... /bin/sed
expr: syntax error
./configure: line 2599: test: =: unary operator expected
expr: syntax error
./configure: line 2605: test: =: unary operator expected
expr: syntax error
./configure: line 2612: test: =: unary operator expected
expr: syntax error
./configure: line 2605: test: =: unary operator expected
expr: syntax error
./configure: line 2612: test: =: unary operator expected
expr: syntax error
./configure: line 2605: test: =: unary operator expected
expr: syntax error
./configure: line 2612: test: =: unary operator expected
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... yes
checking whether cc accepts -g... yes
checking for cc option to accept ISO C89... none needed
checking how to run the C preprocessor... cc -E
checking for icc... no
checking for suncc... no
checking whether cc understands -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-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
checking for PHP prefix... /root/apbin/APSK-GLMP-GTK/PHP/v5.6.38-glmp-gtk
checking for PHP includes... -I/root/apbin/APSK-GLMP-GTK/PHP/v5.6.38-glmp-gtk/include/php -I/root/apbin/APSK-GLMP-GTK/PHP/v5.6.38-glmp-gtk/include/php/main -I/root/apbin/APSK-GLMP-GTK/PHP/v5.6.38-glmp-gtk/include/php/TSRM -I/root/apbin/APSK-GLMP-GTK/PHP/v5.6.38-glmp-gtk/include/php/Zend -I/root/apbin/APSK-GLMP-GTK/PHP/v5.6.38-glmp-gtk/include/php/ext -I/root/apbin/APSK-GLMP-GTK/PHP/v5.6.38-glmp-gtk/include/php/ext/date/lib
checking for PHP extension directory... /root/apbin/APSK-GLMP-GTK/PHP/v5.6.38-glmp-gtk/lib/php/extensions/no-debug-non-zts-20131226
checking for PHP installed headers prefix... /root/apbin/APSK-GLMP-GTK/PHP/v5.6.38-glmp-gtk/include/php
checking if debug is enabled... no
checking if zts is enabled... no
checking for re2c... no
configure: WARNING: You will need re2c 0.13.4 or later if you want to regenerate PHP parsers.
checking for gawk... gawk
checking Whether to enable the "saxon" extension... yes, shared
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking how to run the C++ preprocessor... g++ -E
checking for ld used by cc... /usr/x86_64-slackware-linux/bin/ld
checking if the linker (/usr/x86_64-slackware-linux/bin/ld) is GNU ld... yes
checking for /usr/x86_64-slackware-linux/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... 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 how to run the C++ preprocessor... g++ -E
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 if cc supports -fno-rtti -fno-exceptions... no
checking for cc option to produce PIC... -fPIC
checking if cc PIC flag -fPIC works... yes
checking if cc static flag -static works... yes
checking if cc supports -c -o file.o... yes
checking whether the cc linker (/usr/x86_64-slackware-linux/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
checking for ld used by g++... /usr/x86_64-slackware-linux/bin/ld -m elf_x86_64
checking if the linker (/usr/x86_64-slackware-linux/bin/ld -m elf_x86_64) is GNU ld... yes
checking whether the g++ linker (/usr/x86_64-slackware-linux/bin/ld -m elf_x86_64) supports shared libraries... yes
checking for g++ option to produce PIC... -fPIC
checking if g++ PIC flag -fPIC works... yes
checking if g++ static flag -static works... yes
checking if g++ supports -c -o file.o... yes
checking whether the g++ linker (/usr/x86_64-slackware-linux/bin/ld -m elf_x86_64) supports shared libraries... yes
checking dynamic linker characteristics... GNU/Linux ld.so
(cached) (cached) checking how to hardcode library paths into programs... immediate
configure: creating ./config.status
config.status: creating config.h

  • I edited "Makefile" since I keep Java in an unconventional location. (And also because this step was needed years ago when I successfully built HE/C 1.02 and HE/C 1.10 on this same computer.)

I changed line 31, which said:

CPPFLAGS = -DHAVE_CONFIG_H

...to this:

CPPFLAGS = -DHAVE_CONFIG_H -I/root/apbin/Java/v8u51/include/ -I/root/apbin/Java/v8u51/include/linux/ -I/root/apbin/APSK-GLMP-GTK/Saxon-C/v1.2.1-EEC/Saxonica/SaxonEEC1.2.1


  • Lastly, I ran:

make

Which had the below errors:

/bin/sh /root/apbin/APSK-GLMP-GTK/Saxon-C/v1.2.1-EEC/Saxonica/SaxonEEC1.2.1/Saxon.C.API/libtool --mode=compile g++  -I. -I/root/apbin/APSK-GLMP-GTK/Saxon-C/v1.2.1-EEC/Saxonica/SaxonEEC1.2.1/Saxon.C.API -DPHP_ATOM_INC -I/root/apbin/APSK-GLMP-GTK/Saxon-C/v1.2.1-EEC/Saxonica/SaxonEEC1.2.1/Saxon.C.API/include -I/root/apbin/APSK-GLMP-GTK/Saxon-C/v1.2.1-EEC/Saxonica/SaxonEEC1.2.1/Saxon.C.API/main -I/root/apbin/APSK-GLMP-GTK/Saxon-C/v1.2.1-EEC/Saxonica/SaxonEEC1.2.1/Saxon.C.API -I/root/apbin/APSK-GLMP-GTK/PHP/v5.6.38-glmp-gtk/include/php -I/root/apbin/APSK-GLMP-GTK/PHP/v5.6.38-glmp-gtk/include/php/main -I/root/apbin/APSK-GLMP-GTK/PHP/v5.6.38-glmp-gtk/include/php/TSRM -I/root/apbin/APSK-GLMP-GTK/PHP/v5.6.38-glmp-gtk/include/php/Zend -I/root/apbin/APSK-GLMP-GTK/PHP/v5.6.38-glmp-gtk/include/php/ext -I/root/apbin/APSK-GLMP-GTK/PHP/v5.6.38-glmp-gtk/include/php/ext/date/lib -I/root/apbin/APSK-GLMP-GTK/Saxon-C/v1.2.1-EEC/Saxonica/SaxonEEC1.2.1/Saxon.C.API/jni  -DHAVE_CONFIG_H -I/root/apbin/Java/v8u51/include/ -I/root/apbin/Java/v8u51/include/linux/ -I/root/apbin/APSK-GLMP-GTK/Saxon-C/v1.2.1-EEC/Saxonica/SaxonEEC1.2.1  -g -O2   -c /root/apbin/APSK-GLMP-GTK/Saxon-C/v1.2.1-EEC/Saxonica/SaxonEEC1.2.1/Saxon.C.API/php5_saxon.cpp -o php5_saxon.lo 
mkdir .libs
 g++ -I. -I/root/apbin/APSK-GLMP-GTK/Saxon-C/v1.2.1-EEC/Saxonica/SaxonEEC1.2.1/Saxon.C.API -DPHP_ATOM_INC -I/root/apbin/APSK-GLMP-GTK/Saxon-C/v1.2.1-EEC/Saxonica/SaxonEEC1.2.1/Saxon.C.API/include -I/root/apbin/APSK-GLMP-GTK/Saxon-C/v1.2.1-EEC/Saxonica/SaxonEEC1.2.1/Saxon.C.API/main -I/root/apbin/APSK-GLMP-GTK/Saxon-C/v1.2.1-EEC/Saxonica/SaxonEEC1.2.1/Saxon.C.API -I/root/apbin/APSK-GLMP-GTK/PHP/v5.6.38-glmp-gtk/include/php -I/root/apbin/APSK-GLMP-GTK/PHP/v5.6.38-glmp-gtk/include/php/main -I/root/apbin/APSK-GLMP-GTK/PHP/v5.6.38-glmp-gtk/include/php/TSRM -I/root/apbin/APSK-GLMP-GTK/PHP/v5.6.38-glmp-gtk/include/php/Zend -I/root/apbin/APSK-GLMP-GTK/PHP/v5.6.38-glmp-gtk/include/php/ext -I/root/apbin/APSK-GLMP-GTK/PHP/v5.6.38-glmp-gtk/include/php/ext/date/lib -I/root/apbin/APSK-GLMP-GTK/Saxon-C/v1.2.1-EEC/Saxonica/SaxonEEC1.2.1/Saxon.C.API/jni -DHAVE_CONFIG_H -I/root/apbin/Java/v8u51/include/ -I/root/apbin/Java/v8u51/include/linux/ -I/root/apbin/APSK-GLMP-GTK/Saxon-C/v1.2.1-EEC/Saxonica/SaxonEEC1.2.1 -g -O2 -c /root/apbin/APSK-GLMP-GTK/Saxon-C/v1.2.1-EEC/Saxonica/SaxonEEC1.2.1/Saxon.C.API/php5_saxon.cpp  -fPIC -DPIC -o .libs/php5_saxon.o
/root/apbin/APSK-GLMP-GTK/Saxon-C/v1.2.1-EEC/Saxonica/SaxonEEC1.2.1/Saxon.C.API/php5_saxon.cpp:20:1: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
/root/apbin/APSK-GLMP-GTK/Saxon-C/v1.2.1-EEC/Saxonica/SaxonEEC1.2.1/Saxon.C.API/php5_saxon.cpp:20:1: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
/root/apbin/APSK-GLMP-GTK/Saxon-C/v1.2.1-EEC/Saxonica/SaxonEEC1.2.1/Saxon.C.API/php5_saxon.cpp: In function 'void zim_SaxonProcessor_isSchemaAware(int, zval*, zval**, zval*, int)':
/root/apbin/APSK-GLMP-GTK/Saxon-C/v1.2.1-EEC/Saxonica/SaxonEEC1.2.1/Saxon.C.API/php5_saxon.cpp:543:55: error: return-statement with a value, in function returning 'void' [-fpermissive]
/root/apbin/APSK-GLMP-GTK/Saxon-C/v1.2.1-EEC/Saxonica/SaxonEEC1.2.1/Saxon.C.API/php5_saxon.cpp:546:13: error: return-statement with a value, in function returning 'void' [-fpermissive]
/root/apbin/APSK-GLMP-GTK/Saxon-C/v1.2.1-EEC/Saxonica/SaxonEEC1.2.1/Saxon.C.API/php5_saxon.cpp: In function 'void zim_Xslt30Processor_transformToString(int, zval*, zval**, zval*, int)':
/root/apbin/APSK-GLMP-GTK/Saxon-C/v1.2.1-EEC/Saxonica/SaxonEEC1.2.1/Saxon.C.API/php5_saxon.cpp:2472:66: error: no matching function for call to 'Xslt30Processor::transformToString()'
/root/apbin/APSK-GLMP-GTK/Saxon-C/v1.2.1-EEC/Saxonica/SaxonEEC1.2.1/Saxon.C.API/php5_saxon.cpp:2472:66: note: candidate is:
In file included from /root/apbin/APSK-GLMP-GTK/Saxon-C/v1.2.1-EEC/Saxonica/SaxonEEC1.2.1/Saxon.C.API/SaxonProcessor.h:36:0,
                 from /root/apbin/APSK-GLMP-GTK/Saxon-C/v1.2.1-EEC/Saxonica/SaxonEEC1.2.1/Saxon.C.API/php5_saxon.h:41,
                 from /root/apbin/APSK-GLMP-GTK/Saxon-C/v1.2.1-EEC/Saxonica/SaxonEEC1.2.1/Saxon.C.API/php5_saxon.cpp:5:
/root/apbin/APSK-GLMP-GTK/Saxon-C/v1.2.1-EEC/Saxonica/SaxonEEC1.2.1/Saxon.C.API/Xslt30Processor.h:462:18: note: const char* Xslt30Processor::transformToString(XdmNode*)
/root/apbin/APSK-GLMP-GTK/Saxon-C/v1.2.1-EEC/Saxonica/SaxonEEC1.2.1/Saxon.C.API/Xslt30Processor.h:462:18: note:   candidate expects 1 argument, 0 provided
/root/apbin/APSK-GLMP-GTK/Saxon-C/v1.2.1-EEC/Saxonica/SaxonEEC1.2.1/Saxon.C.API/php5_saxon.cpp: In function 'void zim_Xslt30Processor_transformToValue(int, zval*, zval**, zval*, int)':
/root/apbin/APSK-GLMP-GTK/Saxon-C/v1.2.1-EEC/Saxonica/SaxonEEC1.2.1/Saxon.C.API/php5_saxon.cpp:2503:54: error: no matching function for call to 'Xslt30Processor::transformToValue()'
/root/apbin/APSK-GLMP-GTK/Saxon-C/v1.2.1-EEC/Saxonica/SaxonEEC1.2.1/Saxon.C.API/php5_saxon.cpp:2503:54: note: candidate is:
In file included from /root/apbin/APSK-GLMP-GTK/Saxon-C/v1.2.1-EEC/Saxonica/SaxonEEC1.2.1/Saxon.C.API/SaxonProcessor.h:36:0,
                 from /root/apbin/APSK-GLMP-GTK/Saxon-C/v1.2.1-EEC/Saxonica/SaxonEEC1.2.1/Saxon.C.API/php5_saxon.h:41,
                 from /root/apbin/APSK-GLMP-GTK/Saxon-C/v1.2.1-EEC/Saxonica/SaxonEEC1.2.1/Saxon.C.API/php5_saxon.cpp:5:
/root/apbin/APSK-GLMP-GTK/Saxon-C/v1.2.1-EEC/Saxonica/SaxonEEC1.2.1/Saxon.C.API/Xslt30Processor.h:471:16: note: XdmValue* Xslt30Processor::transformToValue(XdmNode*)
/root/apbin/APSK-GLMP-GTK/Saxon-C/v1.2.1-EEC/Saxonica/SaxonEEC1.2.1/Saxon.C.API/Xslt30Processor.h:471:16: note:   candidate expects 1 argument, 0 provided
/root/apbin/APSK-GLMP-GTK/Saxon-C/v1.2.1-EEC/Saxonica/SaxonEEC1.2.1/Saxon.C.API/php5_saxon.cpp: In function 'void zim_Xslt30Processor_transformToFile(int, zval*, zval**, zval*, int)':
/root/apbin/APSK-GLMP-GTK/Saxon-C/v1.2.1-EEC/Saxonica/SaxonEEC1.2.1/Saxon.C.API/php5_saxon.cpp:2539:35: error: no matching function for call to 'Xslt30Processor::transformToFile()'
/root/apbin/APSK-GLMP-GTK/Saxon-C/v1.2.1-EEC/Saxonica/SaxonEEC1.2.1/Saxon.C.API/php5_saxon.cpp:2539:35: note: candidate is:
In file included from /root/apbin/APSK-GLMP-GTK/Saxon-C/v1.2.1-EEC/Saxonica/SaxonEEC1.2.1/Saxon.C.API/SaxonProcessor.h:36:0,
                 from /root/apbin/APSK-GLMP-GTK/Saxon-C/v1.2.1-EEC/Saxonica/SaxonEEC1.2.1/Saxon.C.API/php5_saxon.h:41,
                 from /root/apbin/APSK-GLMP-GTK/Saxon-C/v1.2.1-EEC/Saxonica/SaxonEEC1.2.1/Saxon.C.API/php5_saxon.cpp:5:
/root/apbin/APSK-GLMP-GTK/Saxon-C/v1.2.1-EEC/Saxonica/SaxonEEC1.2.1/Saxon.C.API/Xslt30Processor.h:482:10: note: void Xslt30Processor::transformToFile(XdmNode*)
/root/apbin/APSK-GLMP-GTK/Saxon-C/v1.2.1-EEC/Saxonica/SaxonEEC1.2.1/Saxon.C.API/Xslt30Processor.h:482:10: note:   candidate expects 1 argument, 0 provided
make: *** [php5_saxon.lo] Error 1

Thanks again for any help!


Files

EEC-1.2.1-build-transcript.txt (71.8 KB) EEC-1.2.1-build-transcript.txt Christina Spies, 2021-10-19 23:44
EEC-1.2.1-install.log (273 KB) EEC-1.2.1-install.log Christina Spies, 2021-10-19 23:45
HEC-1.2.1-build-transcript.txt (69.8 KB) HEC-1.2.1-build-transcript.txt Christina Spies, 2021-10-19 23:45
HEC-1.2.1-install.log (264 KB) HEC-1.2.1-install.log Christina Spies, 2021-10-19 23:45

Please register to edit this issue

Also available in: Atom PDF