Bug 50280

Summary: Mesa 8.0.3 fails to build dri/nouveau against libdrm 2.4.34
Product: Mesa Reporter: Giovanni Mariani <mc2374>
Component: Drivers/DRI/nouveauAssignee: Nouveau Project <nouveau>
Status: RESOLVED WONTFIX QA Contact:
Severity: major    
Priority: high CC: andyrtr
Version: 8.0   
Hardware: x86-64 (AMD64)   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:
Attachments: Log of a failed build

Description Giovanni Mariani 2012-05-23 06:10:23 UTC
Created attachment 62018 [details]
Log of a failed build

As per summary.
Building against libdrm 2.4.34 and kernel 3.2.16, Mandriva 2010.2 x86_64.

The message error is:
**************************
In file included from nouveau_fbo.c:27:
nouveau_driver.h:41:28: error: nouveau_device.h: No such file or directory
nouveau_driver.h:42:27: error: nouveau_grobj.h: No such file or directory
nouveau_driver.h:43:29: error: nouveau_channel.h: No such file or directory
nouveau_driver.h:44:24: error: nouveau_bo.h: No such file or directory
nouveau_driver.h:45:30: error: nouveau_notifier.h: No such file or directory
nouveau_driver.h:49:26: error: nv04_pushbuf.h: No such file or directory
In file included from nouveau_screen.c:27:
nouveau_driver.h:41:28: error: nouveau_device.h: No such file or directory
nouveau_driver.h:42:27: error: nouveau_grobj.h: No such file or directory
nouveau_driver.h:43:29: error: nouveau_channel.h: No such file or directory
nouveau_driver.h:44:24: error: nouveau_bo.h: No such file or directory
nouveau_driver.h:45:30: error: nouveau_notifier.h: No such file or directory
nouveau_driver.h:49:26: error: nv04_pushbuf.h: No such file or directory
nouveau_fbo.c: In function ‘nouveau_renderbuffer_storage’:
nouveau_fbo.c:97: error: ‘NOUVEAU_BO_VRAM’ undeclared (first use in this function)    
nouveau_fbo.c:97: error: (Each undeclared identifier is reported only once
nouveau_fbo.c:97: error: for each function it appears in.)
nouveau_fbo.c:97: error: ‘NOUVEAU_BO_MAP’ undeclared (first use in this function)
nouveau_fbo.c: In function ‘nouveau_renderbuffer_map’:
nouveau_fbo.c:145: error: ‘NOUVEAU_BO_RD’ undeclared (first use in this function)     
nouveau_fbo.c:147: error: ‘NOUVEAU_BO_WR’ undeclared (first use in this function)
nouveau_fbo.c:149: warning: implicit declaration of function ‘nouveau_bo_map’
nouveau_fbo.c:151: error: dereferencing pointer to incomplete type
nouveau_fbo.c: In function ‘nouveau_renderbuffer_unmap’:
nouveau_fbo.c:172: warning: implicit declaration of function ‘nouveau_bo_unmap’       
nouveau_screen.c:31:27: error: nouveau_drmif.h: No such file or directory
In file included from nouveau_context.c:28:
nouveau_driver.h:41:28: error: nouveau_device.h: No such file or directory
nouveau_driver.h:42:27: error: nouveau_grobj.h: No such file or directory
nouveau_driver.h:43:29: error: nouveau_channel.h: No such file or directory
nouveau_driver.h:44:24: error: nouveau_bo.h: No such file or directory
nouveau_driver.h:45:30: error: nouveau_notifier.h: No such file or directory
nouveau_driver.h:49:26: error: nv04_pushbuf.h: No such file or directory
nouveau_screen.c: In function ‘nouveau_init_screen2’:
nouveau_screen.c:131: warning: implicit declaration of function ‘nouveau_device_open_existing’
nouveau_screen.c:144: error: dereferencing pointer to incomplete type
nouveau_screen.c: In function ‘nouveau_destroy_screen’:
nouveau_screen.c:178: warning: implicit declaration of function ‘nouveau_device_close’
gmake[6]: *** [nouveau_fbo.o] Error 1
gmake[6]: *** Waiting for unfinished jobs....
***********************************

It cannot find all those nouveau_[device | grobj | channel | bo | notifier | drimif] headers and the nv04_pushbuf.h one because they are no more present in the libdrm include dir.

The previous release of libdrm (2.4.33) still provides the needed .h files and obviously works.


See the attached log for more infos.
Comment 1 Giovanni Mariani 2012-05-28 12:41:15 UTC
This happens because nobody settled to back-port to the stable 8.0.x branch the changes made at the various nouveau drivers in the master tree between 13/04/2012 and 15/04/2012 to allow them use the new stable DRM interface.

So, this problem affects not only the dri-based nouveau driver (nouveau-vieux), but also the gallium and the xorg-base ones: they are unbuildable in the stable branch because all based on an interface now removed from libdrm.

To solve this bug it will need to adapt at the stable branch at least the master git commits:
2e47d01c9e5325906cf3bb979279599991c6328e, 6d1cdec3ba151168bfc3aef222fba6265dfb41fb and
f2509df95cd1d055e91b1558c5d9c5a935067d78.

However all those don't apply well to the stable branch, because they depends on the automake-ification of the building for src/mesa/dri/ and this also happened on 20/01/2012, ie after the cutting of the stable branch (13/01/2012), and it was never backported on it.
Comment 2 Christoph Bumiller 2012-05-28 13:18:22 UTC
At least for mesa backporting's not going to happen.

You can easily have both old and new versions and headers of libdrm_nouveau installed at the same time and it will build and work fine.
Comment 3 Martin Peres 2012-05-28 13:51:38 UTC
(In reply to comment #2)
> At least for mesa backporting's not going to happen.
> 
> You can easily have both old and new versions and headers of libdrm_nouveau
> installed at the same time and it will build and work fine.

Fine isn't the word I would use. It works but if the ddx and mesa aren't compiled with the same libdrm_nouveau, you loose AIGLX.
Comment 4 Giovanni Mariani 2012-05-29 11:19:39 UTC
(In reply to comment #2)
> At least for mesa backporting's not going to happen.
> You can easily have both old and new versions and headers of libdrm_nouveau
> installed at the same time and it will build and work fine.

Fine for me: I'm on Radeon HW...
But see comment #3: in the case you suggested there is not feature parity for nouveau (vieux, gallium or whatever).

And, for the sake of arguing, I would like to ask what is the point of a *stable* mesa release going to be broken in one of their drivers by an otherwise apparently "innocent" libdrm *stable* upgrade (which in the release announce nobody warned against); moreover, a brokenness that will remain until the release of Mesa 8.1 (about 3 months in the future)...
Not all the users are willing to live at the bleeding edge of the git master, while still willing to have a graphic stack updated to the stable level.

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.