Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Portage & Programming
  • Search

glibc 2.23 and undefined reference to `minor' or `major'

Problems with emerge or ebuilds? Have a basic programming question about C, PHP, Perl, BASH or something else?
Post Reply
Advanced search
31 posts
  • 1
  • 2
  • Next
Author
Message
Tyler_Durden
Apprentice
Apprentice
User avatar
Posts: 189
Joined: Tue Jul 27, 2004 10:01 am
Location: Germany

glibc 2.23 and undefined reference to `minor' or `major'

  • Quote

Post by Tyler_Durden » Wed Feb 24, 2016 8:27 pm

i had problems emerging gnome-base/gvfs:

Code: Select all

gnome-base/gvfs-1.26.3::gentoo  USE="bluray cdda gnome-online-accounts google gphoto2 gtk http ios mtp nfs samba systemd udev udisks zeroconf -afp -archive -fuse -gnome-keyring {-test}"

./.libs/libmetadata.a(metatree.o): In function `meta_lookup_cache_lookup_path':
metatree.c:(.text+0x55f0): undefined reference to `minor'
metatree.c:(.text+0x55fd): undefined reference to `major'
collect2: error: ld returned 1 exit status
and media-libs/mesa:

Code: Select all

media-libs/mesa-11.1.2-r1::gentoo  USE="classic dri3 egl gallium gbm gles2 llvm nptl opencl udev vdpau wayland xvmc -bindist -d3d9 -debug -gles1 -openmax -osmesa -pax_kernel -pic (-selinux) -vaapi -xa" ABI_X86="32 (64) (-x32)" VIDEO_CARDS="(-freedreno) -i915 -i965 -ilo -intel -nouveau -r100 -r200 -r300 -r600 -radeon -radeonsi -vmware"


/var/tmp/portage/media-libs/mesa-11.1.2-r1/work/mesa-11.1.2/src/gbm/main/gbm.c: In function ‘_gbm_mesa_get_device’:
/var/tmp/portage/media-libs/mesa-11.1.2-r1/work/mesa-11.1.2/src/gbm/main/gbm.c:120:11: error: implicit declaration of function ‘major’ [-Werror=implicit-function-declaration]
       if (major(dev) == major(buf.st_rdev) &&
           ^
/var/tmp/portage/media-libs/mesa-11.1.2-r1/work/mesa-11.1.2/src/gbm/main/gbm.c:121:11: error: implicit declaration of function ‘minor’ [-Werror=implicit-function-declaration]
           minor(dev) == minor(buf.st_rdev)) {
           ^
cc1: some warnings being treated as errors
Makefile:857: recipe for target 'main/gbm.lo' failed
After some searching i found that must have something to do with "/usr/include/sys/sysmacros.h" which belongs to sys-libs/glibc. So i downgraded the recently merged v2.23 to 2.22 and these problems were gone 8O

Other packages might be affected.
Gentoo 17.1 x86_64
Intel Core i9-9900K
Asus MAXIMUS XI HERO
AMD Radeon 6800XT
64GB DDR4
Samsung SSD 970 EVO Plus 1TB
8x Seagate Archive (SATA-RAID 64TB)
Digital Devices Cine S2 V6.5 DVB Adapter
Top
zwede
Tux's lil' helper
Tux's lil' helper
Posts: 103
Joined: Tue Jan 03, 2006 4:42 am

  • Quote

Post by zwede » Wed Mar 02, 2016 5:22 am

Thank you SO MUCH for this post!!!!

I had glibc in my package.keywords for some historic reason and got 2.23. Then I started getting these faults halfway through a plasma update and was stuck with no desktop. Couldn't go back to plasma-5.5.4 either as packages that had built previously now didn't build.

Downgrading glibc let me finish the plasma upgrade and my desktop is back.
Top
miyuki
n00b
n00b
Posts: 1
Joined: Thu Mar 24, 2016 9:49 am
Location: Japan

patch causes exclude sys/sysmacros.h

  • Quote

Post by miyuki » Thu Mar 24, 2016 10:06 am

I found the patch "00_all_0009-sys-types.h-drop-sys-sysmacros.h-include.patch" in sys-libs/glibc causes this issue.
This patch drops "#include <sys/sysmacros.h>" from /usr/include/sys/types.h

But of course, this patch was added for some reasons
https://sourceware.org/ml/libc-alpha/20 ... 00253.html

This issue should be solved. I recommends not to install glibc-2.23 before it is keyworded(supported).
Top
ThGravo
n00b
n00b
Posts: 24
Joined: Thu Apr 20, 2006 6:41 pm

  • Quote

Post by ThGravo » Thu Apr 14, 2016 8:48 pm

See Gentoo's Bugzilla: [bug=579990]media-libs/mesa-11.2.0 fails to build against sys-libs/glibc-2.23-r1[/bug]
Top
Ant P.
Watchman
Watchman
Posts: 6920
Joined: Sat Apr 18, 2009 7:18 pm
Contact:
Contact Ant P.
Website

  • Quote

Post by Ant P. » Thu Apr 14, 2016 10:27 pm

xorg-server 1.18.3 too.
Top
steveL
Watchman
Watchman
Posts: 5153
Joined: Wed Sep 13, 2006 1:18 pm
Location: The Peanut Gallery

Re: patch causes exclude sys/sysmacros.h

  • Quote

Post by steveL » Fri Apr 15, 2016 8:14 am

miyuki wrote:I found the patch "00_all_0009-sys-types.h-drop-sys-sysmacros.h-include.patch" in sys-libs/glibc causes this issue.
This patch drops "#include <sys/sysmacros.h>" from /usr/include/sys/types.h

But of course, this patch was added for some reasons
https://sourceware.org/ml/libc-alpha/20 ... 00253.html

This issue should be solved. I recommends not to install glibc-2.23 before it is keyworded(supported).
Hmm the guy who originally proposed dropping the include, and doing distro builds to test breakage, ended up concluding it was not a good idea.

Curious that it should have been applied.

wrt other software, if this isn't reverted upstream, it will have to be patched to #include <sys/sysmacros.h>, a non-standard header.
If upstream want to continue with the patch, IMO it should be locally reverted by Gentoo for that process to complete. (or ~arch users are going to end up in troubles, and likely hard-mask it.)

edit: not <sys/types.h>
Last edited by steveL on Fri Apr 15, 2016 4:49 pm, edited 1 time in total.
Top
Xywa
Veteran
Veteran
User avatar
Posts: 1631
Joined: Sat Jul 23, 2005 2:00 pm
Location: /mnt/Gentoo/Europe

  • Quote

Post by Xywa » Fri Apr 15, 2016 9:11 am

Ant P. wrote:xorg-server 1.18.3 too.
That day I could not compile ANY of xorg-server back 1.16.xxx. Downgrading glibc solved my problems.
Top
steveL
Watchman
Watchman
Posts: 5153
Joined: Wed Sep 13, 2006 1:18 pm
Location: The Peanut Gallery

  • Quote

Post by steveL » Fri Apr 15, 2016 4:47 pm

My mistake; from reading the bug, it appears an inclusion of <sys/sysmacros.h> would be required

Glibc should just stay as-is, imo; ie: Gentoo should revert the patch.

Not going to happen, but there we go.
Top
Ant P.
Watchman
Watchman
Posts: 6920
Joined: Sat Apr 18, 2009 7:18 pm
Contact:
Contact Ant P.
Website

Re: patch causes exclude sys/sysmacros.h

  • Quote

Post by Ant P. » Sat Apr 16, 2016 1:43 am

steveL wrote:Hmm the guy who originally proposed dropping the include, and doing distro builds to test breakage, ended up concluding it was not a good idea.

Curious that it should have been applied.
We're considered lab rats by this idiot, so no surprise it came without a news item or anything.
Top
Buffoon
Veteran
Veteran
User avatar
Posts: 1369
Joined: Wed Jun 17, 2015 2:22 pm
Location: EU or US

  • Quote

Post by Buffoon » Sat Apr 16, 2016 2:29 am

I have mongodb build failure.Glad I found this thread.
Top
Perfect Gentleman
Veteran
Veteran
User avatar
Posts: 1301
Joined: Sun May 18, 2014 10:16 am
Contact:
Contact Perfect Gentleman
Website

  • Quote

Post by Perfect Gentleman » Sat Apr 16, 2016 4:42 am

unpatch the ducking patch

Code: Select all

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,6 +217,9 @@ 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.  */
 
 
-- 
2.6.2
Top
geki
Advocate
Advocate
User avatar
Posts: 2387
Joined: Thu May 13, 2004 8:59 pm
Location: Germania
Contact:
Contact geki
Website

  • Quote

Post by geki » Sat Apr 16, 2016 5:28 am

phew, was about to post in tracker bug,especially because someone posted not to post there. :o
we have some brave hearts in the gentoo developers community.

xf86-video-intel and wine failed so far. fun.
hear hear
Top
hydrapolic
Tux's lil' helper
Tux's lil' helper
Posts: 126
Joined: Thu Feb 07, 2008 11:16 pm

  • Quote

Post by hydrapolic » Sat Apr 16, 2016 5:54 am

Just for reference, here you can find some information:
https://bugs.gentoo.org/show_bug.cgi?id=575232

https://gitweb.gentoo.org/repo/gentoo.g ... f9fc9238eb

Code: Select all

The minor/major/makedev macros are not entirely standard.  glibc has had
the definitions in sys/sysmacros.h since the start, and wants to move away
from always defining them implicitly via sys/types.h (as this pollutes the
namespace in violation of POSIX).  Other C libraries have already dropped
them.  Since the configure script already checks for this header, use that
to pull in the header in files that use these macros.
Top
Ottre
Tux's lil' helper
Tux's lil' helper
User avatar
Posts: 129
Joined: Sun Dec 23, 2012 2:39 pm

  • Quote

Post by Ottre » Sat Apr 16, 2016 9:38 am

geki wrote:we have some brave hearts in the gentoo developers community.
vapier does things for a good reason.

Like the dumb-echo patch for app-shells/dash, to make it a truly POSIX-compliant shell, that caused a lot of build failures.

Pretty much all of them got fixed upstream; they were happy for the increased portability of their shell scripts.
Top
steveL
Watchman
Watchman
Posts: 5153
Joined: Wed Sep 13, 2006 1:18 pm
Location: The Peanut Gallery

  • Quote

Post by steveL » Sat Apr 16, 2016 10:34 am

Ottre wrote:vapier does things for a good reason.
He may have reasons, but his methods suck, big-time.

In this instance he should have hard-masked the version with his unilateral patch, for testing. (This is hardly unfamiliar to him.)

Then he could very easily have smoke-tested the change on a distro-wide level, by the use of a tinderbox (hardly rocket-science, given that users have been doing that for about a decade, to my knowledge), and patched the relevant software (thus making it work on both types of setup on a Linux install.)
If he felt unable to submit a patch, he could just have submitted bugs, pointing out that major/makedev aren't standardised.

Only he prefers to do this via a very convoluted process that wastes everyone's time, most especially that of users.

Because he's worth it^W^W^W he can.
Or perhaps because he's chasing brownie-points with the wrong people (anyone other than Gentoo users.)

AFAIC, it's totally lame. When glibc developers look after you better than "core" distro developers, something's really borked.
Top
steveL
Watchman
Watchman
Posts: 5153
Joined: Wed Sep 13, 2006 1:18 pm
Location: The Peanut Gallery

  • Quote

Post by steveL » Sat Apr 16, 2016 10:43 am

Code: Select all

The minor/major/makedev macros are not entirely standard.  glibc has had
the definitions in sys/sysmacros.h since the start, and wants to move away
from always defining them implicitly via sys/types.h (as this pollutes the
namespace in violation of POSIX).  Other C libraries have already dropped
them.  Since the configure script already checks for this header, use that
to pull in the header in files that use these macros.
Oh puhleez, "violation of POSIX" what rot. Namespace violations only occur if you don't test __USE_BSD (or w/e they're calling it this year) which is set under _GNU_SOURCE or _BSD_SOURCE.

"glibc following the fashion of other libc's" has got to be the funniest part, though.
Top
SlashBeast
Retired Dev
Retired Dev
User avatar
Posts: 2922
Joined: Tue May 23, 2006 11:50 am
Contact:
Contact SlashBeast
Website

Re: patch causes exclude sys/sysmacros.h

  • Quote

Post by SlashBeast » Sat Apr 16, 2016 2:33 pm

Ant P. wrote:
steveL wrote:Hmm the guy who originally proposed dropping the include, and doing distro builds to test breakage, ended up concluding it was not a good idea.

Curious that it should have been applied.
We're considered lab rats by this idiot, so no surprise it came without a news item or anything.
Classic Vapier.
Top
Perfect Gentleman
Veteran
Veteran
User avatar
Posts: 1301
Joined: Sun May 18, 2014 10:16 am
Contact:
Contact Perfect Gentleman
Website

  • Quote

Post by Perfect Gentleman » Sat Apr 16, 2016 3:24 pm

sys-libs/glibc-2.23-r2: Skipping 00_all_0009-sys-types.h-drop-sys-sysmacros.h-include.patch due to EPATCH_EXCLUDE
Top
SlashBeast
Retired Dev
Retired Dev
User avatar
Posts: 2922
Joined: Tue May 23, 2006 11:50 am
Contact:
Contact SlashBeast
Website

  • Quote

Post by SlashBeast » Sat Apr 16, 2016 3:56 pm

https://gitweb.gentoo.org/repo/gentoo.g ... 4cd1d19381
Top
Ant P.
Watchman
Watchman
Posts: 6920
Joined: Sat Apr 18, 2009 7:18 pm
Contact:
Contact Ant P.
Website

  • Quote

Post by Ant P. » Sat Apr 16, 2016 4:48 pm

And to balance out my complaining a bit: there's a dev that's earned my respect.
Top
GuntherDW
n00b
n00b
User avatar
Posts: 38
Joined: Thu Nov 20, 2003 7:05 pm
Location: Belgium
Contact:
Contact GuntherDW
Website

  • Quote

Post by GuntherDW » Sat Apr 16, 2016 5:49 pm

With regards to breakage of the patch, for completionist sake, sys-fs/lvm2-2.02.145-r2 also breaks with the patch applied.
It was a pain trying to find out what exactly caused it to break because I couldn't find something on google.

Only when a mesa recompile broke could I find this thread...

But in all honesty, just using us a mere "testbed" is kind of the wrong attitude I'd expect from a Gentoo developer.
Even if we're running ~arch just blindly applying a patch and letting us report the bugs for you instead of doing research on your own is kind of abhorrent.
I'd expect stuff like this from an experimental overlay, not the main portage tree.
Top
Ottre
Tux's lil' helper
Tux's lil' helper
User avatar
Posts: 129
Joined: Sun Dec 23, 2012 2:39 pm

  • Quote

Post by Ottre » Sat Apr 16, 2016 5:57 pm

steveL wrote:He may have reasons, but his methods suck, big-time.
Yeah, this mess could have been avoided with a news item.

"...Either stay on glibc 2.22 or set the EPATCH_EXCLUDE variable in your glibc bashrc file like so..."

I don't like masking except under extreme circumstances, like an x86 binary package masked on arm, it's a form of procrastination.
Top
Ottre
Tux's lil' helper
Tux's lil' helper
User avatar
Posts: 129
Joined: Sun Dec 23, 2012 2:39 pm

  • Quote

Post by Ottre » Sat Apr 16, 2016 6:01 pm

GuntherDW wrote:I'd expect stuff like this from an experimental overlay, not the main portage tree.
I think it's a major selling point of Gentoo that we have developers who care about POSIX.
Top
GuntherDW
n00b
n00b
User avatar
Posts: 38
Joined: Thu Nov 20, 2003 7:05 pm
Location: Belgium
Contact:
Contact GuntherDW
Website

  • Quote

Post by GuntherDW » Sat Apr 16, 2016 6:16 pm

It's true that caring about POSIX can be a good thing, but his methodology behind just dropping the patch was wrong.
Besides, there's loads of things in the Linux sphere that aren't really POSIX minded.

Most notably things like systemd, but I'd rather not open that can of worms here :P.
Top
Ant P.
Watchman
Watchman
Posts: 6920
Joined: Sat Apr 18, 2009 7:18 pm
Contact:
Contact Ant P.
Website

  • Quote

Post by Ant P. » Sun Apr 17, 2016 7:07 pm

Ottre wrote:
GuntherDW wrote:I'd expect stuff like this from an experimental overlay, not the main portage tree.
I think it's a major selling point of Gentoo that we have developers who care about POSIX.
There's "caring about POSIX" and then there's "standards wankery". This change firmly belongs in the same group as the pointless memcpy change which broke Flash for everyone.
Top
Post Reply

31 posts
  • 1
  • 2
  • Next

Return to “Portage & Programming”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic