Subject: Re: [Openchrome-users] drm.h; OpenChrome driver and
To: Jan Danielsson <jan.m.danielsson@gmail.com>
From: =?ISO-8859-1?Q?Thomas_Hellstr=F6m?= <thomas@tungstengraphics.com>
List: netbsd-users
Date: 09/27/2006 23:49:00
Jan Danielsson wrote:

>Hello all,
>
>   I've managed to get the OpenChrome driver working with xorg 6.9 on
>NetBSD/amd64 3.0, but it involved some ugly hardcoded paths.
>
>This is how I did it:
>
>1) Get xorg-server files (required by the driver):
>
>   # cd /home/pkgsrc/pkgsrc/x11/xorg-server
>   # make
>
>2) Get the OpenChrome driver (as explained in the UniChrome wiki; I'm
>building outside the tree)
>
>   $ svn co http://svn.openchrome.org/svn/trunk/unichrome
>   $ cd unichrome
>   $ xmkmf /home/pkgsrc/pkgsrc/x11/xorg-server/work/xc
>
>So far so good, no problems yet.
>
>3) Build it
>
>   $ make
>
>   This step fails, with the following:
>
>------------------------------------------------
>In file included from via_memory.c:33:
>/home/pkgsrc/pkgsrc/x11/xorg-server/work/xc/programs/Xserver/hw/xfree86/os-suppo
>rt/xf86drm.h:39:17: drm.h: No such file or directory
>In file included from via_memory.c:33:
>/home/pkgsrc/pkgsrc/x11/xorg-server/work/xc/programs/Xserver/hw/xfree86/os-suppo
>rt/xf86drm.h:224: error: parse error before "drm_context_t"
>/home/pkgsrc/pkgsrc/x11/xorg-server/work/xc/programs/Xserver/hw/xfree86/os-suppo
>rt/xf86drm.h:224: warning: no semicolon at end of struct or union
>/home/pkgsrc/pkgsrc/x11/xorg-server/work/xc/programs/Xserver/hw/xfree86/os-suppo
>rt/xf86drm.h:234: error: parse error before '}' token
>
>[---]
>
>In file included from via_drm.h:35,
>                 from via_memory.c:38:
>                 via_drmclient.h:27:17: drm.h: No such file or directory
>                 In file included from via_memory.c:38:
>                 via_drm.h:186: error: parse error before "drm_clip_rect_t"
>                 via_drm.h:186: warning: no semicolon at end of struct
>or union
>                 via_drm.h:208: error: parse error before '}' token
>                 via_drm.h:208: warning: type defaults to `int' in
>declaration o
>f `drm_via_sarea_
>                 t'
>                 via_drm.h:208: warning: data definition has no type or
>storage
>class
>                 via_drm.h:245: error: field `reply' has incomplete type
>                 via_memory.c:86: warning: no previous prototype for
>`viaOffScre
>enLinear'
>
>------------------------------------------------
>
>   There seems to be two errors occuring, both involving "drm.h". The
>drm.h is not being located from
>/home/pkgsrc/pkgsrc/x11/xorg-server/work/xc/programs/Xserver/hw/xfree86/os-suppo
>rt/xf86drm.h and from via_drmclient.h.
>
>   "find . -name drm.h" in the /home/pkgsrc/pkgsrc/x11/xorg-server
>directory reveals that the file is located in
>/home/pkgsrc/pkgsrc/x11/xorg-server/work/xc/extras/drm/shared{,-core}/drm.h.
>
>   Just to get it working, I hard code the references to drm.h in
>xf86drm.h and via_drmclient.h. This does get the driver built. And I
>have verified that the driver works (Yay!).
>
>
>   Normally, I would just think "Oh, the include path is wrong in the
>make file. I'll fix it!". But truth be told, the build system is a
>little bit overwhelming for me. The reason I'm posting this to both the
>UniChrome and the NetBSD mailing lists is because I can't even determine
>where the problem is.
>
>   I figured as much as: "xmkmf" is a tool for making makefiles for X
>related stuff(?). This program is supposed to set up the make file, so
>that all relevant files are located. It seems that this tool, however,
>does not add
>/home/pkgsrc/pkgsrc/x11/xorg-server/work/xc/extras/drm/[shared|shared-core]
>to the appropriate include path.
>
>   Could someone explain more in detail what is failing, why, and how to
>fix it?
>
>  
>
This is probably because you are doing a non-dri build, and the 
openChrome driver was
mistakenly including some dri related headers.

Please try openChrome revision 221.

/Thomas


>------------------------------------------------------------------------
>
>_______________________________________________
>openchrome-users mailing list
>openchrome-users@openchrome.org
>http://wiki.openchrome.org/mailman/listinfo/openchrome-users
>Main page:
>http://www.openchrome.org
>Wiki:
>http://wiki.openchrome.org
>User Forum:
>http://wiki.openchrome.org/tikiwiki/tiki-view_forum.php?forumId=1