hyperion Posted December 4, 2023 Report Share Posted December 4, 2023 2 minutes ago, Riesi said: libxml2 2.12.1-1 A more recent version than mine, looking at my distros bugracker there are lots of similar bugs to this one for various packages with 2.12 and so it's still hard masked. Quote Link to comment Share on other sites More sharing options...
Riesi Posted December 4, 2023 Author Report Share Posted December 4, 2023 Downgrading to Arch's libxml2 2.11.4-1 made it work. So this is clearly a libxml2 issue. I guess all Linux build issues of 0AD are fixed then with phosit's patch merged. 1 Quote Link to comment Share on other sites More sharing options...
hyperion Posted December 4, 2023 Report Share Posted December 4, 2023 Well, some of the changes you posted look valid at a glance, not so the use of an internal type of libxml2 tho. Quote Link to comment Share on other sites More sharing options...
Riesi Posted December 7, 2023 Author Report Share Posted December 7, 2023 Upstream libxml2 fixed some regressions already! But there are still a few build issues. I commented in the existing issue with the currently still existing build issues. https://gitlab.gnome.org/GNOME/libxml2/-/issues/642 I still dont get verification emails from 0ad phabricator Quote Link to comment Share on other sites More sharing options...
Riesi Posted December 7, 2023 Author Report Share Posted December 7, 2023 (edited) Okey so all issues that libxml2 wanted to fix are on their latest upstream now. Only remaining fix is for the function pointer that changed. They suggested that 0ad should fix this. They also linked a commit from WebKit fixing it. https://github.com/WebKit/WebKit/commit/1bad176b2496579d760852c80cff3ad9fb7c3a4b I used this patch as a base for the same issue on the 0ad side. Casting the function pointer to `xmlStructuredErrorFunc` would have also worked, but it would be less clean in my opinion. Error: ../../../source/ps/XML/RelaxNG.cpp:162:50: error: invalid conversion from ‘void (*)(void*, xmlErrorPtr)’ {aka ‘void (*)(void*, _xmlError*)’} to ‘xmlStructuredErrorFunc’ {aka ‘void (*)(void*, const _xmlError*)’} [-fpermissive] 162 | xmlRelaxNGSetValidStructuredErrors(ctxt, &relaxNGErrorHandler, NULL); | ^~~~~~~~~~~~~~~~~~~~ | | | void (*)(void*, xmlErrorPtr) {aka void (*)(void*, _xmlError*)} ../../../source/ps/XML/Xeromyces.cpp:59:41: error: invalid conversion from ‘void (*)(void*, xmlErrorPtr)’ {aka ‘void (*)(void*, _xmlError*)’} to ‘xmlStructuredErrorFunc’ {aka ‘void (*)(void*, const _xmlError*)’} [-fpermissive] 59 | xmlSetStructuredErrorFunc(NULL, &errorHandler); | ^~~~~~~~~~~~~ | | | void (*)(void*, xmlErrorPtr) {aka void (*)(void*, _xmlError*)} libxml2_fix.patch Edited December 7, 2023 by Riesi 3 Quote Link to comment Share on other sites More sharing options...
phosit Posted December 8, 2023 Report Share Posted December 8, 2023 Thank you for the work. I don't like preprocessor directives. We could go for: void errorHandler(void* UNUSED(userData), std::conditional_t<LIBXML_VERSION >= 21200, const xmlError, xmlError>* error) Also that wouldn't introduce duplication. @hyperion Does Fcollada also have an issue with newer lxbxml2 version? I get this errors: FCollada/FUtils/FUXmlDocument.cpp: In constructor ‘FUXmlDocument::FUXmlDocument(FUFileManager*, const fchar*, bool)’: FCollada/FUtils/FUXmlDocument.cpp:39:39: error: ‘xmlParseMemory’ was not declared in this scope 39 | xmlDocument = xmlParseMemory((const char*) fileData, (int)fileLength); | ^~~~~~~~~~~~~~ FCollada/FUtils/FUXmlDocument.cpp: In constructor ‘FUXmlDocument::FUXmlDocument(const char*, size_t)’: FCollada/FUtils/FUXmlDocument.cpp:67:23: error: ‘xmlParseMemory’ was not declared in this scope 67 | xmlDocument = xmlParseMemory(data, (int)length); | ^~~~~~~~~~~~~~  Quote Link to comment Share on other sites More sharing options...
hyperion Posted December 8, 2023 Report Share Posted December 8, 2023 20 minutes ago, phosit said: I don't like preprocessor directives. We could go for: void errorHandler(void* UNUSED(userData), std::conditional_t<LIBXML_VERSION >= 21200, const xmlError, xmlError>* error) As long as it's not the cast variant of solving this I'd be fine with either. Â 21 minutes ago, phosit said: @hyperion Does Fcollada also have an issue with newer lxbxml2 version? Looking at the linked ticket a future 2.12.3 should no longer have any issue, still technically it's a downstream bug, just that the fallout was unexpectedly large and the missing headers where injected back upstream. So I'd add the parser header regardless as this also allows the use of all 2.12.x releases. Quote Link to comment Share on other sites More sharing options...
vladislavbelov Posted December 8, 2023 Report Share Posted December 8, 2023 43 minutes ago, phosit said: void errorHandler(void* UNUSED(userData), std::conditional_t<LIBXML_VERSION >= 21200, const xmlError, xmlError>* error) It seems a bit less readable to me and it'll be inconsistent anyway as we can't use such approach everywhere. But I don't mind in that particular case. Quote Link to comment Share on other sites More sharing options...
phosit Posted December 8, 2023 Report Share Posted December 8, 2023 1 hour ago, hyperion said: 1 hour ago, phosit said: @hyperion Does Fcollada also have an issue with newer lxbxml2 version? Looking at the linked ticket a future 2.12.3 should no longer have any issue, still technically it's a downstream bug, just that the fallout was unexpectedly large and the missing headers where injected back upstream. So I'd add the parser header regardless as this also allows the use of all 2.12.x releases. Right i used 2.12.1 Can you upload a patch? (I'm shy of patching libraries) 1 hour ago, vladislavbelov said: It seems a bit less readable to me and it'll be inconsistent anyway as we can't use such approach everywhere. But I don't mind in that particular case. To address the readability issue we could use a temporary/using. using MaybeConstXmlError = std::conditional_t<LIBXML_VERSION >= 21200, const xmlError, xmlError>; void errorHandler(void* UNUSED(userData), MaybeConstXmlError* error) Quote Link to comment Share on other sites More sharing options...
hyperion Posted December 8, 2023 Report Share Posted December 8, 2023 (edited) 5 hours ago, phosit said: Can you upload a patch? (I'm shy of patching libraries) Is correct but might be incomplete. Edit: tested to be complete, builds with 2.11.5, 2.12.1, 2.12.2 and git HEAD. Â 5 hours ago, phosit said: To address the readability issue we could use a temporary/using. using MaybeConstXmlError = std::conditional_t<LIBXML_VERSION >= 21200, const xmlError, xmlError>; void errorHandler(void* UNUSED(userData), MaybeConstXmlError* error) Don't think this improves readability over your first suggestion. It's not complexity that is the issue just that people aren't used to it in this context so it takes an extra one or two seconds to mentally parse, at least for me. The greater than char in the greater than equal token doesn't help Whether or not the tradeoff vs. not using the preprocessor is worth it I don't know. Edited December 8, 2023 by hyperion Quote Link to comment Share on other sites More sharing options...
MirceaKitsune Posted December 25, 2023 Report Share Posted December 25, 2023 (edited) An update on the situation: I can now successfully compile the latest Git version of 0 A.D. again without any errors, on the latest snapshot of Manjaro Linux. However I can't run it due to a missing library issue. /home/mircea/Games/0ad/0ad_GIT/binaries/system/pyrogenesis: error while loading shared libraries: libicui18n.so.73: cannot open shared object file: No such file or directory I have the ICU package installed. However my version is 74.2-1: I take it Pyrogenesis needs to be updated to use this newer version? Edited December 25, 2023 by MirceaKitsune Quote Link to comment Share on other sites More sharing options...
fabio Posted December 25, 2023 Report Share Posted December 25, 2023 1 hour ago, MirceaKitsune said: An update on the situation: I can now successfully compile the latest Git version of 0 A.D. again without any errors, on the latest snapshot of Manjaro Linux. However I can't run it due to a missing library issue. /home/mircea/Games/0ad/0ad_GIT/binaries/system/pyrogenesis: error while loading shared libraries: libicui18n.so.73: cannot open shared object file: No such file or directory I have the ICU package installed. However my version is 74.2-1: I take it Pyrogenesis needs to be updated to use this newer version? Try cleaning workspaces and rebuilding. 2 1 Quote Link to comment Share on other sites More sharing options...
sternstaub Posted December 25, 2023 Report Share Posted December 25, 2023 Can build again on Arch with current libxml, thanks Riesi Quote Link to comment Share on other sites More sharing options...
phosit Posted December 25, 2023 Report Share Posted December 25, 2023 2 hours ago, fabio said: Try cleaning workspaces and rebuilding. After updating ICU I also had linkage errors. It was fixed by cleaning the workspace. Quote Link to comment Share on other sites More sharing options...
MirceaKitsune Posted December 25, 2023 Report Share Posted December 25, 2023 4 hours ago, fabio said: Try cleaning workspaces and rebuilding. That solved it, thanks! Haven't started a game but the Git version now boots to the main menu successfully Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.