Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 431794 - media-libs/mesa-8.1_rc1_pre20120814 installs i965 without setting on VIDEO_CARDS
Summary: media-libs/mesa-8.1_rc1_pre20120814 installs i965 without setting on VIDEO_CARDS
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo X packagers
URL:
Whiteboard:
Keywords:
: 522878 (view as bug list)
Depends on:
Blocks:
 
Reported: 2012-08-18 00:48 UTC by Luis Medinas
Modified: 2014-09-15 19:18 UTC (History)
2 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Luis Medinas 2012-08-18 00:48:06 UTC
[ebuild   R    ] media-libs/mesa-8.1_rc1_pre20120814  USE="classic egl gallium llvm nptl shared-glapi -bindist -d3d -debug -g3dvl -gbm -gles1 -gles2 -openvg -osmesa -pax_kernel -pic -r600-llvm-compiler (-selinux) -vdpau -wayland -xa -xorg -xvmc" VIDEO_CARDS="intel -i915 -i965 -nouveau -r100 -r200 -r300 -r600 -radeon -radeonsi -vmware" 0 kB


ls /usr/lib64/dri/
i915_dri.so  i915g_dri.so  swrast_dri.so  swrastg_dri.so  i965_dri.so


It should not build/install i965.

emerge --info
Portage 2.2.0_alpha121 (default/linux/amd64/10.0/desktop/gnome, gcc-4.7.1, glibc-2.15-r2, 3.5.2-gentoo x86_64)
=================================================================
System uname: Linux-3.5.2-gentoo-x86_64-Intel-R-_Core-TM-_i7-2630QM_CPU_@_2.00GHz-with-gentoo-2.1
Timestamp of tree: Fri, 17 Aug 2012 22:30:01 +0000
app-shells/bash:          4.2_p37
dev-lang/python:          2.7.3-r2, 3.2.3-r1
dev-util/cmake:           2.8.8-r3
dev-util/pkgconfig:       0.27
sys-apps/baselayout:      2.1-r1
sys-apps/openrc:          0.10.5
sys-apps/sandbox:         2.6
sys-devel/autoconf:       2.13, 2.69
sys-devel/automake:       1.11.6, 1.12.3
sys-devel/binutils:       2.22.90
sys-devel/gcc:            4.6.3, 4.7.1
sys-devel/gcc-config:     1.7.3
sys-devel/libtool:        2.4.2
sys-devel/make:           3.82-r3
sys-kernel/linux-headers: 3.5 (virtual/os-headers)
sys-libs/glibc:           2.15-r2
Repositories: gentoo sabayon
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=corei7 -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="${EPREFIX}/etc/gconf /etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-march=corei7 -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles news parallel-fetch parse-eapi-ebuild-head preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="en_US.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="pt pt_PT de de_DE en en_EN"
MAKEOPTS="-j5"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/var/lib/layman/sabayon"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X a52 aac acl acpi alsa amd64 avahi berkdb bluetooth branding bzip2 cairo cdda cdr cli clutter colord consolekit cracklib crypt cups cxx dbus dri dts dvd dvdr eds emboss encode evo exif fam ffmpeg firefox flac fortran gdbm gdm gif gnome gnome-keyring gnome-online-accounts gstreamer gtk gtk2 gtk3 iconv ipv6 jpeg laptop lcms ldap libkms libnotify mad mmx mng modules mp3 mp4 mpeg mudflap multilib nautilus ncurses networkmanager nls nptl offensive ogg opengl openmp pam pango pcre pdf plymouth png policykit polkit ppds pppd pulseaudio qt3support readline sdl sendto session socialweb spell sse sse2 ssl startup-notification svg systemd taglib tcpd theora tiff tracker truetype udev udisks unicode upower usb vala vorbis vpx wxwidgets x264 xcb xinerama xml xv xvid zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" DRACUT_MODULES="plymouth" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" GRUB_PLATFORMS="pc" INPUT_DEVICES="evdev keyboard mouse synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="pdfimport presenter-console presenter-minimizer" LINGUAS="pt pt_PT de de_DE en en_EN" PHP_TARGETS="php5-3" PYTHON_TARGETS="python3_2 python2_7" RUBY_TARGETS="ruby19" USERLAND="GNU" VIDEO_CARDS="intel nvidia" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON

Reproducible: Always
Comment 1 Derk W te Bokkel 2012-08-18 02:51:28 UTC
um .. ebuild has alway built both for the intel flag as it is supposed to! If you want exclusivity use i915 or i965 flag. works as designed .. read the ebuild ..
Comment 2 Luis Medinas 2012-08-18 18:02:48 UTC
(In reply to comment #1)
> um .. ebuild has alway built both for the intel flag as it is supposed to!
> If you want exclusivity use i915 or i965 flag. works as designed .. read the
> ebuild ..

Hey i don't agree with you. Im a user not a ebuild developer i should be able to not be confused by any of these flags. If xorg-x11 uses intel mesa should use it too for i915 not for i965.
Comment 3 Derk W te Bokkel 2012-08-18 18:38:48 UTC
sorry but the intel, i915 and i965 use flags for  mesa are completely different from the kernel i915 module required for use of the xf86-video-intel software which does not use any of the intel,i915 or i965 use flags. 

So there is no problem with the ebuilds.
Comment 4 Matt Turner gentoo-dev 2012-08-18 20:36:15 UTC
(In reply to comment #2)
> (In reply to comment #1)
> > um .. ebuild has alway built both for the intel flag as it is supposed to!
> > If you want exclusivity use i915 or i965 flag. works as designed .. read the
> > ebuild ..
> 
> Hey i don't agree with you. Im a user not a ebuild developer i should be
> able to not be confused by any of these flags. If xorg-x11 uses intel mesa
> should use it too for i915 not for i965.

The 'intel' video card USE flag turns on the two Intel drivers i915 and i965 (and i915g if you have Gallium enabled). i915 turns on i915, and i965 turns on i965. The i9*5 flags allow you to build one without the other.

What exactly do you think these flags should do differently?
Comment 5 Luis Medinas 2012-08-18 21:51:42 UTC
(In reply to comment #4)
> (In reply to comment #2)
> > (In reply to comment #1)
> > > um .. ebuild has alway built both for the intel flag as it is supposed to!
> > > If you want exclusivity use i915 or i965 flag. works as designed .. read the
> > > ebuild ..
> > 
> > Hey i don't agree with you. Im a user not a ebuild developer i should be
> > able to not be confused by any of these flags. If xorg-x11 uses intel mesa
> > should use it too for i915 not for i965.
> 
> The 'intel' video card USE flag turns on the two Intel drivers i915 and i965
> (and i915g if you have Gallium enabled). i915 turns on i915, and i965 turns
> on i965. The i9*5 flags allow you to build one without the other.
> 
> What exactly do you think these flags should do differently?

I only think that all flags on gentoo portage should be uniform. I mean if you set intel for everything i expect to have the same effect on Mesa. I mean or "intel" use flag doesnt exist or instead it builds i915 or i965 but not both.
Comment 6 Luis Medinas 2012-08-18 22:00:10 UTC
What happens now is that i have 3d broken because of this flag mess.

LIBGL_DEBUG=verbose totem
libGL: OpenDriver: trying /usr/lib64/dri/tls/i965_dri.so
libGL: OpenDriver: trying /usr/lib64/dri/i965_dri.so
libGL error: dlopen /usr/lib64/dri/i965_dri.so failed (/usr/lib64/dri/i965_dri.so: cannot open shared object file: No such file or directory)
libGL error: unable to load driver: i965_dri.so
libGL error: driver pointer missing
libGL error: failed to load driver: i965
libGL: OpenDriver: trying /usr/lib64/dri/tls/swrast_dri.so
libGL: OpenDriver: trying /usr/lib64/dri/swrast_dri.so
libGL: Can't open configuration file /home/metalgod/.drirc: No such file or directory.
libGL: Can't open configuration file /home/metalgod/.drirc: No such file or directory.
Comment 7 Chí-Thanh Christopher Nguyễn gentoo-dev 2012-08-18 22:37:13 UTC
I think the description of the use_expand flags is maybe not precise enough.

> # equery uses mesa
> video_cards_i915    : VIDEO_CARDS setting to build driver for Intel i915 video cards
> video_cards_i965    : VIDEO_CARDS setting to build driver for Intel i965 video cards         
> video_cards_intel   : VIDEO_CARDS setting to build driver for Intel video cards              

could maybe be changed to

> video_cards_i915    : VIDEO_CARDS setting to build driver for Intel i915/945 and earlier video cards
> video_cards_i965    : VIDEO_CARDS setting to build driver for Intel i965, G31/Q33 and later video cards
> video_cards_intel   : VIDEO_CARDS setting to build driver for all supported Intel video cards

That way, there would be no confusion about the flags and their effects any more.
Comment 8 Matt Turner gentoo-dev 2012-08-19 00:24:57 UTC
(In reply to comment #5)
> I only think that all flags on gentoo portage should be uniform. I mean if
> you set intel for everything i expect to have the same effect on Mesa. I
> mean or "intel" use flag doesnt exist or instead it builds i915 or i965 but
> not both.

Sorry, I still don't understand. What do you think the following flag combinations should build?

VIDEO_CARDS="intel"

VIDEO_CARDS="intel i965"

VIDEO_CARDS="i965"

You mention

(In reply to comment #6)
> What happens now is that i have 3d broken because of this flag mess.
> 
> LIBGL_DEBUG=verbose totem
> libGL: OpenDriver: trying /usr/lib64/dri/tls/i965_dri.so
> libGL: OpenDriver: trying /usr/lib64/dri/i965_dri.so
> libGL error: dlopen /usr/lib64/dri/i965_dri.so failed
> (/usr/lib64/dri/i965_dri.so: cannot open shared object file: No such file or
> directory)
> libGL error: unable to load driver: i965_dri.so
> libGL error: driver pointer missing
> libGL error: failed to load driver: i965
> libGL: OpenDriver: trying /usr/lib64/dri/tls/swrast_dri.so
> libGL: OpenDriver: trying /usr/lib64/dri/swrast_dri.so
> libGL: Can't open configuration file /home/metalgod/.drirc: No such file or
> directory.
> libGL: Can't open configuration file /home/metalgod/.drirc: No such file or
> directory.

So the problem is that you're missing i965? I don't understand what is confusing you about the VIDEO_CARD settings.
Comment 9 Luis Medinas 2012-08-19 00:31:50 UTC
i have a i915 card and i have this variables: VIDEO_CARDS="intel nvidia"

i was surprised to see that totem failed to start (actually i got a segfault) because it tries to use i965. I was surprised again why i have i965 if i don't have any USE flag to enable it. After your comment i realized that i should add i915 to my VIDEO_CARDS to have MESA build with i915 support only. But after this 3D support got broken and i add to fallback to remove i915 from VIDEO_CARDS. 

Am i the only one with this problem ? I guess not since the USE flags are really easy to messed up on MESA. My feeling is that you should remove intel use flag and make the whole gentoo portage ebuilds use i915. Really the USE flags need consistence.
Comment 10 Matt Turner gentoo-dev 2012-08-19 00:38:50 UTC
(In reply to comment #9)
> i have a i915 card and i have this variables: VIDEO_CARDS="intel nvidia"
> 
> i was surprised to see that totem failed to start (actually i got a
> segfault) because it tries to use i965. I was surprised again why i have
> i965 if i don't have any USE flag to enable it. After your comment i
> realized that i should add i915 to my VIDEO_CARDS to have MESA build with
> i915 support only. But after this 3D support got broken and i add to
> fallback to remove i915 from VIDEO_CARDS. 

I don't know why totem is trying to load i965, but the problem isn't that the i965 driver is installed.

> Am i the only one with this problem ? I guess not since the USE flags are
> really easy to messed up on MESA. My feeling is that you should remove intel
> use flag and make the whole gentoo portage ebuilds use i915. Really the USE
> flags need consistence.

The other uses of VIDEO_CARDS="intel" (ie in libdrm) support Intel cards in general, not just i915.

The VIDEO_CARDS flags are designed such that users that don't know or care about which Intel card they have can simply set VIDEO_CARDS=intel and get the right driver. If they know which they need, they can add it to package.use and not bother compiling and installing drivers they don't need.

I don't see any reason to change this.
Comment 11 Luis Medinas 2012-08-19 00:46:26 UTC
(In reply to comment #10)
> (In reply to comment #9)
> > i have a i915 card and i have this variables: VIDEO_CARDS="intel nvidia"
> > 
> > i was surprised to see that totem failed to start (actually i got a
> > segfault) because it tries to use i965. I was surprised again why i have
> > i965 if i don't have any USE flag to enable it. After your comment i
> > realized that i should add i915 to my VIDEO_CARDS to have MESA build with
> > i915 support only. But after this 3D support got broken and i add to
> > fallback to remove i915 from VIDEO_CARDS. 
> 
> I don't know why totem is trying to load i965, but the problem isn't that
> the i965 driver is installed.
> 
> > Am i the only one with this problem ? I guess not since the USE flags are
> > really easy to messed up on MESA. My feeling is that you should remove intel
> > use flag and make the whole gentoo portage ebuilds use i915. Really the USE
> > flags need consistence.
> 
> The other uses of VIDEO_CARDS="intel" (ie in libdrm) support Intel cards in
> general, not just i915.
> 
> The VIDEO_CARDS flags are designed such that users that don't know or care
> about which Intel card they have can simply set VIDEO_CARDS=intel and get
> the right driver. If they know which they need, they can add it to
> package.use and not bother compiling and installing drivers they don't need.
> 
> I don't see any reason to change this.

I belive you :) but i think you should see my point, you forced me to set intel on my VIDEO_CARDS, then MESA installs the two drivers and only need one, totem/gnome-shell/gdm broke because i use VIDEO_CARDS="intel nvidia i915" and then remove i915 everything is working but i still got the i965.

So im not trying to be picky or anything im just following your logic.
Comment 12 Chí-Thanh Christopher Nguyễn gentoo-dev 2012-08-19 22:16:52 UTC
> libGL error: dlopen /usr/lib64/dri/i965_dri.so failed (/usr/lib64/dri/i965_dri.so: cannot open shared object file: No such file or directory)

This means you have an i965 card. The i965_dri.so filename is hardcoded into xf86-video-intel, and cannot be changed through USE flags.

Building mesa with VIDEO_CARDS="intel" or "i965" or "i965 intel" should give you the correct driver for that. If the above error message persists, then there is maybe a problem with eselect opengl.
Comment 13 Matt Turner gentoo-dev 2012-08-22 17:30:12 UTC
Luis... so what do you think the VIDEO_CARDS settings in comment #8 should do?
Comment 14 Luis Medinas 2012-08-22 22:21:30 UTC
(In reply to comment #13)
> Luis... so what do you think the VIDEO_CARDS settings in comment #8 should
> do?

For the sake of consistency i think intel should build i915 and i965 build only i965. And yes i do understand the flags of MESA so its a bit hard to archive a good solution for everyone.
Comment 15 Rémi Cardona (RETIRED) gentoo-dev 2012-08-24 05:59:43 UTC
(In reply to comment #14)
> For the sake of consistency i think intel should build i915 and i965 build
> only i965. And yes i do understand the flags of MESA so its a bit hard to
> archive a good solution for everyone.

That is not consistent at all. We have VIDEO_CARDS=intel everywhere which builds anything and everything related to Intel GPUs.

Mesa loads _either_ i915_dri.so _or_ i965_dri.so based solely on a PCI ID list, since no GPU is supported by both drivers.

So in other words, as far as mesa is concerned, having VIDEO_CARDS=intel is strictly equivalent to having VIDEO_CARDS="i915 i965".

Having VIDEO_CARDS=intel not build support for all Intel GPUs would confuse just about anyone.

Cheers
Comment 16 Matt Turner gentoo-dev 2012-09-01 05:10:42 UTC
So I think we'll close this..
Comment 17 Rémi Cardona (RETIRED) gentoo-dev 2014-09-15 19:18:18 UTC
*** Bug 522878 has been marked as a duplicate of this bug. ***