LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Desktop (https://www.linuxquestions.org/questions/linux-desktop-74/)
-   -   Compiling xorg-server-1.7.4 from source / build fails (https://www.linuxquestions.org/questions/linux-desktop-74/compiling-xorg-server-1-7-4-from-source-build-fails-859179/)

haveanother 01-28-2011 03:06 AM

Compiling xorg-server-1.7.4 from source / build fails
 
I'm trying to compile xorg-server-1.7.4 from source, but it's throwing this error:

Code:

glxdri.c: In function '__glXDRIscreenProbe':
glxdri.c:993: error: 'XF86DRI_MAJOR_VERSION' undeclared (first use in this function)
glxdri.c:993: error: (Each undeclared identifier is reported only once
glxdri.c:993: error: for each function it appears in.)
glxdri.c:994: error: 'XF86DRI_MINOR_VERSION' undeclared (first use in this function)
glxdri.c:995: error: 'XF86DRI_PATCH_VERSION' undeclared (first use in this function)
make[1]: *** [glxdri.lo] Error 1

I have installed or compiled all the dependencies for it already, and the configure script runs successfully...

Does anyone have an idea what could be wrong ?

business_kid 01-28-2011 03:40 AM

Some one of your dependencies is missing/wrong version. The actual error is higher up the output. You need the very first error. There is parallel development in things like libdrm, mesa, video drivers and a few other obscure libs (pixman?) that requires later versions than you might have.
Try
1. find out what glxdri.c is part of &
2. run ldd on your present version

haveanother 01-28-2011 03:48 AM

Thanks, I'll try that...

haveanother 01-28-2011 03:59 AM

Ok, here's the first error:

Code:

glxdri.c:46:34: error: X11/dri/xf86driproto.h: No such file or directory
Quite self-explaining. I suppose I have to find which package/dependency installs that file...

bathory 01-28-2011 04:16 AM

Hi,

You miss xf86driproto.
Take a look here for the prerequisites (protos and libraries) needed for compiling xorg-server

Regards

haveanother 01-28-2011 04:41 AM

Ok, I found the file inside the xf86driproto package's install dir. (I have version 2.1.1)

I've noticed this line in xorg-server's config.log file:

Code:

pkg_cv_DRIPROTO_CFLAGS='-I/[...path...]/xf86driproto_bin/include/X11/dri  '
This was being generated from a pkg-config pc file, xf86driproto.pc, which was also in that install dir (specified earlier by --prefix for that package's configure script), inside lib/pkgconfig.

I changed this line:

Code:

Cflags: -I${includedir}/X11/dri
To this:

Code:

Cflags: -I${includedir}/X11/dri -I${includedir}
Because the file in xorg-server was being included with the X11/dri path prefix, it would work if it started looking from the base of xf86driproto's installed include dir.

I ran configure again, and now make can build that file (glxdri.o) successfully. :)

(although it failed at the next file right after that, not finding "pciaccess.h". I have that file installed however, and it's in another package, so I think the solution is going to be the same for that too.)

Thanks for your help, business_kid, bathory.


All times are GMT -5. The time now is 05:11 PM.