09 November 2013, 12:49 | #1 |
Posts: n/a
|
GLX-related compilation problem with FS-UAE on Gentoo / GCC 4.8
i am having odd build error on gcc-4.8 on 64bit linux installation. i am trying to build 2.3.8 on gentoo.
Code:
x86_64-pc-linux-gnu-gcc -march=native -mtune=native -O2 -pipe --param ggc-min-expand=10 -DLINUX -DUSE_SDL -DUSE_PNG -DUSE_GLIB -DUSE_X11 -DUSE_SDL_VIDEO -DUSE_OPENGL -DUSE_SDL_INPUT -DUSE_OPENAL -DUSE_FREETYPE -DWITH_NETPLAY -DWITH_XML_SHADER -DWITH_LUA -std=c99 -Iinclude -Isrc/lua `sdl-config --cflags` `pkg-config --cflags glib-2.0 gthread-2.0 libpng` `pkg-config --cflags freetype2` -march=native -mtune=native -O2 -pipe --param ggc-min-expand=10 -D_FILE_OFFSET_BITS=64 -g -O2 -c src/emu/video.c -o obj/emu_video.o make[1]: Leaving directory `/mnt/storage/tmp/app-emulation-fs-uae-2.3.8/work/fs-uae-2.3.8dev/libfsemu' In file included from include/fs/ml/opengl.h:26:0, from src/emu/video.c:9: include/fs/glee.h:16986:26: error: expected declaration specifiers or '...' before '*' token typedef GLXContextID (APIENTRYP GLEEPFNGLXGETCONTEXTIDEXTPROC) (const GLXContext context); ^ include/fs/glee.h:16987:3: error: unknown type name 'GLEEPFNGLXGETCONTEXTIDEXTPROC' GLEE_EXTERN GLEEPFNGLXGETCONTEXTIDEXTPROC GLeeFuncPtr_glXGetContextIDEXT; ^ include/fs/glee.h:16992:74: error: unknown type name 'GLXContextID' typedef GLXContext (APIENTRYP GLEEPFNGLXIMPORTCONTEXTEXTPROC) (Display * dpy, GLXContextID contextID); ^ include/fs/glee.h:16993:3: error: unknown type name 'GLEEPFNGLXIMPORTCONTEXTEXTPROC' GLEE_EXTERN GLEEPFNGLXIMPORTCONTEXTEXTPROC GLeeFuncPtr_glXImportContextEXT; ^ make[1]: *** [obj/emu_video.o] Error 1 make: *** [libfsemu-target] Error 2 make: *** Waiting for unfinished jobs.... |
09 November 2013, 14:44 | #2 |
FS-UAE Developer
Join Date: Dec 2011
Location: Førde, Norway
Age: 43
Posts: 4,043
|
Hi, I have successfully compiled FS-UAE with GCC 4.8 (on Ubuntu 13.10) so GCC is likely no the culprit here. It looks like a problem with your GXL headers.... specifically that the definition of GLXContextID might be missing.
I searched a bit and found this: http://www.mail-archive.com/mesa-com.../msg43825.html So it looks like GLXContextID might be removed from a recent glx.h, and this is probably the problem. GLEE is a "common library" which is included with FS-UAE. You might be able to fix this by simply replacing glee.c and glee.h with updated variants (if they are updated to account for this change in glx.h). If not, we'll probably find another workaround. Please report back |
10 November 2013, 09:55 | #3 |
Posts: n/a
|
ok, if i understand right - i have to get those from GLEE project?
|
10 November 2013, 11:09 | #4 |
FS-UAE Developer
Join Date: Dec 2011
Location: Førde, Norway
Age: 43
Posts: 4,043
|
Yes, but I also did a quick search yesterday and it didn't look like there was an updated GLEE recently. (I don't know what the long-term solution here will be, whether mesa reverts the change or GLEE is updated to account for it).
You can try a simple solution/hack for now... After line 67 in glee.h (#include <GL/glx.h>) insert the following line: Code:
typedef XID GLXContextID; Code:
#else // GLX #define __glext_h_ /* prevent glext.h from being included */ #define __glxext_h_ /* prevent glxext.h from being included */ #define GLX_GLXEXT_PROTOTYPES #include <GL/gl.h> #include <GL/glx.h> typedef XID GLXContextID; #endif |
14 November 2013, 20:31 | #5 |
FS-UAE Developer
Join Date: Dec 2011
Location: Førde, Norway
Age: 43
Posts: 4,043
|
@yoshi314 have you had the opportunity to try the latest suggested fix?
|
27 November 2013, 10:56 | #6 |
Posts: n/a
|
not yet, hopefully i'll try it today.
|
27 November 2013, 17:33 | #7 |
Posts: n/a
|
Ok, that fixes the build errors.
|
08 December 2013, 11:08 | #8 |
Posts: n/a
|
same problem on 2.3.11 version.
I am using git builds of mesa library, i think when they hit stable you'll have to include that patch for good. |
08 December 2013, 11:16 | #9 |
FS-UAE Developer
Join Date: Dec 2011
Location: Førde, Norway
Age: 43
Posts: 4,043
|
@yoshi314 yes, you'll need to patch each new dev version as I haven't made any changes to the FS-UAE source code. I cannot include this "fix" as it would probably break on older mesas since GLXContextID would then be double-typedefed. (It might work by hacking it with a #define instead).
But this is not really my problem right now, as either mesa or glee need to change something. For now, I can sit on the fence and see what happens ;-) Last edited by FrodeSolheim; 08 December 2013 at 11:28. |
17 December 2013, 19:49 | #10 |
FS-UAE Developer
Join Date: Dec 2011
Location: Førde, Norway
Age: 43
Posts: 4,043
|
It looks like at least recent GCC versions allow repeating typedefs as long as the type is the same as before. But I include the following instead which should do the same thing, except also work if the compiler rejects "redefining" typedefs:
Code:
#define GLXContextID XID |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
CD32 problem after using CD200 (or something like that) compilation.. | MrDBUG | support.Other | 35 | 26 January 2011 11:51 |
Couple issues with E-UAE ( screen size and config related) | kursad | support.OtherUAE | 3 | 11 December 2009 20:53 |
Compilation options for best e-uae performance with Xgl | Madcrow | support.OtherUAE | 0 | 30 June 2008 16:02 |
SCSI HD Bootup/Mounting Problem (Possibly SFS Related?) | CU_AMiGA | support.Other | 22 | 13 June 2007 15:22 |
UAE + AmiTCP problem | Gunnar | support.Apps | 6 | 20 December 2002 18:22 |
|
|