Bug 43629 - mesa># gmake freebsd-dri-amd64 breaks
Summary: mesa># gmake freebsd-dri-amd64 breaks
Status: RESOLVED NOTABUG
Alias: None
Product: Mesa
Classification: Unclassified
Component: Mesa core (show other bugs)
Version: unspecified
Hardware: x86-64 (AMD64) FreeBSD
: highest blocker
Assignee: mesa-dev
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-12-08 04:44 UTC by zaphod
Modified: 2012-05-30 14:01 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description zaphod 2011-12-08 04:44:34 UTC
O/S: FreeBSD 9.0-RC2 on amd64.  Video Card:
drm0: <ATI Radeon 3000 Graphics> on vgapci0
info: [drm] Initialized radeon 1.31.0 20080613
info: [drm] Setting GART location based on new memory map
info: [drm] Loading RS780/RS880 Microcode

I am trying to build drm / mesa from latest git clone (and not ports version)
Before attempting to compile latest mesa, I re-built all dependencies to latest version, without any problems:
glproto, libXxf86vm, xf86vidmodeproto, libXmu, drm.
They are all at latest ver from git. 
When I try to run below, It breaks with error:

mesa># gmake freebsd-dri-amd64
gmake default
gmake[1]: Entering directory `/asp/g.mesa/mesa'
gmake[2]: Entering directory `/asp/g.mesa/mesa/src'
Making sources for freebsd-dri-x86-64
gmake[3]: Entering directory `/asp/g.mesa/mesa/src/glx'
gcc -c -I. -I../../include -I../../include/GL/internal -I../../src/mesa -I../../src/mapi -I../../src/mapi/glapi `pkg-config --cflags libdrm`   -I/usr/local/include -Wall -O -g -fPIC -Wmissing-prototypes -std=c99 -Wundef -ffast-math -DUSE_X86_64_ASM -I/usr/local/include -DPTHREADS -DUSE_EXTERNAL_DXTN_LIB=1 -DIN_DRI_DRIVER -DGLX_DIRECT_RENDERING -DGLX_INDIRECT_RENDERING -DHAVE_ALIAS -fno-strict-aliasing  -D_REENTRANT -DDEFAULT_DRIVER_DIR=\"/usr/local/lib/dri\" dri2.c -o dri2.o
dri2.c: In function 'DRI2WireToEvent':
dri2.c:101: error: 'xDRI2BufferSwapComplete2' undeclared (first use in this function)
dri2.c:101: error: (Each undeclared identifier is reported only once
dri2.c:101: error: for each function it appears in.)
dri2.c:101: error: 'awire' undeclared (first use in this function)
dri2.c:101: error: expected expression before ')' token
gmake[3]: *** [dri2.o] Error 1
gmake[3]: Leaving directory `/asp/g.mesa/mesa/src/glx'
gmake[2]: *** [subdirs] Error 1
gmake[2]: Leaving directory `/asp/g.mesa/mesa/src'
gmake[1]: *** [default] Error 1
gmake[1]: Leaving directory `/asp/g.mesa/mesa'
gmake: *** [freebsd-dri-amd64] Error 2
Comment 1 Dave Airlie 2011-12-08 05:27:44 UTC
all the dependencies except dri2proto?
Comment 2 zaphod 2011-12-08 06:17:57 UTC
dri2proto from ports (I assumed ports collection was up-to-date on
dri2proto since link is to 1.1.tar.gz on the wiki page:
2.3.tar.bz2:SIZE=95466:SHA256=b2141892a0db35feffa5e952ff5e1d2727c4436b07d7e2e9dd2ed89c8bb3e677

re-compile and re-install from source on the wiki page?



On Thu, Dec 8, 2011 at 3:27 PM, <bugzilla-daemon@freedesktop.org> wrote:

> https://bugs.freedesktop.org/show_bug.cgi?id=43629
>
> --- Comment #1 from Dave Airlie <airlied@freedesktop.org> 2011-12-08
> 05:27:44 PST ---
> all the dependencies except dri2proto?
>
> --
> Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
> ------- You are receiving this mail because: -------
> You reported the bug.
>
Comment 3 zaphod 2011-12-11 06:55:32 UTC
Some Developments:
Git Update pulled in some changes so I ran mesa/autogen.sh to try again. I get some better diagnosic output this time and here are the results:

1. First error was
>configure: error: Package requirements (dri2proto >= 2.6) were not met:
>Requested 'dri2proto >= 2.6' but version of DRI2Proto is 2.3
So I got the latest from here and installed.
git://anongit.freedesktop.org/xorg/proto/dri2proto  (the wiki page is therefore out-of-date, btw)

2. Ran mesa/autogen.sh a second time. This time error is:
>checking for expat.h... no
>configure: error: Expat required for DRI.
textproc/expat2 is installed however. I re-installed expat, no change.

3. I noticed installed depends (glproto, libXxf86vm, xf86vidmodeproto, libXmu, drm) do not register correct in the FreeBSD installed package DB. Running portmaster --check-depends (which checks for and corrects broken dependencies) lists all these ports as "NOT INSTALLED". This will create a problem in with other ports when performing system updates.
Comment 4 zaphod 2011-12-17 10:26:00 UTC
I corrected the expat error by setting:
# setenv LDFLAGS -L/usr/local/lib
# setenv CFLAGS -I/usr/local/include

Then, re-run mesa/autogen.sh gave me NOUVEAU error:
>checking for NOUVEAU... no
>configure: error: Package requirements (libdrm_nouveau >= 0.6) were not met:
>No package 'libdrm_nouveau' found
>Consider adjusting the PKG_CONFIG_PATH environment variable if you
>installed software in a non-standard prefix.
>Alternatively, you may set the environment variables NOUVEAU_CFLAGS
>and NOUVEAU_LIBS to avoid the need to call pkg-config.

Already have "WITHOUT_NOUVEAU=yes" in my /etc/make.conf
Comment 5 zaphod 2011-12-18 01:17:11 UTC
EDIT: I have conflicting information here about NOUVEAU.  Since my card is Radeon, I should not be using any nouveau (NVidia) modules as far as I understand. However, the build is checking for nouveau. So I am confused now. Should I use nouveau or not? If not, how do I modify the build / autogen?
Comment 6 Eric Anholt 2012-05-30 14:01:12 UTC
The old static configs like freebsd-* are deprecated and about to be removed.  You should use just ./autogen.sh (which it sounds like you are in later comments) and then "make".  The original error report is just one of the reasons we're removing the old static configs.

Re: comment 4, the list of dri drivers defaults to a particular set, then the requirements for those are tested for with errors if they're missing.  The assumption here is that this is better for the user than quietly not building a driver they may care about when the libdrm requirement gets increased.  To disable a driver you don't care for, you can use something explicit like "--with-dri-drivers=swrast,i915,i965,radeon" and "--with-gallium-drivers=swrast,r600,r300".


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.