Bug 61919 - make fails without C_INCLUDE_PATH: xlib_sw_winsys.c:49:33: fatal error: X11/extensions/XShm.h: No such file or directory
Summary: make fails without C_INCLUDE_PATH: xlib_sw_winsys.c:49:33: fatal error: X11/e...
Status: RESOLVED WORKSFORME
Alias: None
Product: Mesa
Classification: Unclassified
Component: Other (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: mesa-dev
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-03-06 21:37 UTC by Darxus
Modified: 2013-06-12 19:47 UTC (History)
3 users (show)

See Also:
i915 platform:
i915 features:


Attachments
patch (425 bytes, patch)
2013-03-09 00:37 UTC, Matt Turner
Details | Splinter Review
patch (698 bytes, patch)
2013-03-09 00:42 UTC, Matt Turner
Details | Splinter Review
Patch to fix CFLAGS (779 bytes, patch)
2013-06-12 07:26 UTC, Quentin "Sardem FF7" Glidic
Details | Splinter Review

Description Darxus 2013-03-06 21:37:09 UTC
Making all in xlib
make[4]: Entering directory `/home/darxus/source/mesa/src/gallium/winsys/sw/xlib'
  CC     xlib_sw_winsys.lo
xlib_sw_winsys.c:49:33: fatal error: X11/extensions/XShm.h: No such file or directory

Built libX11 from source, installed into $installdir.  Building mesa with:
./autogen.sh --prefix=$installdir --enable-gles2 --disable-gallium-egl --with-egl-platforms=wayland,x11,drm --enable-gbm --enable-shared-glapi --with-gallium-drivers=r300,r600,swrast,nouveau,svga

I have these variables set, which I believe should be sufficient for mesa to find libX11 in $installdir:

PKG_CONFIG_PATH=$installdir/lib/pkgconfig/:$installdir/share/pkgconfig/
ACLOCAL="aclocal -I $installdir/share/aclocal"
LIBRARY_PATH=$installdir/lib
PATH=$installdir/bin:$PATH

With this set, it does not fail, but I believe this should not be required:

C_INCLUDE_PATH=$installdir/include


35189d768bf80fdedbb6e70f49215cc8b734f343 is the first bad commit
commit 35189d768bf80fdedbb6e70f49215cc8b734f343
Author: Matt Turner <mattst88@gmail.com>
Date:   Mon Mar 4 10:23:54 2013 -0800

    configure.ac: Don't check for X11 unconditionally.

    X11 is already checked conditionally below.

    Fixes OSMesa-only configurations to not require X11.

    Note: This is a candidate for the 9.1 branch.
    Reviewed-by: Brian Paul <brianp@vmware.com>

:100644 100644 785259554bbb833bc6d03c50414b8262bc553341 1b13d06be3ac263088b5d2d15923c383453d16b6 M      configure.ac
bisect run success
Comment 1 Knut Petersen 2013-03-09 00:11:11 UTC
I also bisected the build failure with the same result.

The problem is that with 35189d768bf80fdedbb6e70f49215cc8b734f343 old
X11 header files from /usr/include/X11 are used, correct would be
/home/knut/fast/xorg/usr/include/X11 according to my setup. So a build
might fail on one system but succeed on other systems.



gmake[4]: Entering directory `/home/knut/fast/xorg/mesa/mesa/src/egl/drivers/glx'
  CC     egl_glx.lo
/bin/sh ../../../../libtool --silent --tag=CC   --mode=compile /usr/bin/cc -DPACKAGE_NAME=\"Mesa\" -DPACKAGE_TARNAME=\"mesa\" -DPACKAGE_VERSION=\"9.2.0\" -DPACKAGE_STRING=\"Mesa\ 9.2.0\" -DPACKAGE_BUGREPORT=\"https://bugs.freedesktop.org/enter_bug.cgi\?product=Mesa\" -DPACKAGE_URL=\"\" -DPACKAGE=\"mesa\" -DVERSION=\"9.2.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../../../../include -I../../../../src/egl/main  -D_GNU_SOURCE -DHAVE_PTHREAD -DUSE_X86_ASM -DUSE_MMX_ASM -DUSE_3DNOW_ASM -DUSE_SSE_ASM -DHAVE_DLOPEN -DHAVE_POSIX_MEMALIGN -DIN_DRI_DRIVER -DGLX_INDIRECT_RENDERING -DGLX_DIRECT_RENDERING -DUSE_EXTERNAL_DXTN_LIB=1 -DIN_DRI_DRIVER -DHAVE_ALIAS -DHAVE_MINCORE -DHAVE_LIBUDEV -DHAVE_LLVM=0x0300 -H -O3 -D MULTITOUCH -Wall -std=c99 -Werror=implicit-function-declaration -Werror=missing-prototypes -fno-strict-aliasing -fno-builtin-memcmp  -c -o egl_glx.lo egl_glx.c
. /usr/include/stdlib.h
.. /usr/include/features.h
... /usr/include/sys/cdefs.h
.... /usr/include/bits/wordsize.h
... /usr/include/gnu/stubs.h
.... /usr/include/bits/wordsize.h
.... /usr/include/gnu/stubs-32.h
.. /usr/lib/gcc/i586-suse-linux/4.6/include/stddef.h
.. /usr/include/bits/waitflags.h
.. /usr/include/bits/waitstatus.h
... /usr/include/endian.h
.... /usr/include/bits/endian.h
.... /usr/include/bits/byteswap.h
.. /usr/include/xlocale.h
.. /usr/include/sys/types.h
... /usr/include/bits/types.h
.... /usr/include/bits/wordsize.h
.... /usr/include/bits/typesizes.h
... /usr/include/time.h
... /usr/lib/gcc/i586-suse-linux/4.6/include/stddef.h
... /usr/include/sys/select.h
.... /usr/include/bits/select.h
.... /usr/include/bits/sigset.h
.... /usr/include/time.h
.... /usr/include/bits/time.h
... /usr/include/sys/sysmacros.h
... /usr/include/bits/pthreadtypes.h
.. /usr/include/alloca.h
... /usr/lib/gcc/i586-suse-linux/4.6/include/stddef.h
. /usr/include/string.h
.. /usr/lib/gcc/i586-suse-linux/4.6/include/stddef.h
.. /usr/include/bits/string.h
.. /usr/include/bits/string2.h
. /usr/include/X11/Xlib.h
[...]
Comment 2 Matt Turner 2013-03-09 00:37:32 UTC
Created attachment 76201 [details] [review]
patch

Try this?
Comment 3 Matt Turner 2013-03-09 00:42:11 UTC
Created attachment 76202 [details] [review]
patch

This instead.
Comment 4 Darxus 2013-03-14 19:29:05 UTC
I still got the same error ("xlib_sw_winsys.c:49:33: fatal error: X11/extensions/XShm.h: No such file or directory") when building the latest commit ( a35a19a6ea7248d98282f87244138299fa130c85 ) with the second patch. I did a git diff to verify it was applied, and built it with a script that starts with "git clean -xfd".
Comment 5 Darxus 2013-04-10 19:35:54 UTC
This is still failing:

2013-03-04-13-14 998d975e38db7478781130b42a4fb68d6b181055 good mesa
2013-03-06-09-57 886c5085e3f78affa524bf12ca406a617219cd68 bad mesa
2013-03-06-14-00 cf0b4a30fc536f3744bce209d4b356fe82f2e6a3 bad mesa
2013-03-06-17-20 2532147f8b28c3a990ad64288ece4b7f8decd237 bad mesa
2013-03-07-06-00 5984a911f9dda3f7421bdec604d30d0dfe2cea5e bad mesa
2013-03-07-10-34 057c46d791112a04f02f5fe8fb2956b021c583f3 bad mesa
2013-03-07-17-07 17f1cb1d99e66227d1e05925ef937643f5c1089a bad mesa
2013-03-08-18-01 728240b64d1263bfe2f6d52c3643f70b5719ccbc bad mesa
2013-03-09-04-45 89559c50e7ea9f6571eb02477d7b466f3354ae2f bad mesa
2013-03-11-04-45 b21a9d46e4be0c666327569f07b9cddeb4d42d38 bad mesa
2013-03-12-05-31 543d0328853f60b88748b28ba702f5f12f000b95 bad mesa
2013-03-13-04-46 a6bb7a94957468453c436e3860ee2dd47575c461 bad mesa
2013-03-14-04-46 d78dcdf103271c539ff246651236e71f7a9c10fd bad mesa
2013-03-17-00-09 346a1b9bb927625ae5d315bfa1655be734be69de bad mesa
2013-03-18-04-46 2da8ee16a8b126d15f34552916c77b203be326db bad mesa
2013-03-19-04-46 de315f76a266ce51ca0638b9ea2ec3ccfd31f03b bad mesa
2013-03-20-04-47 3eaf823b9086ae400a000a1f639e74d2f2be9166 bad mesa
2013-03-21-05-34 e34fe8bd20b91d229018ca4fd6b051bfeb089642 bad mesa
2013-03-22-06-19 31009b45213ae9efab6af9d8efcc061194919b12 bad mesa
2013-03-23-04-46 b101a094b5576337f5bb7aecf525eb1755757b9c bad mesa
2013-03-24-04-46 ec9c3882d949298366c872f766d3d18c6ae93f8e bad mesa
2013-03-25-04-46 92b8a37fdfff9e83f39b8885f51ed2f60326ab6a bad mesa
2013-03-26-04-46 98a8e5b87ea99bc64ad85a6b9095f63f71fdbf91 bad mesa
2013-03-27-04-46 21a2dfa55d7a797022de267efbfebaf630940c13 bad mesa
2013-03-28-20-20 ee624ced364bfd2f896809874ef3a808a11c5ecf bad mesa
2013-03-30-04-46 c34bbe110d1e562b1594a9a4f2e83a2ab5630036 bad mesa
2013-03-31-04-46 fdc5941972891711a1398440dd6b1f06f7598ef6 bad mesa
2013-04-01-05-33 135bb3c1a92d424401c34d69ef35f241db64cd22 bad mesa
2013-04-02-04-46 6d20c646d600518a67f6fb93ea0c71d03e65d74a bad mesa
2013-04-03-04-46 41e4bccc754bf3942255630ddd03601b95096c03 bad mesa
2013-04-05-05-32 5192262833c08903b0e27b991f4b9995c187a8ce bad mesa
2013-04-06-05-33 c4629ad3f9440ec7ad3d9f4881d0aba41a93f2f5 bad mesa
2013-04-07-05-32 eff66bc9f855fff5c4f5f57f247254a97431e8ad bad mesa
2013-04-09-05-40 04ffce3004faa50f33a740ea36aa4abdc03f652f bad mesa
2013-04-09-12-28 4ad360133cfa71f79e92246218e8222486982b26 bad mesa
2013-04-10-05-37 ccf3e8fc9b961c1aaa649ba19d35a5dae6e7ed6c bad mesa
2013-04-10-13-47 e4484a0309ab44a790df29a599fb2b01eb885d5a bad mesa

Same error:  xlib_sw_winsys.c:49:33: fatal error: X11/extensions/XShm.h: No such file or directory
Comment 6 Quentin "Sardem FF7" Glidic 2013-06-04 07:55:00 UTC
I think the issue can be fixed patching "src/gallium/winsys/sw/xlib/Makefile.am" to use "$(XCB_DRI2_CFLAGS)" instead of "$(X11_CFLAGS)". Do you want a patch?
Comment 7 Darxus 2013-06-04 12:23:49 UTC
Quentin: I think it is safe to say that creating, verifying, and uploading a patch would be helpful.
Comment 8 Quentin "Sardem FF7" Glidic 2013-06-12 07:26:33 UTC
Created attachment 80713 [details] [review]
Patch to fix CFLAGS

I didn’t test it as I don’t get this failure myself, but from my Autotools reading, this should fix it.
Comment 9 Darxus 2013-06-12 19:47:11 UTC
Closing, because I can't reproduce the problem anymore.  Could possibly be due to upgrading ubuntu from oneric to precise.

Quentin: Thanks for the patch.  I'd certainly have no objection to it getting applied.


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.