Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 917526 - app-emulation/libvirt-glib-4.0.0 fails to build with dev-libs/libxml2-2.12.0
Summary: app-emulation/libvirt-glib-4.0.0 fails to build with dev-libs/libxml2-2.12.0
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Linux Gnome Desktop Team
URL:
Whiteboard:
Keywords: PullRequest
Depends on:
Blocks: libxml2-2.12
  Show dependency tree
 
Reported: 2023-11-17 20:54 UTC by Kostadin Shishmanov
Modified: 2023-12-03 07:05 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build log (libvirt-glib.log,199.43 KB, text/x-log)
2023-11-17 20:54 UTC, Kostadin Shishmanov
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Kostadin Shishmanov 2023-11-17 20:54:37 UTC
Created attachment 875012 [details]
build log

FAILED: libvirt-gconfig/libvirt-gconfig-1.0.so.0.4000.0.p/libvirt-gconfig-object.c.o 
x86_64-pc-linux-gnu-gcc -Ilibvirt-gconfig/libvirt-gconfig-1.0.so.0.4000.0.p -Ilibvirt-gconfig -I../libvirt-glib-4.0.0/libvirt-gconfig -I. -I../libvirt-glib-4.0.0 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/lib64/libffi/include -I/usr/include/libxml2 -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -std=gnu99 -fno-common -W -Wabsolute-value -Waddress -Waddress-of-packed-member -Waggressive-loop-optimizations -Wall -Wattribute-warning -Wattributes -Wbool-compare -Wbool-operation -Wbuiltin-declaration-mismatch -Wbuiltin-macro-redefined -Wcannot-profile -Wcast-align -Wcast-align=strict -Wcast-function-type -Wchar-subscripts -Wclobbered -Wcomment -Wcomments -Wcoverage-mismatch -Wcpp -Wdangling-else -Wdate-time -Wdeprecated-declarations -Wdesignated-init -Wdiscarded-array-qualifiers -Wdiscarded-qualifiers -Wdiv-by-zero -Wduplicated-cond -Wduplicate-decl-specifier -Wempty-body -Wendif-labels -Wexpansion-to-defined -Wextra -Wformat-contains-nul -Wformat-extra-args -Wformat-nonliteral -Wformat-security -Wformat-y2k -Wformat-zero-length -Wframe-address -Wfree-nonheap-object -Whsa -Wif-not-aligned -Wignored-attributes -Wignored-qualifiers -Wimplicit -Wimplicit-function-declaration -Wimplicit-int -Wincompatible-pointer-types -Winit-self -Winline -Wint-conversion -Wint-in-bool-context -Wint-to-pointer-cast -Winvalid-memory-model -Winvalid-pch -Wlogical-not-parentheses -Wlogical-op -Wmain -Wmaybe-uninitialized -Wmemset-elt-size -Wmemset-transposed-args -Wmisleading-indentation -Wmissing-attributes -Wmissing-braces -Wmissing-declarations -Wmissing-field-initializers -Wmissing-include-dirs -Wmissing-parameter-type -Wmissing-profile -Wmissing-prototypes -Wmultichar -Wmultistatement-macros -Wnarrowing -Wnested-externs -Wnonnull -Wnonnull-compare -Wnull-dereference -Wodr -Wold-style-declaration -Wold-style-definition -Wopenmp-simd -Woverflow -Woverride-init -Wpacked-bitfield-compat -Wpacked-not-aligned -Wparentheses -Wpointer-arith -Wpointer-compare -Wpointer-sign -Wpointer-to-int-cast -Wpragmas -Wpsabi -Wrestrict -Wreturn-local-addr -Wreturn-type -Wscalar-storage-order -Wsequence-point -Wshadow -Wshift-count-negative -Wshift-count-overflow -Wshift-negative-value -Wsizeof-array-argument -Wsizeof-pointer-div -Wsizeof-pointer-memaccess -Wstrict-aliasing -Wstrict-prototypes -Wstringop-truncation -Wsuggest-attribute=cold -Wsuggest-attribute=const -Wsuggest-attribute=format -Wsuggest-attribute=noreturn -Wsuggest-attribute=pure -Wsuggest-final-methods -Wsuggest-final-types -Wswitch -Wswitch-bool -Wswitch-unreachable -Wsync-nand -Wtautological-compare -Wtrampolines -Wtrigraphs -Wtype-limits -Wuninitialized -Wunknown-pragmas -Wunused -Wunused-but-set-parameter -Wunused-but-set-variable -Wunused-function -Wunused-label -Wunused-local-typedefs -Wunused-result -Wunused-value -Wunused-variable -Wvarargs -Wvariadic-macros -Wvector-operation-performance -Wvla -Wvolatile-register-var -Wwrite-strings -Walloc-size-larger-than=9223372036854775807 -Warray-bounds=2 -Wattribute-alias=2 -Wformat-overflow=2 -Wformat-truncation=2 -Wimplicit-fallthrough=5 -Wnormalized=nfc -Wshift-overflow=2 -Wstringop-overflow=2 -Wunused-const-variable=2 -Wno-sign-compare -Wno-cast-function-type -Wjump-misses-init -Wswitch-enum -Wno-format-nonliteral -Wno-format-truncation -Wframe-larger-than=4096 -fexceptions -fasynchronous-unwind-tables -fipa-pure-const -Wno-suggest-attribute=pure -Wno-suggest-attribute=const -Wno-unused-parameter -fstack-protector-strong -DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_48 -DGLIB_VERSION_MAX_ALLOWED=GLIB_VERSION_2_48 -march=raptorlake -O2 -pipe -flto=auto -Werror=odr -Werror=lto-type-mismatch -Werror=strict-aliasing -Wno-incompatible-function-pointer-types -fPIC '-DLOCALEDIR="/usr/share/locale"' '-DDATADIR="/usr/share"' -DLIBVIRT_GLIB_BUILD -MD -MQ libvirt-gconfig/libvirt-gconfig-1.0.so.0.4000.0.p/libvirt-gconfig-object.c.o -MF libvirt-gconfig/libvirt-gconfig-1.0.so.0.4000.0.p/libvirt-gconfig-object.c.o.d -o libvirt-gconfig/libvirt-gconfig-1.0.so.0.4000.0.p/libvirt-gconfig-object.c.o -c ../libvirt-glib-4.0.0/libvirt-gconfig/libvirt-gconfig-object.c
In file included from ../libvirt-glib-4.0.0/libvirt-gconfig/libvirt-gconfig-object.c:28:
/usr/include/libxml2/libxml/relaxng.h:134:50: error: unknown type name ‘xmlDocPtr’; did you mean ‘xmlErrorPtr’?
  134 |                     xmlRelaxNGNewDocParserCtxt  (xmlDocPtr doc);
      |                                                  ^~~~~~~~~
      |                                                  xmlErrorPtr
/usr/include/libxml2/libxml/relaxng.h:163:50: error: unknown type name ‘FILE’
  163 |                     xmlRelaxNGDump              (FILE *output,
      |                                                  ^~~~
/usr/include/libxml2/libxml/relaxng.h:16:1: note: ‘FILE’ is defined in header ‘<stdio.h>’; did you forget to ‘#include <stdio.h>’?
   15 | #include <libxml/xmlstring.h>
  +++ |+#include <stdio.h>
   16 | 
/usr/include/libxml2/libxml/relaxng.h:166:42: error: unknown type name ‘FILE’
  166 |                     xmlRelaxNGDumpTree  (FILE * output,
      |                                          ^~~~
/usr/include/libxml2/libxml/relaxng.h:166:42: note: ‘FILE’ is defined in header ‘<stdio.h>’; did you forget to ‘#include <stdio.h>’?
/usr/include/libxml2/libxml/relaxng.h:191:50: error: unknown type name ‘xmlDocPtr’; did you mean ‘xmlErrorPtr’?
  191 |                                                  xmlDocPtr doc);
      |                                                  ^~~~~~~~~
      |                                                  xmlErrorPtr
/usr/include/libxml2/libxml/relaxng.h:197:42: error: unknown type name ‘xmlDocPtr’; did you mean ‘xmlErrorPtr’?
  197 |                                          xmlDocPtr doc,
      |                                          ^~~~~~~~~
      |                                          xmlErrorPtr
/usr/include/libxml2/libxml/relaxng.h:198:42: error: unknown type name ‘xmlNodePtr’
  198 |                                          xmlNodePtr elem);
      |                                          ^~~~~~~~~~
/usr/include/libxml2/libxml/relaxng.h:205:42: error: unknown type name ‘xmlDocPtr’; did you mean ‘xmlErrorPtr’?
  205 |                                          xmlDocPtr doc,
      |                                          ^~~~~~~~~
      |                                          xmlErrorPtr
/usr/include/libxml2/libxml/relaxng.h:206:42: error: unknown type name ‘xmlNodePtr’
  206 |                                          xmlNodePtr elem);
      |                                          ^~~~~~~~~~
/usr/include/libxml2/libxml/relaxng.h:209:42: error: unknown type name ‘xmlDocPtr’; did you mean ‘xmlErrorPtr’?
  209 |                                          xmlDocPtr doc,
      |                                          ^~~~~~~~~
      |                                          xmlErrorPtr
/usr/include/libxml2/libxml/relaxng.h:210:42: error: unknown type name ‘xmlNodePtr’
  210 |                                          xmlNodePtr elem);
      |                                          ^~~~~~~~~~
Comment 1 corporate 2023-11-19 22:21:48 UTC
caused by dev-libs/libxml2-2.12.0

diff --git a/include/libxml/relaxng.h b/include/libxml/relaxng.h
index e764bad..079b7f1 100644
--- a/include/libxml/relaxng.h
+++ b/include/libxml/relaxng.h
@@ -13,6 +13,7 @@
 #include <libxml/xmlversion.h>
 #include <libxml/xmlerror.h>
 #include <libxml/xmlstring.h>
+#include <libxml/tree.h>

 #ifdef LIBXML_SCHEMAS_ENABLED

re emerging dev-libs/libxml2-2.12.0 with the following allows for 
app-emulation/libvirt-glib-4.0.0 to build correctly
Comment 2 Michal Prívozník 2023-11-25 06:51:02 UTC
There's more thank just one missing include. I've opened MR here:

https://gitlab.com/libvirt/libvirt-glib/-/merge_requests/53

Once merged, I'll do the backport.
Comment 3 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-11-25 10:04:40 UTC
Thank you!
Comment 4 Larry the Git Cow gentoo-dev 2023-12-03 07:01:49 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1f916c7b39826f359d64ae7b938cb962b22fca42

commit 1f916c7b39826f359d64ae7b938cb962b22fca42
Author:     Michal Privoznik <michal.privoznik@gmail.com>
AuthorDate: 2023-11-28 07:40:04 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2023-12-03 06:22:11 +0000

    app-emulation/libvirt-glib: Fix build with >=dev-libs/libxml2-2.12.0
    
    As of its 2.12.0 release, libxml2 cleaned up header files which
    rendered libvirt-glib unable to compile. Backport fixes from
    upstream repo.
    
    Bug: https://bugs.gentoo.org/917526
    Signed-off-by: Michal Privoznik <michal.privoznik@gmail.com>
    Signed-off-by: Sam James <sam@gentoo.org>

 ...glib-4.0.0-Make-xmlError-structs-constant.patch | 64 ++++++++++++++++++++++
 ...-libvirt-gconfig-Add-more-libxml-includes.patch | 50 +++++++++++++++++
 .../libvirt-glib/libvirt-glib-4.0.0.ebuild         |  5 ++
 3 files changed, 119 insertions(+)