Closed AngryPenguinPL closed 10 months ago
I've got no libxml 2.12. at hand, but according to the error message f80aaa4b94c9badb117308bd4032d6e2b2365627 could fix it.
Unfortunately, after applying this commit, I still have the following error:
/builddir/build/BUILD/libzypp-17.31.25/zypp/parser/xml/Reader.cc:119:7: error: no matching function for call to 'xmlTextReaderSetStructuredErrorHandler'
DEBUG util.py:448: 119 | xmlTextReaderSetStructuredErrorHandler( _reader, structuredErrorFunc, NULL );
DEBUG util.py:448: | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
DEBUG util.py:448: /usr/include/libxml2/libxml/xmlreader.h:419:6: note: candidate function not viable: no known conversion from 'void (void *, const xmlErrorPtr)' (aka 'void (void *, _xmlError *const)') to 'xmlStructuredErrorFunc' (aka 'void (*)(void *, const _xmlError *)') for 2nd argument
DEBUG util.py:448: 419 | xmlTextReaderSetStructuredErrorHandler(xmlTextReaderPtr reader,
DEBUG util.py:448: | ^
DEBUG util.py:448: 420 | xmlStructuredErrorFunc f,
DEBUG util.py:448: | ~~~~~~~~~~~~~~~~~~~~~~~~
DEBUG util.py:448: 1 error generated.
The fix doesn't work because const xmlErrorPtr
makes it a constant pointer to a potentially non-const variable while libxml2 expects to get a pointer to a constant variable. There's probably a nicer way, but changing const xmlErrorPtr
to const _xmlError *
fixes it.
@berolinux You're right of course. Unfortunately there's no signature which satisfies both (old and new). So your fix will not work with the old libxml.
error: invalid conversion from ‘void (*)(void*, const xmlError*)’ to ‘Told {aka void (*)(void*, xmlError*)}’ [-fpermissive]
error: invalid conversion from ‘void (*)(void*, xmlError*)’ to ‘Tnew {aka void (*)(void*, const xmlError*)}’ [-fpermissive]
We'll need an #ifdef regarding th libxml version which introduced the change.
libzypp-17.31.28
After upgrading libxml to series 2.12.X libzypp no longer compile.
Full build log: https://file-store.openmandriva.org/api/v1/file_stores/4572313c6dd54dbf32c4a91a01cbd9bd804545ed.log?show=true
Details: