PG versus libxml2 2.12.x

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: PG versus libxml2 2.12.x
Date: 2024-01-27 19:04:22
Message-ID: 1389505.1706382262@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Buildfarm member caiman has been failing build for a couple weeks now.
The reason turns out to be that recent libxml2 has decided to throw
a "const" into the signature required for custom error handlers.
(API compatibility? What's that?)

I don't mind adopting the "const" --- it's a good idea in isolation.
The trouble is in fixing our code to work with both old and new
libxml2 versions. We could thrash around with a configure test or
something, but I think the most expedient answer is just to insert
some explicit casts, as shown in the attached. It's possible though
that some compilers will throw a cast-away-const warning. I'm
not seeing any, but ...

Also, I'm seeing a deprecation warning in contrib/xml2/xpath.c
for

xmlLoadExtDtdDefaultValue = 1;

I'm not sure why that's still there, given that we disabled external
DTD access ages ago. I propose we just remove it.

In short, I suggest the attached.

regards, tom lane

Attachment Content-Type Size
v1-cope-with-libxml2-API-changes.patch text/x-diff 2.9 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tomas Vondra 2024-01-27 19:37:03 Re: logical decoding and replication of sequences, take 2
Previous Message Tom Lane 2024-01-27 18:29:26 Re: Segmentation fault on FreeBSD with GSSAPI authentication