Bug 55788

Summary: mesa fails to build against git version of xserver
Product: Mesa Reporter: Jos van Wolput <wolput>
Component: Mesa coreAssignee: mesa-dev
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: medium    
Version: git   
Hardware: x86-64 (AMD64)   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:
Attachments: remove miInitializeBackingStore call
remove miInitializeBackingStore call

Description Jos van Wolput 2012-10-09 03:37:41 UTC
The latest git version (2012-10-09) fails to build showing the following error
in /git/mesa/src/gallium/state_trackers/xorg:
-----
In file included from xorg_driver.c:36:0:
/usr/include/xorg/xf86PciInfo.h:50:2: warning: #warning "xf86PciInfo.h is deprecated.  For greater compatibility, drivers should include necessary PCI IDs locally rather than relying on this file from xorg-server." [-Wcpp]
xorg_driver.c: In function ‘drv_pre_init’:
xorg_driver.c:347:23: warning: variable ‘xf86_config’ set but not used [-Wunused-but-set-variable]
xorg_driver.c: In function ‘drv_screen_init’:
xorg_driver.c:855:5: error: implicit declaration of function ‘miInitializeBackingStore’ [-Werror=implicit-function-declaration]
cc1: some warnings being treated as errors
make[4]: *** [xorg_driver.o] Error 1
make[4]: Leaving directory `/home/jos/src/xorg/git/mesa/src/gallium/state_trackers/xorg'
make[3]: *** [subdirs] Error 1
make[3]: Leaving directory `/home/jos/src/xorg/git/mesa/src/gallium/state_trackers'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/jos/src/xorg/git/mesa/src/gallium'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/jos/src/xorg/git/mesa/src'
make: *** [all-recursive] Error 1
-----
Comment 1 Jos van Wolput 2012-10-12 03:23:33 UTC
Building mesa fails when building against git version of xserver.
Bisecting git xserver shows this issue starts occuring when building against
xserver-76d8739b1f4ed07b874ae56a492d1e0aa0fd9b0,
2012-09-23, dix: Remove #includes of mibstore.h, by Daniel Martin.

Reinstalling the file /fb/fb.h from the parent xserver-056fd15deaa85d3ed936df9a3b2e0cdcfa599da8 solves the building issue.
Comment 2 Jos van Wolput 2012-10-12 04:09:16 UTC
And reintall /mi/bstore.h which has been removed in
xserver-1cb0261ef54b7dd6a7ef84e1c3959e424706228b
2012-09-23, dix: Delete mibstore.h, Daniel Martin.
Comment 3 Marvin Schmidt 2012-10-27 17:59:53 UTC
Created attachment 69161 [details] [review]
remove miInitializeBackingStore call

The fix has to be made in mesa, as the mentioned commit in xserver explains:

commit 1cb0261ef54b7dd6a7ef84e1c3959e424706228b
Author: Daniel Martin <consume.noise@gmail.com>
Date:   Thu Sep 6 00:38:26 2012 +0200

    dix: Delete mibstore.h
    
    Since Nov 2010 (commit c4c4676) the only purpose of mibstore.h was to
    define an empty function (miInitializeBackingStore()) for backward
    compatibility. Time to say goodbye.
    
    Reviewed-by: Adam Jackson <ajax@redhat.com>
    Signed-off-by: Keith Packard <keithp@keithp.com>


and the previous definition of miInitializeBackingStore() shows

[...]
-#define miInitializeBackingStore(x) do {} while (0)
-
[...]

I'm attaching a patch which removes the superfluous call and makes master build fine again
Comment 4 Marvin Schmidt 2012-10-27 18:29:00 UTC
Created attachment 69164 [details] [review]
remove miInitializeBackingStore call

fix typo in commit message
Comment 5 Michel Dänzer 2012-10-30 10:59:31 UTC
Fix pushed, 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.