Bug 47649

Summary: fatal error: shared-glapi/glapi_mapi_tmp.h: No such file or directory
Product: Mesa Reporter: Fabio Pedretti <pedretti.fabio>
Component: Mesa coreAssignee: mesa-dev
Status: RESOLVED FIXED QA Contact:
Severity: major    
Priority: medium CC: krh
Version: git   
Hardware: All   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:

Description Fabio Pedretti 2012-03-21 06:50:46 UTC
After recent glapi changes I get this compile error:

In file included from ../../../../../src/mapi/mapi/entry.c:69:0:
../../../../../src/mapi/mapi/mapi_tmp.h:48:25: fatal error: shared-glapi/glapi_mapi_tmp.h: No such file or directory
compilation terminated.

Full log is available at:
https://launchpadlibrarian.net/97711911/buildlog_ubuntu-precise-amd64.mesa_8.1~git1203210950.b4082f~gd~p_FAILEDTOBUILD.txt.gz
Comment 1 Fabio Pedretti 2012-03-27 07:14:51 UTC
This compile bug is still reproducible. It is broking building packages of git mesa, so users can't test new features.

Can someone fix it or revert the commit?
Comment 2 Kristian Høgsberg 2012-03-27 08:10:59 UTC
(In reply to comment #1)
> This compile bug is still reproducible. It is broking building packages of git
> mesa, so users can't test new features.
> 
> Can someone fix it or revert the commit?

I can not reproduce this build bug with a clean checkout of mesa:

I use:

  ./autogen.sh --prefix=/usr --libdir=/usr/lib64 --with-dri-drivers=i965 --with-egl-platforms=x11,drm,wayland --enable-shared-glapi --with-gallium-drivers=swrast --enable-gles2

and the only important part here should be --enable-shared-glapi, which I see you also use.

Right after typing make, I get

[krh@minato mesa]$ make -j5
make[1]: Entering directory `/home/krh/src/tmp-build/mesa/src'
Making sources for autoconf
gmake[2]: Entering directory `/home/krh/src/tmp-build/mesa/src/mapi/shared-glapi'
python2  ../../../src/mapi/mapi/mapi_abi.py --mode lib --printer shared-glapi ../../../src/mapi/glapi/gen/gl_and_es_API.xml > glapi_mapi_tmp.h
gmake  all-am

It looks like your packages touch the mapi files a bit, so maybe it's a problem in the patches you have?
Comment 3 Fabio Pedretti 2012-03-28 07:18:50 UTC
This is still reproducible also with the custom patches disabled:
https://launchpadlibrarian.net/98554602/buildlog_ubuntu-precise-i386.mesa_8.1~git1203271746.7f6af4~gd~p_FAILEDTOBUILD.txt.gz

Note:
python2  ../../../../../src/mapi/mapi/mapi_abi.py --mode lib --printer shared-glapi ../../../../../src/mapi/glapi/gen/gl_and_es_API.xml > glapi_mapi_tmp.h

then:
../../../../../src/mapi/mapi/mapi_tmp.h:48:25: fatal error: shared-glapi/glapi_mapi_tmp.h: No such file or directory

Maybe glapi_mapi_tmp.h is put in a wrong directory?
Comment 4 Kristian Høgsberg 2012-03-28 07:50:32 UTC
(In reply to comment #3)
> This is still reproducible also with the custom patches disabled:
> https://launchpadlibrarian.net/98554602/buildlog_ubuntu-precise-i386.mesa_8.1~git1203271746.7f6af4~gd~p_FAILEDTOBUILD.txt.gz

Ok, patches or not, there's still some exotic building going on here:


mkdir -p /build/buildd/mesa-8.1~git1203271746.7f6af4~gd~p/build/dri
find /build/buildd/mesa-8.1~git1203271746.7f6af4~gd~p/* -maxdepth 0 -not -path '/build/buildd/mesa-8.1~git1203271746.7f6af4~gd~p/build*' | \
		xargs cp -rlf -t /build/buildd/mesa-8.1~git1203271746.7f6af4~gd~p/build/dri

...

cd /build/buildd/mesa-8.1~git1203271746.7f6af4~gd~p/build/dri && \
	../../configure --prefix=/usr --mandir=\${prefix}/share/man \
	             --infodir=\${prefix}/share/info --sysconfdir=/etc \
	             --libdir=\${prefix}/lib/i386-linux-gnu \
	             --localstatedir=/var --build=i686-linux-gnu --with-driver=dri --with-dri-drivers=" r200 radeon nouveau swrast i915 i965" --with-dri-driverdir=/usr/lib/i386-linux-gnu/dri --enable-glx-tls --enable-shared-dricore --enable-shared-glapi --enable-texture-float --enable-xa --enable-debug --enable-gallium-g3dvl --enable-driglx-direct --with-egl-platforms="x11 drm" --enable-gallium-llvm --with-gallium-drivers=" nouveau r600 r300 svga i915 swrast" --enable-gles1 --enable-gles2 --enable-openvg --enable-gallium-egl --disable-glu CFLAGS="-Wall -g -O2" CXXFLAGS="-Wall -g -O2"

which look like a custom out-of-tree build, which we don't really support.  But maybe give this patch a try:


diff --git a/src/mapi/shared-glapi/Makefile.am b/src/mapi/shared-glapi/Makefile.
index 8988d28..25370ad 100644
--- a/src/mapi/shared-glapi/Makefile.am
+++ b/src/mapi/shared-glapi/Makefile.am
@@ -18,6 +18,7 @@ AM_CPPFLAGS =                                                 
        $(DEFINES)                                              \
        -I$(top_srcdir)/include                                 \
        -I$(top_srcdir)/src/mapi                                \
+       -I$(top_builddir)/src/mapi                              \
        -DMAPI_MODE_GLAPI                                       \
        -DMAPI_ABI_HEADER=\"shared-glapi/glapi_mapi_tmp.h\"
Comment 5 Fabio Pedretti 2012-03-29 03:53:13 UTC
> But maybe give this patch a try:

The patch fixes the issue indeed, thanks.
Comment 6 Kristian Høgsberg 2012-03-29 06:25:54 UTC
Thanks for testing!

commit 2402ce04ae06f909e361782f5063fa3070091bf1
Author: Kristian Høgsberg <krh@bitplanet.net>
Date:   Thu Mar 29 09:20:53 2012 -0400

    shared-glapi: Include from builddir
    
    Fixes out-of-tree builds.
    
    https://bugs.freedesktop.org/show_bug.cgi?id=47649

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.