[squid-users] squid 6.1 esi compile error, ubuntu 22.04
Dmitry Melekhov
dm at belkam.com
Mon Aug 7 08:00:15 UTC 2023
Hello!
Built using --disable-esi without problems.
Could you tell me what can cause this?
/bin/bash ../../libtool --tag=CXX --mode=compile g++ -std=c++17
-DHAVE_CONFIG_H -DDEFAULT_CONFIG_FILE=\"/etc/squid/squid.conf\"
-DDEFAULT_SQUID_DATA_DIR=\"/usr/share/squid\"
-DDEFAULT_SQUID_CONFIG_DIR=\"/etc/squid\" -I../.. -I../../include
-I../../lib -I../../src -I../../include -isystem /usr/include/mit-krb5
-isystem /usr/include/mit-krb5 -I../../libltdl -Wall -Wextra
-Wimplicit-fallthrough=5 -Wpointer-arith -Wwrite-strings -Wcomments
-Wshadow -Wmissing-declarations -Woverloaded-virtual -Werror -pipe
-D_REENTRANT -m64 -g -O2 -MT Libxml2Parser.lo -MD -MP -MF
$depbase.Tpo -c -o Libxml2Parser.lo Libxml2Parser.cc &&\
mv -f $depbase.Tpo $depbase.Plo
libtool: compile: g++ -std=c++17 -DHAVE_CONFIG_H
-DDEFAULT_CONFIG_FILE=\"/etc/squid/squid.conf\"
-DDEFAULT_SQUID_DATA_DIR=\"/usr/share/squid\"
-DDEFAULT_SQUID_CONFIG_DIR=\"/etc/squid\" -I../.. -I../../include
-I../../lib -I../../src -I../../include -isystem /usr/include/mit-krb5
-isystem /usr/include/mit-krb5 -I../../libltdl -Wall -Wextra
-Wimplicit-fallthrough=5 -Wpointer-arith -Wwrite-strings -Wcomments
-Wshadow -Wmissing-declarations -Woverloaded-virtual -Werror -pipe
-D_REENTRANT -m64 -g -O2 -MT Libxml2Parser.lo -MD -MP -MF
.deps/Libxml2Parser.Tpo -c Libxml2Parser.cc -fPIC -DPIC -o
.libs/Libxml2Parser.o
In file included from Libxml2Parser.cc:20:
../../src/esi/Libxml2Parser.h:66:13: error: 'xmlParserCtxtPtr' does not
name a type
66 | mutable xmlParserCtxtPtr parser; /* our parser */
| ^~~~~~~~~~~~~~~~
Libxml2Parser.cc:45:8: error: 'htmlDocPtr' does not name a type
45 | static htmlDocPtr entity_doc = nullptr;
| ^~~~~~~~~~
Libxml2Parser.cc:51:43: error: 'xmlChar' does not name a type
51 | esi_startElementSAXFunc(void * ctx, const xmlChar * name, const
xmlChar ** atts)
| ^~~~~~~
Libxml2Parser.cc:51:65: error: 'xmlChar' does not name a type
51 | esi_startElementSAXFunc(void * ctx, const xmlChar * name, const
xmlChar ** atts)
| ^~~~~~~
Libxml2Parser.cc: In function 'void esi_startElementSAXFunc(void*, const
int*, const int**)':
Libxml2Parser.cc:54:5: error: 'xmlChar' was not declared in this scope
54 | xmlChar **tmp = (xmlChar **)atts;
| ^~~~~~~
Libxml2Parser.cc:54:15: error: 'tmp' was not declared in this scope; did
you mean 'tm'?
54 | xmlChar **tmp = (xmlChar **)atts;
| ^~~
| tm
Libxml2Parser.cc:54:32: error: expected primary-expression before ')' token
54 | xmlChar **tmp = (xmlChar **)atts;
| ^
Libxml2Parser.cc: At global scope:
Libxml2Parser.cc:70:40: error: 'xmlChar' does not name a type
70 | esi_endElementSAXFunc(void *ctx, const xmlChar *name)
| ^~~~~~~
Libxml2Parser.cc:77:37: error: 'xmlChar' does not name a type
77 | esi_commentSAXFunc(void *ctx, const xmlChar *value)
| ^~~~~~~
Libxml2Parser.cc:84:40: error: 'xmlChar' does not name a type
84 | esi_charactersSAXFunc(void *ctx, const xmlChar *ch, int len)
| ^~~~~~~
Libxml2Parser.cc:90:8: error: 'xmlEntityPtr' does not name a type
90 | static xmlEntityPtr
| ^~~~~~~~~~~~
Libxml2Parser.cc: In constructor
'ESILibxml2Parser::ESILibxml2Parser(ESIParserClient*)':
Libxml2Parser.cc:110:5: error: 'xmlSAXHandler' was not declared in this
scope
110 | xmlSAXHandler sax;
| ^~~~~~~~~~~~~
Libxml2Parser.cc:111:5: error: 'xmlInitParser' was not declared in this
scope
111 | xmlInitParser();
| ^~~~~~~~~~~~~
Libxml2Parser.cc:112:13: error: 'sax' was not declared in this scope;
did you mean 'max'?
112 | memset(&sax, 0, sizeof(sax));
| ^~~
| max
Libxml2Parser.cc:117:21: error: 'esi_getEntitySAXFunc' was not declared
in this scope
117 | sax.getEntity = esi_getEntitySAXFunc;
| ^~~~~~~~~~~~~~~~~~~~
Libxml2Parser.cc:120:5: error: 'parser' was not declared in this scope;
did you mean 'Parser'?
120 | parser = xmlCreatePushParserCtxt(&sax, static_cast<void
*>(this), nullptr, 0, nullptr);
| ^~~~~~
| Parser
Libxml2Parser.cc:120:14: error: 'xmlCreatePushParserCtxt' was not
declared in this scope
120 | parser = xmlCreatePushParserCtxt(&sax, static_cast<void
*>(this), nullptr, 0, nullptr);
| ^~~~~~~~~~~~~~~~~~~~~~~
Libxml2Parser.cc:122:9: error: 'entity_doc' was not declared in this scope
122 | if (entity_doc == nullptr)
| ^~~~~~~~~~
Libxml2Parser.cc:123:22: error: 'htmlNewDoc' was not declared in this scope
123 | entity_doc = htmlNewDoc(nullptr, nullptr);
| ^~~~~~~~~~
Libxml2Parser.cc: In destructor 'virtual
ESILibxml2Parser::~ESILibxml2Parser()':
Libxml2Parser.cc:128:23: error: 'parser' was not declared in this scope;
did you mean 'Parser'?
128 | xmlFreeParserCtxt(parser);
| ^~~~~~
| Parser
Libxml2Parser.cc:128:5: error: 'xmlFreeParserCtxt' was not declared in
this scope
128 | xmlFreeParserCtxt(parser);
| ^~~~~~~~~~~~~~~~~
Libxml2Parser.cc: In member function 'virtual bool
ESILibxml2Parser::parse(const char*, size_t, bool)':
Libxml2Parser.cc:135:27: error: 'parser' was not declared in this scope;
did you mean 'Parser'?
135 | return (xmlParseChunk(parser, dataToParse, lengthOfData,
endOfStream) == 0);
| ^~~~~~
| Parser
Libxml2Parser.cc:135:13: error: 'xmlParseChunk' was not declared in this
scope
135 | return (xmlParseChunk(parser, dataToParse, lengthOfData,
endOfStream) == 0);
| ^~~~~~~~~~~~~
Libxml2Parser.cc: In member function 'virtual long int
ESILibxml2Parser::lineNumber() const':
Libxml2Parser.cc:141:43: error: 'parser' was not declared in this scope;
did you mean 'Parser'?
141 | return (long int)xmlSAX2GetLineNumber(parser);
| ^~~~~~
| Parser
Libxml2Parser.cc:141:22: error: 'xmlSAX2GetLineNumber' was not declared
in this scope
141 | return (long int)xmlSAX2GetLineNumber(parser);
| ^~~~~~~~~~~~~~~~~~~~
Libxml2Parser.cc: In member function 'virtual const char*
ESILibxml2Parser::errorString() const':
Libxml2Parser.cc:147:5: error: 'xmlErrorPtr' was not declared in this scope
147 | xmlErrorPtr error = xmlGetLastError();
| ^~~~~~~~~~~
Libxml2Parser.cc:149:9: error: 'error' was not declared in this scope;
did you mean 'perror'?
149 | if (error == nullptr)
| ^~~~~
| perror
Libxml2Parser.cc:152:12: error: 'error' was not declared in this scope;
did you mean 'perror'?
152 | return error->message;
| ^~~~~
| perror
make[3]: *** [Makefile:886: Libxml2Parser.lo] Error 1
make[3]: Leaving directory '/var/local/files/squid-6.1/src/esi'
make[2]: *** [Makefile:6005: all-recursive] Error 1
make[2]: Leaving directory '/var/local/files/squid-6.1/src'
make[1]: *** [Makefile:5005: all] Error 2
make[1]: Leaving directory '/var/local/files/squid-6.1/src'
make: *** [Makefile:600: all-recursive] Error 1
And how to fix it?
Thank you!
More information about the squid-users
mailing list