[vbox-dev] What's up with 4.3.8 and VBOX_USE_SYSTEM_XORG_HEADERS=1

Sérgio Basto sergio at serjux.com
Tue Mar 18 05:41:35 GMT 2014


Hello, 
add cc to list 

On Seg, 2014-03-17 at 08:07 +0100, Michael Thayer wrote: 
> Hello Sérgio,
> 
> On 17/03/14 02:44, Sérgio Basto wrote:
> [...]
> > I'd like communicate my newest patch also to compile guest additions for
> > Fedora 19, 20 and 21, only with X11 and Mesa system sources, the patch
> > is also available on cvs of rpmfusion [1]
> >
> > We have some tricks there :
> > 1 - ./src/VBox/Additions/common/crOpenGL/fakedri_drv.c have some code
> > that depends on internals of X11 source code and that code have been
> > removed for X-server 1.15 in Fedora rawhide (21), therefore we couldn't
> > compile it. Afterward I found that code is just need to one function :
> >      vboxPatchMesaGLAPITable();
> > Comment that function and all code that depends on that, make it
> > possible (again) compile with system source code and also dropped the
> > need of xorg-x11-server-source, now just need "normal" devel packages.
> 
> It looks to me as if you are removing the code which sets up the driver 
> functionality in Mesa, and I would expect that with this patch you would 
> get no hardware accelerated 3D at all (possibly software accelerated 
> instead, possibly still reported as hardware accelerated). 

Many thanks for your reply, OK , hopefully we are talking about drivers
for guest system , so is not much used, though that PatchMesaGLAPITable 
was sort of a fix ... 

My main goal as packager of rpmfusion is unbundle sources that are
bundle in Vbox , so I need remove 
src/VBox/Additions/x11/x11include
src/VBox/Additions/x11/x11stubs
src/VBox/GuestHost/OpenGL/include/GLglext.h ( I found this one today )

after some investigation, came up that I can almost compile with system
sources on Fedora 20 with:

-#include "src/mesa/main/mtypes.h"
-#include "src/mesa/main/dd.h"
-#include "src/mesa/glapi/dispatch.h"
-#include "src/mesa/glapi/glapi.h"
-#include "src/mesa/glapi/glapitable.h"
-#include "src/mesa/glapi/glapioffsets.h"
-#include "src/mesa/drivers/dri/common/dri_util.h"
+#include <stdlib.h>
+#include <string.h>
+#include "include/xorg-server.h"
+#include <GL/glext.h>
#include "GL/internal/dri_interface.h"
+#include "glx/glapi.h"
+#include "glx/glapitable.h"
+#include "glx/dispatch.h"
+#include "glx/glprocs.h"
+#include <xf86drm.h>

with -I /usr/share/xorg-x11-server-source/ (from xorg-x11-server-source
package) 

but for Fedora 21 with new xorg-x11-server-1.15.0, glx/glapi.h and
glx/glapitable.h disappears. 

also, _glapi_get_proc_offset have been removed before Fedora 20
( xorg-x11-server-1.14.4  ) look at :
http://lists.x.org/archives/xorg-devel/2011-March/019853.html 

So for Fedora 20, I could replace _glapi_get_proc_offset or sort of, see
patch in attach , but for Fedora 21 vboxPatchMesaGLAPITable(); have
_glapi_get_dispatch functions that are completely obsoleted , even
removed :-/  

>  Have you 
> tested this?  

yes glxinfo change is behavior , but can't be precise right now.

> It is usually pretty easy to tell, as you tend to get 
> glitches with hardware acceleration when 3D windows (e.g. glxgears) are 
> moved, or other windows raised to be on top of them, whereas with 
> software acceleration you will not see any glitches.
> Regards,
> 
> Michael
> 
> > 2nd trick is #define HAVE_STRNDUP 1 , I don't understand why is need,
> > but is need, for more information, see bug report on freedesktop.org [2]

#include "include/xorg-server.h" seems the correct way ... 

> > Other thing that I evaluate, is compile with libXcomposite , libXdamage,
> > libXfixes and libXext of the system .
> >
> > If you could add VBOX_USE_SYSTEM_XORG_HEADERS=1
> > for ./src/VBox/Additions/ and other cases will be great.

Vbox have in src/VBox/Additions/x11/x11stubs/
libXcomposite-1.0.0/ libXdamage-1.1.0/    libXext-6.4.0/
libXfixes-3.1.0/     Makefile.kmk

in Fedora 20 we have: 
libXcomposite-0.4.4-4.fc20
libXdamage-1.1.4-4.fc20
libXext-1.3.2-2.fc20
libXfixes-5.0.1-2.fc20


I also removed src/VBox/Additions/x11/x11stubs and compile with system
sources. 

It kind of work, don't see any problem , like I wrote this is an
exercise with guest systems.


> > Thanks,
> >
> > [1]
> > http://cvs.rpmfusion.org/viewvc/*checkout*/rpms/VirtualBox/devel/VirtualBox-4.3.6-mesa.patch?root=free&revision=1.3&content-type=text%2Fplain
> >
> > [2] https://bugs.freedesktop.org/show_bug.cgi?id=47971
> >



-- 
Sérgio M. B.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: VirtualBox-4.3.6-mesa.patch
Type: text/x-patch
Size: 5108 bytes
Desc: not available
URL: <http://www.virtualbox.org/pipermail/vbox-dev/attachments/20140318/16822309/attachment.bin>


More information about the vbox-dev mailing list