mate-desktop / atril

A document viewer for MATE
http://www.mate-desktop.org
GNU General Public License v2.0
197 stars 62 forks source link

Fix build with libxml2 2.12 #597

Closed jtojnar closed 6 months ago

jtojnar commented 6 months ago

libxml 2.12.0 reorganized headers, resulting in xmlParseFile and xmlIndentTreeOutput no longer being in scope. Let’s add the proper includes containing the symbols.

jtojnar commented 6 months ago

2.12.3 returned the cyclic include between xml/tree.h and xml/parser.h so it is no longer strictly necessary but I still think it is a good practice to include headers for required symbols explicitly.

raveit65 commented 6 months ago

Where does a build not running? I did a test build with atril-1.26.1 at rawhide branch at fedora build server and i do not get an build error. Fedora rawhide use libxml2-2.12.3 successful build: https://koji.fedoraproject.org/koji/taskinfo?taskID=111154090 I recall that i fixed all repos of us building with libxml2 2.12 a while ago, and atril didn't fail.

jtojnar commented 6 months ago

This was atril 1.26.1 on NixOS with libxml2 2.12.2, IIRC. Specifically, xmlParseFile and xmlIndentTreeOutput symbols were missing because <libxml/tree.h> no longer included <libxml/parser.h>.

The build you linked passes since libxml2 2.12.3 it contains re-added the cyclic import.

raveit65 commented 6 months ago

I tested all repos with building against libxml2 2.12 a while ago, and atril didn't fail. So, i am still wondering about your build issue with that version.