iliaal / php_excel

PHP Extension interface to the Excel writing/reading library
http://ilia.ws
533 stars 131 forks source link

libxml/parser.h error on CentOS7 #285

Closed kdgeorgiev closed 1 year ago

kdgeorgiev commented 1 year ago

Hi Community!

When compiling the excel.so with libxl I get this error on make;

[root@5a07a617c6f7 excel]# make /bin/sh /make/excel/libtool --mode=compile cc -I. -I/make/excel -I/make/excel/include -I/make/excel/main -I/make/excel -I/opt/remi/php81/root/usr/include/php -I/opt/remi/php81/root/usr/include/php/main -I/opt/remi/php81/root/usr/include/php/TSRM -I/opt/remi/php81/root/usr/include/php/Zend -I/opt/remi/php81/root/usr/include/php/ext -I/opt/remi/php81/root/usr/include/php/ext/date/lib -I/make/libxl/include_c -I/usr/local/include/libxml2 -DHAVE_CONFIG_H -I/usr/local/include/libxml2 -DZEND_COMPILE_DL_EXT=1 -c /make/excel/excel.c -o excel.lo -MMD -MF excel.dep -MT excel.lo libtool: compile: cc -I. -I/make/excel -I/make/excel/include -I/make/excel/main -I/make/excel -I/opt/remi/php81/root/usr/include/php -I/opt/remi/php81/root/usr/include/php/main -I/opt/remi/php81/root/usr/include/php/TSRM -I/opt/remi/php81/root/usr/include/php/Zend -I/opt/remi/php81/root/usr/include/php/ext -I/opt/remi/php81/root/usr/include/php/ext/date/lib -I/make/libxl/include_c -I/usr/local/include/libxml2 -DHAVE_CONFIG_H -I/usr/local/include/libxml2 -DZEND_COMPILE_DL_EXT=1 -c /make/excel/excel.c -MMD -MF excel.dep -MT excel.lo -fPIC -DPIC -o .libs/excel.o In file included from /opt/remi/php81/root/usr/include/php/ext/xml/php_xml.h:30, from /make/excel/excel.c:32: /opt/remi/php81/root/usr/include/php/ext/xml/expat_compat.h:40:10: fatal error: libxml/parser.h: No such file or directory 40 | #include <libxml/parser.h> | ^~~~~~~~~~~~~~~~~ compilation terminated. make: *** [Makefile:209: excel.lo] Error 1 [root@5a07a617c6f7 excel]#

Known issue command didn't work. Well actually it finds the path but then throws syntax errors. When I tried the workaround to get it fixed here: https://github.com/iliaal/php_excel/issues/172 It does the same when I use the --with to define the path of the library and throws once again syntax errors.

Any suggestions on what I should do ?

Steps I use to compile the excel.so

  1. phpize --clean && phpize && ./configure --build=aarch64-redhat-linux --with-excel=../libxl --with-php-config=php-config --with-libxl-incdir=../libxl/include_c --with-libxl-libdir=../libxl/lib-aarch64 --with-libxml-dir=/usr/include/libxml2 && make clean && make & make install & make test

Once again it fails on the make with the error above!

do-io commented 1 year ago

you have reported an error for libXML in support for libXL