Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 461440 - media-libs/mesa-9.1[video_cards_nouveau,xorg] nouveau_xorg.c:32:21: fatal error: nouveau.h: No such file or directory
Summary: media-libs/mesa-9.1[video_cards_nouveau,xorg] nouveau_xorg.c:32:21: fatal err...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Library (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo X packagers
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2013-03-11 17:42 UTC by Andrew Savchenko
Modified: 2013-03-29 21:22 UTC (History)
1 user (show)

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


Attachments
build.log.xz (build.log.xz,48.06 KB, application/x-xz)
2013-03-11 17:43 UTC, Andrew Savchenko
Details
emerge --info (emerge.info,8.18 KB, text/plain)
2013-03-11 17:43 UTC, Andrew Savchenko
Details
environment (environment,147.43 KB, text/plain)
2013-03-11 17:43 UTC, Andrew Savchenko
Details
mesa-9.1-nouveau.patch (mesa-9.1-nouveau.patch,373 bytes, patch)
2013-03-11 17:45 UTC, Andrew Savchenko
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Savchenko gentoo-dev 2013-03-11 17:42:57 UTC
Hello,

mesa-9.1 fails to build with nouveau support, libdrm-2.4.42 with nouveau support is installed.

libtool: compile:  x86_64-pc-linux-gnu-gcc -DPACKAGE_NAME=\"Mesa\" -DPACKAGE_TARNAME=\"mesa\" -DPACKAGE_VERSION=\"9.1.0\" "-DPACKAGE_STRING=\"Mesa 9.1.0\"" "-DPACKAGE_BUGREPORT=\"https://bugs.freedesktop.org/enter_bug.cgi?product=Mesa\"" -DPACKAGE_URL=\"\" -DPACKAGE=\"mesa\" -DVERSION=\"9.1.0\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -DYYTEXT_POINTER=1 -DHAVE_PTHREAD=1 -DHAVE_LIBEXPAT=1 -I. -I../../../../src/gallium/drivers -I../../../../src/gallium/winsys -DHAVE_CONFIG_H -DGALLIUM_RBUG -DGALLIUM_TRACE -I../../../../include -I../../../../src/gallium/include -I../../../../src/gallium/auxiliary -D_GNU_SOURCE -DHAVE_PTHREAD -DTEXTURE_FLOAT_ENABLED -DUSE_X86_64_ASM -DHAVE_DLOPEN -DHAVE_POSIX_MEMALIGN -DIN_DRI_DRIVER -DGLX_INDIRECT_RENDERING -DGLX_DIRECT_RENDERING -DGLX_USE_TLS -DHAVE_PTHREAD -DUSE_EXTERNAL_DXTN_LIB=1 -DIN_DRI_DRIVER -DHAVE_ALIAS -DHAVE_MINCORE -DHAVE_LIBUDEV -DHAVE_XEXTPROTO_71 -DHAVE_LLVM=0x0303 -pthread -fvisibility=hidden -I/usr/include/xorg -I/usr/include/pixman-1 -I/usr/include -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -march=core2 --param l1-cache-line-size=64 --param l1-cache-size=32 --param l2-cache-size=3072 -O2 -funswitch-loops -fpredictive-commoning -fgcse-after-reload -ftree-vectorize -ftree-loop-linear -ftree-loop-im -fweb -frename-registers -fomit-frame-pointer -fexcess-precision=fast -pipe -frecord-gcc-switches -ffast-math -Wall -std=c99 -Werror=implicit-function-declaration -Werror=missing-prototypes -fno-strict-aliasing -fno-builtin-memcmp -c nouveau_xorg.c  -fPIC -DPIC -o .libs/nouveau_xorg.o
nouveau_xorg.c:32:21: fatal error: nouveau.h: No such file or directory
compilation terminated.
Comment 1 Andrew Savchenko gentoo-dev 2013-03-11 17:43:35 UTC
Created attachment 341722 [details]
build.log.xz
Comment 2 Andrew Savchenko gentoo-dev 2013-03-11 17:43:47 UTC
Created attachment 341724 [details]
emerge --info
Comment 3 Andrew Savchenko gentoo-dev 2013-03-11 17:43:58 UTC
Created attachment 341726 [details]
environment
Comment 4 Andrew Savchenko gentoo-dev 2013-03-11 17:45:46 UTC
Created attachment 341728 [details, diff]
mesa-9.1-nouveau.patch

Use proper include for nouveau.h header, works for me with the latest libdrm-2.4.42. I don't know if it may break with older libdrm version or not.
Comment 5 Chí-Thanh Christopher Nguyễn gentoo-dev 2013-03-12 15:31:31 UTC
Yes, looks like it was forgotten to update the nouveau xorg state tracker. Upstream considers it unsupported and deprecated anyway.
Comment 6 Chí-Thanh Christopher Nguyễn gentoo-dev 2013-03-12 18:42:52 UTC
I tried to reproduce the problem, but it built fine here no matter which flags (using libdrm-2.4.42). So maybe something is nonstandard on your system?

Anyway this patch might be better:

diff -ur a/src/gallium/targets/xorg-nouveau/Makefile.am b/src/gallium/targets/xorg-nouveau/Makefile.am
--- a/src/gallium/targets/xorg-nouveau/Makefile.am      2013-02-20 01:26:22.000000000 +0100
+++ b/src/gallium/targets/xorg-nouveau/Makefile.am      2013-03-12 19:16:27.932923389 +0100
@@ -31,7 +31,8 @@
        -I$(top_srcdir)/src/gallium/winsys \
        -DHAVE_CONFIG_H \
        -DGALLIUM_RBUG \
-       -DGALLIUM_TRACE
+       -DGALLIUM_TRACE \
+       $(shell $(PKG_CONFIG) --cflags-only-I libdrm)
 
 xorgdir = $(XORG_DRIVER_INSTALL_DIR)
 xorg_LTLIBRARIES = nouveau2_drv.la
Comment 7 Andrew Savchenko gentoo-dev 2013-03-12 20:21:08 UTC
Hello,

(In reply to comment #5)
> Yes, looks like it was forgotten to update the nouveau xorg state tracker.
> Upstream considers it unsupported and deprecated anyway.

Hmm, this disturbs me. How nouveau driver should be used then?

(In reply to comment #6)
> I tried to reproduce the problem, but it built fine here no matter which
> flags (using libdrm-2.4.42). So maybe something is nonstandard on your
> system?

It may be so... This system is still not fully updated due to some severe build failures I haven't fixed yet. Maybe some leftover la files or so are still present. I'll recheck this issue after full update will be completed.
Comment 8 Chí-Thanh Christopher Nguyễn gentoo-dev 2013-03-12 21:29:05 UTC
(In reply to comment #7)
> > Yes, looks like it was forgotten to update the nouveau xorg state tracker.
> > Upstream considers it unsupported and deprecated anyway.
> 
> Hmm, this disturbs me. How nouveau driver should be used then?

You should use xf86-video-nouveau and not build mesa with xorg flag (which is disabled by default anyway).
Comment 9 Andrew Savchenko gentoo-dev 2013-03-13 14:28:29 UTC
(In reply to comment #8)

> You should use xf86-video-nouveau 

I already use it. I USE VIDEO_CARDS="nvidia nouveau nv", always thought this should do the right job with flags.

> and not build mesa with xorg flag (which is disabled by default anyway).

I have xorg flag in make.conf because xorg-server requires it and it is not enabled by default.
Comment 10 Chí-Thanh Christopher Nguyễn gentoo-dev 2013-03-13 15:40:28 UTC
xorg is enabled by default for xorg-server in /usr/portage/profiles/base/package.use
Comment 11 Andrew Savchenko gentoo-dev 2013-03-29 21:22:47 UTC
Looks like this is fixed in mesa-9.1.1: it builds fine.