Building x11-misc/shared-mime-info with both libxml2-2.12.0 and clang-17 fails to work with 2 errors (implicit function declaration, and incompatible integer to pointer conversion) The first became an error in clang 16 and the second in clang 15 I believe. These errors don't occur with the previous version of libxml2, and the package buulds successfully if I enable -Wno-error=int-conversion -Wno-error=implicit-function-declaration as CFLAGS. For now libxml2-2.12.0 is masked, but I'll add this as a blocker to both 408963 and 917537 Reproducible: Always Steps to Reproduce: 1. Install libxml2-2.12.0 2. Have clang as a system compiler 3. Emerge shared-mime-info Actual Results: ../shared-mime-info-2.4/src/test-subclassing.c:12:8: error: call to undeclared function 'xmlReadFile'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] 12 | doc = xmlReadFile ("freedesktop.org.xml", NULL, 0); | ^ ../shared-mime-info-2.4/src/test-subclassing.c:12:6: error: incompatible integer to pointer conversion assigning to 'xmlDocPtr' (aka 'struct _xmlDoc *') from 'int' [-Wint-conversion] 12 | doc = xmlReadFile ("freedesktop.org.xml", NULL, 0); Expected Results: Package builds successfully
Created attachment 875131 [details] emerge --info
Created attachment 875132 [details] build.log
Builds fine against 2.12.0 using GCC-13 not sure blocking bug 917537 is correct.
Amended given the below comment and that this builds with GCC (I don't have a GCC based system to test with, sorry).
Reported on upstream bug tracker: https://gitlab.freedesktop.org/xdg/shared-mime-info/-/issues/219
Created attachment 875169 [details, diff] fix-build-clang.patch Upstream provided a patch on their bug report. I have checked and it builds and installs fine with this as a user patch.
Can confirm that even with this patch, it still builds and installs fine on the previous version of libxml2 (2.11.6) as well, although I haven't been able to test using GCC.
Will be fixed in the next upstream version via: https://gitlab.freedesktop.org/xdg/shared-mime-info/-/commit/c918fe77e255150938e83a6aec259f153d303573
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=195e216792faf46cb927875cef75ad6870ac4baa commit 195e216792faf46cb927875cef75ad6870ac4baa Author: Sam James <sam@gentoo.org> AuthorDate: 2024-02-06 03:30:46 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2024-02-06 03:30:54 +0000 x11-misc/shared-mime-info: fix build w/ libxml2-2.12 Closes: https://bugs.gentoo.org/917561 Signed-off-by: Sam James <sam@gentoo.org> .../files/shared-mime-info-2.4-libxml2.12.patch | 20 ++++++++++++++++++++ ...nfo-2.4.ebuild => shared-mime-info-2.4-r1.ebuild} | 6 +++++- 2 files changed, 25 insertions(+), 1 deletion(-)