Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 579960 - app-emulation/libvirt-1.3.2-r1 with sys-libs/glibc-2.23-r1: src/.libs/libvirt.so: undefined reference to {'major', 'minor'}
Summary: app-emulation/libvirt-1.3.2-r1 with sys-libs/glibc-2.23-r1: src/.libs/libvirt...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal with 1 vote (vote)
Assignee: Matthias Maier
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: glibc-sysmacros
  Show dependency tree
 
Reported: 2016-04-14 13:34 UTC by Andreas Proteus
Modified: 2016-05-01 19:16 UTC (History)
4 users (show)

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


Attachments
emerge --info (emerge-info.txt,6.58 KB, text/plain)
2016-04-14 13:38 UTC, Andreas Proteus
Details
Build log (build-log.txt.tar.gz,52.08 KB, text/plain)
2016-04-14 13:48 UTC, Andreas Proteus
Details
libvirt-1.3.2-glibc-2.23.patch (libvirt-1.3.2-glibc-2.23.patch,2.00 KB, patch)
2016-04-16 10:06 UTC, Sergei Trofimovich
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Andreas Proteus 2016-04-14 13:34:26 UTC
All versions of libvirt in portage fail to build with the same error:
I suspect the failure is caused by some of its dependencies being updated.

The relevant section of the build log:

libtool: link: x86_64-pc-linux-gnu-gcc -std=gnu99 -I/usr/include/libxml2 -I/usr/include/dbus-1.0 -I/usr/lib64/dbus-1.0/include -I/usr/include/libnl3 -I/usr/include/libnl3 -W -Waddress -Waggressive-loop-optimizations -Wall -Wattributes -Wbad-function-cast -Wbuiltin-macro-redefined -Wcast-align -Wchar-subscripts -Wclobbered -Wcomment -Wcomments -Wcoverage-mismatch -Wcpp -Wdate-time -Wdeprecated-declarations -Wdisabled-optimization -Wdiv-by-zero -Wdouble-promotion -Wempty-body -Wendif-labels -Wextra -Wformat-contains-nul -Wformat-extra-args -Wformat-security -Wformat-y2k -Wformat-zero-length -Wfree-nonheap-object -Wignored-qualifiers -Wimplicit -Wimplicit-function-declaration -Wimplicit-int -Winit-self -Winline -Wint-to-pointer-cast -Winvalid-memory-model -Winvalid-pch -Wjump-misses-init -Wlogical-op -Wmain -Wmaybe-uninitialized -Wmissing-braces -Wmissing-declarations -Wmissing-field-initializers -Wmissing-include-dirs -Wmissing-parameter-type -Wmissing-prototypes -Wmultichar -Wnarrowing -Wnested-externs -Wnonnull -Wold-style-declaration -Wold-style-definition -Wopenmp-simd -Woverflow -Woverride-init -Wpacked-bitfield-compat -Wparentheses -Wpointer-arith -Wpointer-sign -Wpointer-to-int-cast -Wpragmas -Wreturn-local-addr -Wreturn-type -Wsequence-point -Wshadow -Wsizeof-pointer-memaccess -Wstrict-aliasing -Wstrict-prototypes -Wsuggest-attribute=const -Wsuggest-attribute=format -Wsuggest-attribute=noreturn -Wsuggest-attribute=pure -Wswitch -Wsync-nand -Wtrampolines -Wtrigraphs -Wtype-limits -Wuninitialized -Wunknown-pragmas -Wunused -Wunused-but-set-parameter -Wunused-but-set-variable -Wunused-function -Wunused-label -Wunused-local-typedefs -Wunused-parameter -Wunused-result -Wunused-value -Wunused-variable -Wvarargs -Wvariadic-macros -Wvector-operation-performance -Wvolatile-register-var -Wwrite-strings -Wnormalized=nfc -Wno-sign-compare -Wjump-misses-init -Wno-format-nonliteral -Wframe-larger-than=4096 -fstack-protector-strong -fexceptions -fasynchronous-unwind-tables -fipa-pure-const -Wno-suggest-attribute=pure -Wno-suggest-attribute=const -fPIE -DPIE -DQEMUD_PID_FILE=\"\" -march=core2 -O2 -pipe -fomit-frame-pointer -fno-stack-protector -Wl,-z -Wl,relro -Wl,-z -Wl,now -pie -Wl,--no-copy-dt-needed-entries -Wl,-O1 -o .libs/libvirtd libvirtd-libvirtd.o libvirtd-remote.o libvirtd-stream.o  -Wl,--as-needed ./.libs/libvirtd_conf.a ./.libs/libvirtd_admin.a /tmp/portage/app-emulation/libvirt-1.3.2-r1/work/libvirt-1.3.2_build/src/.libs/libvirt-admin.so ../src/.libs/libvirt-lxc.so ../src/.libs/libvirt-qemu.so /tmp/portage/app-emulation/libvirt-1.3.2-r1/work/libvirt-1.3.2_build/src/.libs/libvirt.so ../src/.libs/libvirt_driver_remote.a ../src/.libs/libvirt.so -lcap-ng -lyajl -lnl-route-3 -lnl-3 -lxml2 -ldbus-1 -lgnutls -lssh2 -lcurl ../gnulib/lib/.libs/libgnu.a -lutil -ldl -pthread
/tmp/portage/app-emulation/libvirt-1.3.2-r1/work/libvirt-1.3.2_build/src/.libs/libvirt.so: undefined reference to `major'
/tmp/portage/app-emulation/libvirt-1.3.2-r1/work/libvirt-1.3.2_build/src/.libs/libvirt.so: undefined reference to `minor'
collect2: error: ld returned 1 exit status
Comment 1 Andreas Proteus 2016-04-14 13:38:26 UTC
Created attachment 430440 [details]
emerge --info

My emerge --info output and 

Output of emerge -pqv

[ebuild  N    ] app-emulation/libvirt-1.3.2-r1  USE="caps libvirtd macvtap nls qemu udev vepa -apparmor -audit -avahi -firewalld -fuse -glusterfs -iscsi -lvm -lxc -nfs -numa -openvz -parted -pcap -phyp -policykit -rbd -sasl (-selinux) -systemd -uml -virt-network -virtualbox (-wireshark-plugins) -xen"
Comment 2 Andreas Proteus 2016-04-14 13:48:12 UTC
Created attachment 430442 [details]
Build log

Compressed due to size restrictions.
Comment 3 Matthias Maier gentoo-dev 2016-04-14 20:22:22 UTC
Well, this is due to a Gentoo-specific patch for glibc-2.23:


From 1053a4902ebff0ba30098fdcad614d963de87c3d Mon Sep 17 00:00:00 2001
From: Mike Frysinger <vapier@gentoo.org>
Date: Tue, 29 Dec 2015 17:54:31 -0500
Subject: [PATCH] sys/types.h: drop sys/sysmacros.h include

We want to break apart this include path due to namespace pollution.
https://sourceware.org/ml/libc-alpha/2015-11/msg00253.html
---
 posix/sys/types.h | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/posix/sys/types.h b/posix/sys/types.h
index a728567..b3007db 100644
--- a/posix/sys/types.h
+++ b/posix/sys/types.h
@@ -217,9 +217,6 @@ typedef int register_t __attribute__ ((__mode__ (__word__)));
 
 /* It also defines `fd_set' and the FD_* macros for `select'.  */
 # include <sys/select.h>
-
-/* BSD defines these symbols, so we follow.  */
-# include <sys/sysmacros.h>
 #endif /* Use misc.  */
Comment 4 Andreas Proteus 2016-04-15 02:36:41 UTC
(In reply to Matthias Maier from comment #3)
> Well, this is due to a Gentoo-specific patch for glibc-2.23:

Thank you.

I solved the problem with this:
GLIBC_PATCH_EXCLUDE=00_all_0009-sys-types.h-drop-sys-sysmacros.h-include.patch emerge -1va glibc libvirt 

Taken from bug:575232 comment #7
Comment 5 Sergei Trofimovich gentoo-dev 2016-04-16 10:06:33 UTC
Created attachment 430794 [details, diff]
libvirt-1.3.2-glibc-2.23.patch

libvirt-1.3.2-glibc-2.23.patch - in case you don't want gentoo users to patch their glibc :)
Comment 6 Matthias Maier gentoo-dev 2016-05-01 19:16:45 UTC
Patch applied to 1.3.4 (and future versions) and 9999.


commit 9b146d56acd46538427c709608c17dfe34b43d05
Author: Matthias Maier <tamiko@gentoo.org>
Date:   Sun May 1 13:45:24 2016 -0500

    dev-python/libvirt-python: version bump to 1.3.4, bug #580418
    
    Package-Manager: portage-2.2.26

commit af621c349cb52c36d298d3715ad5b0c784836c1f
Author: Matthias Maier <tamiko@gentoo.org>
Date:   Sun May 1 13:44:23 2016 -0500

    app-emulation/libvirt: version bump to 1.3.4, bug #580418, bug #579960
    
     - bump to version 1.3.4, bug #580418
    
     - apply a build system patch for the sysmacros header change, bug #579960
       fixes the compile error "undefined reference to {'major', 'minor'}"
       due to gentoo specific glibc patches (bug #575232)
    
    Package-Manager: portage-2.2.26