Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 866518

Summary: net-proxy/squid-5.4.1-r2:0 - Libxml2Parser.cc: error: xmlSetFeature was not declared in this scope
Product: Gentoo Linux Reporter: Toralf Förster <toralf>
Component: Current packagesAssignee: Mikle Kolyada (RETIRED) <zlogene>
Status: RESOLVED FIXED    
Severity: normal CC: atoth, leonchik1976, sam
Priority: Normal Keywords: PATCH
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: emerge-info.txt
emerge-history.txt
environment
etc.portage.tar.bz2
logs.tar.bz2
net-proxy:squid-5.4.1-r2:20220825-072912.log.bz2
temp.tar.bz2

Description Toralf Förster gentoo-dev 2022-08-25 10:23:19 UTC
                 from Libxml2Parser.cc:19:
/usr/include/libxml2/libxml/SAX2.h:164:17: note: declared here
  164 |                 htmlDefaultSAXHandlerInit       (void);
      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~
Libxml2Parser.cc:94:5: error: 'xmlSetFeature' was not declared in this scope; did you mean 'xmlHasFeature'?
   94 |     xmlSetFeature(parser, "substitute entities", 0);
      |     ^~~~~~~~~~~~~

  -------------------------------------------------------------------

  This is an unstable amd64 chroot image at a tinderbox (==build bot)
  name: 17.1_hardened-j4-20220823-090003

  -------------------------------------------------------------------

gcc-config -l:
 [1] x86_64-pc-linux-gnu-12.2.0 *
clang/llvm (if any):
clang version 14.0.6
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/lib/llvm/14/bin
/usr/lib/llvm/14
14.0.6
Python 3.10.6
Available Ruby profiles:
  [1]   ruby27 (with Rubygems)
  [2]   ruby31 (with Rubygems) *
Available Rust versions:
  [1]   rust-bin-1.62.1 *
The Glorious Glasgow Haskell Compilation System, version 9.0.2
php cli:

  HEAD of ::gentoo
commit 04d1f44c4e7aec952cbb29149c70b98414ba37dc
Author: Repository mirror & CI <repomirrorci@gentoo.org>
Date:   Thu Aug 25 05:46:56 2022 +0000

    2022-08-25 05:46:56 UTC

emerge -qpvO net-proxy/squid
[ebuild  N    ] net-proxy/squid-5.4.1-r2  USE="caps ecap esi htcp ipv6 logrotate pam ssl ssl-crtd wccp wccpv2 -gnutls -kerberos -ldap -mysql -nis -perl -postgres -qos -radius -samba -sasl (-selinux) -snmp -sqlite -systemd -test -tproxy"
Comment 1 Toralf Förster gentoo-dev 2022-08-25 10:23:20 UTC
Created attachment 800983 [details]
emerge-info.txt
Comment 2 Toralf Förster gentoo-dev 2022-08-25 10:23:21 UTC
Created attachment 800986 [details]
emerge-history.txt
Comment 3 Toralf Förster gentoo-dev 2022-08-25 10:23:23 UTC
Created attachment 800989 [details]
environment
Comment 4 Toralf Förster gentoo-dev 2022-08-25 10:23:24 UTC
Created attachment 800992 [details]
etc.portage.tar.bz2
Comment 5 Toralf Förster gentoo-dev 2022-08-25 10:23:25 UTC
Created attachment 800995 [details]
logs.tar.bz2
Comment 6 Toralf Förster gentoo-dev 2022-08-25 10:23:26 UTC
Created attachment 800998 [details]
net-proxy:squid-5.4.1-r2:20220825-072912.log.bz2
Comment 7 Toralf Förster gentoo-dev 2022-08-25 10:23:27 UTC
Created attachment 801001 [details]
temp.tar.bz2
Comment 8 Attila Tóth 2022-09-06 08:56:23 UTC
 ESI: Drop incorrect and unnecessary xmlSetFeature() call (#988)

xmlSetFeature() has been deprecated for 10+ years and will eventually be
removed from libxml2. Squid calls xmlSetFeature() with the wrong
argument: a nil `value` pointer instead of a pointer to a zero value.
When called with a nil `value`, the function does nothing but returning
an error. Squid does not check whether xmlSetFeature() call is
successful, and the bug went unnoticed since libxml2 support was added
in commit 964b44c.

Since libxml2 does not substitute entities by default, the call can be
removed to achieve the intended effect.

https://github.com/squid-cache/squid/commit/c4e6b7c2a12fa218089fe839f769ffc8ae18dea4
Comment 9 Larry the Git Cow gentoo-dev 2022-09-23 07:42:08 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1efb38b2ae71a0cf0dc13480491b3cba754ccc1c

commit 1efb38b2ae71a0cf0dc13480491b3cba754ccc1c
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2022-09-23 07:16:47 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2022-09-23 07:16:54 +0000

    net-proxy/squid: fix build w/ libxml2-2.10.0
    
    Closes: https://bugs.gentoo.org/866518
    Signed-off-by: Sam James <sam@gentoo.org>

 .../files/squid-4.17-fix-libxml2-2.10.0.patch      | 30 ++++++++++++++++++++++
 net-proxy/squid/squid-4.17-r1.ebuild               |  1 +
 net-proxy/squid/squid-5.4.1-r2.ebuild              |  1 +
 3 files changed, 32 insertions(+)