[SOLVED] Compilation failures
#11
which source directory?
Reply

Sponsored links

#12
(05-02-2014, 11:08 AM)gregory Wrote: which source directory?

The mesa source directory. The directory you obtain when you unpack the tarball you download from mesa website Smile

### EDIT ###

Fixed.

The problem wasn't my mesa installation. The 32bit opengl include directory needed to be added to the "include_directories( ... )" in the CMakeLists.txt, so a sed command fixed the problem.
Reply
#13
Hum, first I don't understand why you get different header on 32 bits (vs 64 bits) but why not? So what is your opengl include dir, and what did you change in cmake?
Reply
#14
(05-03-2014, 03:12 PM)gregory Wrote: Hum, first I don't understand why you get different header on 32 bits (vs 64 bits) but why not? So what is your opengl include dir, and what did you change in cmake?

First of all, the "-r" option of grep doesn't follow symlinks, so that's why my output and yours were different. See:

$ grep -R PFNGLBLENDCOLORPROC /usr/include/GL/
/usr/include/GL/glext.h:typedef void (APIENTRYP PFNGLBLENDCOLORPROC) (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);
/usr/include/GL/glew.h:typedef void (GLAPIENTRY * PFNGLBLENDCOLORPROC) (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha);
/usr/include/GL/glew.h:GLEW_FUN_EXPORT PFNGLBLENDCOLORPROC __glewBlendColor;

But the glext.h file is a link:

$ ls -l /usr/include/GL/glext.h
lrwxrwxrwx 1 root root 44 May 1 19:58 /usr/include/GL/glext.h -> ../../lib64/opengl/global/include/GL/glext.h

And I have installed the 32-bit opengl libraries which also install it's own header files:

$ ls /usr/lib32/opengl/xorg-x11/include/GL/glext.h
/usr/lib32/opengl/xorg-x11/include/GL/glext.h
$ diff -up /usr/lib32/opengl/xorg-x11/include/GL/glext.h /usr/lib64/opengl/global/include/GL/glext.h
$

I don't know why /usr/include/GL/glext.h is not found...

I run this sed command just in case the architecture is 64-bit:

sed '/include_directories/a /usr/lib32/opengl/xorg-x11/include' -i CMakeLists.txt
Reply
#15
(05-04-2014, 01:08 PM)vincent Wrote: First of all, the "-r" option of grep doesn't follow symlinks, so that's why my output and yours were different. See:
Ah yes, you're right.

I think I understand. You don't have same version of mesa for 32 and 64 bits. I guess include of "gl.h" and "glext.h" come from 2 differents versions (not sure how is it possible). "Mesa" moves the define from one file to anothers, so you end up with no define (or a double define).

Quote: I don't know why /usr/include/GL/glext.h is not found...
File is found otherwise you will get a compile error saying that it didn't find any include for glext.h
Reply
#16
(05-04-2014, 04:07 PM)gregory Wrote: You don't have same version of mesa for 32 and 64 bits. I guess include of "gl.h" and "glext.h" come from 2 differents versions (not sure how is it possible).

Because in Gentoo we have a 32-bit opengl compatibility package (to run 32-bit applications on 64-bit systems) which has been made using the files of a 32-bit mesa installation, probably of a different mesa version to the version of the 64-bit stable mesa package you can install on Gentoo right now.

(05-04-2014, 04:07 PM)gregory Wrote: File is found otherwise you will get a compile error saying that it didn't find any include for glext.h

Yes, you're right.
Reply
#17
Root of this problem is outdated glext.h in eselect-opengl package.
Explained here: https://bugs.gentoo.org/show_bug.cgi?id=510730

Workarounds is using mesa-10 patch attached here: https://bugs.gentoo.org/show_bug.cgi?id=510710 or switch opengl implementation to xorg-x11 while building pcsx2 (eselect opengl set xorg-x11)
Reply




Users browsing this thread: 1 Guest(s)