Bug 40443 - gbm.h not included when it should be.
Summary: gbm.h not included when it should be.
Status: RESOLVED FIXED
Alias: None
Product: DRI
Classification: Unclassified
Component: General (show other bugs)
Version: DRI git
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Default DRI bug account
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-08-28 16:14 UTC by Rovanion Luckey
Modified: 2011-08-30 02:37 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description Rovanion Luckey 2011-08-28 16:14:54 UTC
When compiling mesa after cloning:

git://anongit.freedesktop.org/mesa/mesa

and running:

./autogen.sh --prefix=$WLD --enable-gles2 --disable-gallium-egl \
      --with-egl-platforms=x11,wayland,drm --enable-gbm --enable-shared-glapi

compiling with make results in:

    make[3]: Entering directory `/home/rov/source/wayland/mesa/src/egl/main'
    gcc -c -I../../../include -I/home/rov/source/wayland/include -g -O2 -Wall -Wmissing-prototypes -std=c99 -ffast-math -fno-strict-aliasing -fPIC -DUSE_X86_64_ASM -D_GNU_SOURCE -DPTHREADS -DHAVE_POSIX_MEMALIGN -DGLX_INDIRECT_RENDERING -DGLX_DIRECT_RENDERING -DUSE_EXTERNAL_DXTN_LIB=1 -DIN_DRI_DRIVER -DHAVE_ALIAS -DHAVE_MINCORE -DHAVE_LIBUDEV -D__STDC_CONSTANT_MACROS -DHAVE_LLVM=0x0208 -fvisibility=hidden -D_EGL_OS_UNIX=1 -D_EGL_BUILT_IN_DRIVER_GLX -DHAVE_X11_PLATFORM -DHAVE_WAYLAND_PLATFORM -DHAVE_DRM_PLATFORM -D_EGL_NATIVE_PLATFORM=_EGL_PLATFORM_X11 -D_EGL_DRIVER_SEARCH_DIR=\"/home/rov/source/wayland/lib/egl\" egldisplay.c -o egldisplay.o
    egldisplay.c:55:17: fatal error: gbm.h: No such file or directory
    compilation terminated.
    make[3]: *** [egldisplay.o] Error 1
    make[3]: Leaving directory `/home/rov/source/wayland/mesa/src/egl/main'
    make[2]: *** [subdirs] Error 1
    make[2]: Leaving directory `/home/rov/source/wayland/mesa/src/egl'
    make[1]: *** [subdirs] Error 1
    make[1]: Leaving directory `/home/rov/source/wayland/mesa/src'
    make: *** [default] Fel 1



Something is wrong in src/egl/main/Makefile around here:

# egl_dri2 and egl_glx are built-ins
ifeq ($(filter dri2, $(EGL_DRIVERS_DIRS)),dri2)
LOCAL_CFLAGS += -D_EGL_BUILT_IN_DRIVER_DRI2
LOCAL_LIBS += $(TOP)/src/egl/drivers/dri2/libegl_dri2.a
ifneq ($(findstring x11, $(EGL_PLATFORMS)),)
EGL_LIB_DEPS += $(XCB_DRI2_LIBS)
endif
ifneq ($(findstring drm, $(EGL_PLATFORMS)),)
EGL_LIB_DEPS += -lgbm
INCLUDE_DIRS += -I$(TOP)/src/gbm/main
endif
EGL_LIB_DEPS += $(LIBUDEV_LIBS) $(DLOPEN_LIBS) $(LIBDRM_LIB) $(WAYLAND_LIBS)
endif


Moving:

EGL_LIB_DEPS += -lgbm
INCLUDE_DIRS += -I$(TOP)/src/gbm/main

outside of the if-statement makes the code compile successfully.
Comment 1 Benjamin Franzke 2011-08-29 00:39:33 UTC
Thanks, fixed with 61d2dfbe.
Comment 2 Rovanion Luckey 2011-08-30 02:37:48 UTC
Pulled mesa git today after stashing my local changes. It now compiles as it should. Great response time from you the developer, thanks!


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.