mate-desktop / caja

Caja, the file manager for the MATE desktop
https://mate-desktop.org/
Other
265 stars 143 forks source link

fix building with libxml 2.12.0 #1750

Closed raveit65 closed 7 months ago

raveit65 commented 7 months ago
caja-application.c:1557:11: error: implicit declaration of function ‘xmlReadMemory’; did you mean ‘xmlInitMemory’? [-Werror=implicit-function-declaration]
1557 |     doc = xmlReadMemory (data, strlen (data), NULL, "UTF-8", 0);
|           ^~~~~~~~~~~~~
|           xmlInitMemory
caja-application.c:1557:9: warning: assignment to ‘xmlDocPtr’ {aka ‘struct _xmlDoc *’} from ‘int’ makes pointerfrom integer without a cast [-Wint-conversion]
1557 |     doc = xmlReadMemory (data, strlen (data), NULL, "UTF-8", 0);
|         ^

Building caja with commit from PR for fedora-rawhide at koji buildserver works fine. https://src.fedoraproject.org/rpms/caja/blob/rawhide/f/caja_0001-fix-building-with-libxml-2.12.0.patch https://koji.fedoraproject.org/koji/taskinfo?taskID=109410799

lukefromdc commented 7 months ago

Did xmlReadMemory get moved to a different file in libxml for 2.12, or have we been incorrectly reading a reference to it in another file for years? The former would be a breaking change calling for a new major version, latter woud be on us.

My normal build options will error out at linking with an implicitly declared function and I am not even getting a warning with libxml 2.9

cwendling commented 7 months ago

Did xmlReadMemory get moved to a different file in libxml for 2.12, or have we been incorrectly reading a reference to it in another file for years? The former would be a breaking change calling for a new major version, latter woud be on us.

I didn't move, but they changed which headers include which others, meaning some headers used to bring others and they stopped. Agreed that it would have been worth a major release because it seems to basically break everybody, but well. OTOH we kind of were not including the header we should have, but the fact that it worked kind of made it part of the API.

raveit65 commented 7 months ago

Again, no problems building with libxml 2.9 with this, though we need a test with 2.12.0

Fedora-rawhide use libxml-2.12.0. For this reason i posted the link with a sucessfull build at fedora build-server. https://src.fedoraproject.org/rpms/caja/blob/rawhide/f/caja_0001-fix-building-with-libxml-2.12.0.patch https://koji.fedoraproject.org/koji/taskinfo?taskID=109410799

Looks like i have to write a wiki entry. How to release a package release with travis-ci.