On 8/8/23 01:10, Dmitry Melekhov wrote:
07.08.2023 17:27, Alex Rousskov пишет:
On 8/7/23 04:00, Dmitry Melekhov wrote:
Built using --disable-esi without problems.
First of all, if you do not need ESI, I recommend building with
--disable-esi to avoid accidental exposure to dangerous ESI bugs in
deployments that should not be using ESI features.
Really, I know nothing about it, so most probably I don't need it.
Agreed.
FWIW, in Project CI environment that also uses GCC on Ubuntu 22.04,
Squid v6.1 ESI build[1] succeeds, including the Libxml2Parser.cc
compilation step that fails in your environment.
[1] https://github.com/squid-cache/squid/actions/runs/5471818575
$ grep -A6 LIBEXPAT configure.log
checking for LIBEXPAT... yes
checking for expat.h... yes
checking for LIBXML2... yes
checking for libxml/parser.h... yes
checking for libxml/HTMLparser.h... yes
checking for libxml/HTMLtree.h... yes
configure: Enabling ESI processor: -lexpat -lm -lxml2
$ grep HAVE_LIBXML include/autoconf.h
#define HAVE_LIBXML2 1
#define HAVE_LIBXML_HTMLPARSER_H 1
#define HAVE_LIBXML_HTMLTREE_H 1
#define HAVE_LIBXML_PARSER_H 1
Can you share the corresponding ./configure output and
include/autoconf.h lines from your build environment?
Could you tell me what can cause this?
I suspect your system lacks libxml/HTMLparser.h or Squid ./configure
was unable to find that header. I cannot find relevant libxml2
documentation, but if libxml promises to declare xmlParserCtxtPtr in
libxml/HTMLparser.h, then this is a Squid bug: When that bug (if it is
a Squid bug) is fixed, your build will fail at ./configure time
instead of "make" time.
Next steps:
* If your system lacks libxml/HTMLparser.h, then install the missing
libxml2 headers. Check the output sampled above to confirm that the
installation led to header discovery by ./configure.
* If your system has libxml/HTMLparser.h, set/adjust CPPFLAGS given to
./configure. Check the output sampled above to confirm that your
adjustments led to header discovery by ./configure.
It is in place, the same as in Ubuntu 20.04, where I compiled squid 6.1
without problems,
but configure can't find it:
configure:28616: checking for libxml/parser.h
configure:28616: g++ -std=c++17 -c -g -O2 conftest.cpp >&5
conftest.cpp:120:10: fatal error: libxml/parser.h: No such file or
directory
120 | #include <libxml/parser.h>
| ^~~~~~~~~~~~~~~~~
compilation terminated.
export CPPFLAGS=-I/usr/include/libxml2/
helps
now :
configure:28616: checking for libxml/parser.h
configure:28616: g++ -std=c++17 -c -g -O2 -I/usr/include/libxml2/
conftest.cpp >&5
configure:28616: $? = 0
configure:28616: result: yes
and squid is compiled.
This is new install of ubuntu 22.04
Thank you for reporting these details! They may help others experiencing
similar problems.
I cannot explain why setting CPPFLAGS is needed in your environment
_but_ not needed in other very similar environments with libxml2
installed. There might be some subtle differences in _how_ that library
and its headers were installed, but I am just grasping at straws here.
Alex.
_______________________________________________
squid-users mailing list
squid-users@lists.squid-cache.org
http://lists.squid-cache.org/listinfo/squid-users