Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 486712

Summary: app-eselect/eselect-mesa: does not respect libdir
Product: Gentoo Linux Reporter: Michał Górny <mgorny>
Component: Current packagesAssignee: Gentoo X packagers <x11>
Status: RESOLVED WONTFIX    
Severity: normal CC: alexander, arthur, dschridde+gentoobugs, floppym, haavardw, jcallen, kaikaikai, multilib+disabled, nikoli, pacho, pastas4, polynomial-c, qa, tsmksubc, tsmx
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
See Also: https://bugs.gentoo.org/show_bug.cgi?id=576334
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 506276    
Attachments: Properly hand SYMLINK_LIB=no

Description Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2013-10-01 21:04:35 UTC
MESA_DIR_64="${EROOT}/usr/lib/mesa"
DRI_DIR_64="${EROOT}/usr/lib/dri"

This is definitely incorrect and breaks systems with 'modern' multilib.
Comment 1 Alexander Tsoy 2014-12-15 13:35:57 UTC
(In reply to Michał Górny from comment #0)
> This is definitely incorrect and breaks systems with 'modern' multilib.

And systems with SYMLINK_LIB=no (bug 506276)
Comment 2 Mike Gilbert gentoo-dev 2015-04-04 17:55:17 UTC
It seems like this eselect module assumes there will only ever be two ABIs; mips has three.

This could use a bit of work. I'll see what I can do.
Comment 3 SpanKY gentoo-dev 2015-04-04 19:32:29 UTC
(In reply to Mike Gilbert from comment #2)

x86 has three too ;)
Comment 4 Steven Newbury 2016-02-20 23:36:05 UTC
Created attachment 426040 [details, diff]
Properly hand SYMLINK_LIB=no
Comment 5 Steven Newbury 2016-02-20 23:37:09 UTC
I'm sorry about sitting with this in my github bug staging overlay for, err years...
Comment 6 Dainius Masiliūnas 2016-02-23 23:27:45 UTC
While that solves the x32 issue, it's... still pretty ugly. For one, calling the other two options "32bit" and "64bit" is wrong to begin with; x32 is technically 32bit too. They should either be called by archs ("x86" and "amd64"), or by ABI_X86 and /usr/lib* names ("32" and "64").

In addition, instead of copying everything, maybe it could generate the list of all ABIs on the fly, to prevent the same issue happening as soon as another ABI is added (or removed)? I think that was the original idea of this bug report to begin with. And just checking whether /usr/lib is a symlink sounds rather fragile to me.

Also, I think this bug report should also block the x32 tracker bug.
Comment 7 Mike Gilbert gentoo-dev 2016-02-26 13:11:08 UTC
I have done some more extensive changes to this, I just forgot about them for a year.

https://github.com/floppym/eselect/commits/extern

After consulting with the X11 team, we agreed that the 32bit and 64bit options are rather pointless, so I removed them. Instead, all configured libdirs are updated in-sync.

The ebuild will need to be adjusted to replace LIBDIRS=( lib ) with the real list if libdirs configured in the profile at build time.
Comment 8 Dainius Masiliūnas 2016-07-29 15:15:55 UTC
So what's the plan forward now? Nuke eselect-mesa altogether?
Comment 9 Alexander Tsoy 2016-07-29 15:32:53 UTC
(In reply to Mike Gilbert from comment #7)

> The ebuild will need to be adjusted to replace LIBDIRS=( lib ) with the real
> list if libdirs configured in the profile at build time.

This should be implemented in app-admin/eselect and reused by other modules. Currently the list of libdirs is hardcoded [1]:
ES_VALID_MULTILIB_DIRS="lib lib32 lib64 libx32"

[1] https://gitweb.gentoo.org/proj/eselect.git/tree/libs/multilib.bash.in
Comment 10 Mike Gilbert gentoo-dev 2016-07-29 18:04:16 UTC
(In reply to Alexander Tsoy from comment #9)

Good point. I forgot eselect had a library for this.
Comment 11 Matt Turner gentoo-dev 2018-01-21 01:24:08 UTC
*** Bug 645148 has been marked as a duplicate of this bug. ***
Comment 12 Alexey Korepanov 2018-03-12 11:29:26 UTC
This is a very frustrating bug. It took me a couple of days to figure out what the problem with the opengl apps is...

An update broke the opengl apps. Because of this bug, in eselect mesa I see
teres ~ 
# eselect mesa list
i915 (Intel 915, 945)
i965 (Intel GMA 965, G/Q3x, G/Q4x, HD)
r300 (Radeon R300-R500)
r600 (Radeon R600-R700, Evergreen, Northern Islands)
sw (Software renderer)
teres ~ 
# eselect mesa show
teres ~ 

The bug is around for over 4 years. Should it get fixed?
Comment 13 charles17 2018-05-27 08:30:57 UTC
Should be fixed by https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2411166e5