Closed ryan-sg closed 7 years ago
Did you ever get this worked out? If so, do you have binaries we could upload via SourceForge for OpenBSD users?
I haven't figured out anything outside of the already-posted patch that I don't understand well enough to know if it is a valid fix or not... Not much point in posting openbsd binaries to sourceforge, openbsd is niche enough that anyone that does use it would either be looking for a port in the openbsd ports system, or compiling from source themselves. What might happen tho is I end up creating an openbsd port for hyper3dge that openbsd users can install with the local package tools...
This is on Linux (not BSD):
g++ -O2 -ffast-math -fno-strict-aliasing -Wall -pipe -I. -DLINUX -DUSE_OGG -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT -DDEH_EDGE_PLUGIN -o obj_linux/deh_edge/patch.o -c deh_edge/patch.cc
g++ -O2 -ffast-math -fno-strict-aliasing -Wall -pipe -I. -DLINUX -DUSE_OGG -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT -DDEH_EDGE_PLUGIN -o obj_linux/deh_edge/rscript.o -c deh_edge/rscript.cc
g++ -O2 -ffast-math -fno-strict-aliasing -Wall -pipe -I. -DLINUX -DUSE_OGG -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT -o obj_linux/edge/i_main.o -c src/i_main.cc
In file included from src/i_main.cc:20:0:
src/i_sdlinc.h:27:34: fatal error: SDL_keycode.h: No such file or directory
compilation terminated.
Makefiles/Makefile.linux:275: recipe for target «obj_linux/edge/i_main.o» failed
make: *** [obj_linux/edge/i_main.o] Ошибка 1
Fixed, but now:
mkdir -p obj_linux/coal
mkdir -p obj_linux/ddf
mkdir -p obj_linux/deh_edge
mkdir -p obj_linux/edge
mkdir -p obj_linux/md5_conv
mkdir -p obj_linux/md5_conv/kmq2
mkdir -p obj_linux/epi
mkdir -p obj_linux/glbsp
mkdir -p obj_linux/timidity
mkdir -p obj_linux/opllib
g++ -O2 -ffast-math -fno-strict-aliasing -Wall -pipe -I. -DLINUX -DUSE_OGG -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT -o obj_linux/edge/i_video.o -c src/i_video.cc
In file included from src/i_video.cc:33:0:
/usr/include/SDL/SDL_opengl.h:4869:105: error: conflicting declaration ‘typedef void (* PFNGLFRAGMENTLIGHTFVSGIXPROC)(GLenum, GLenum, const GLfloat*)’
GLFRAGMENTLIGHTFVSGIXPROC) (GLenum light, GLenum pname, const GLfloat *params);
^
In file included from src/i_defs_gl.h:30:0,
from src/i_video.cc:21:
/usr/include/GL/glew.h:15759:28: note: previous declaration as ‘typedef void (* PFNGLFRAGMENTLIGHTFVSGIXPROC)(GLenum, GLenum, GLfloat*)’
typedef void (GLAPIENTRY * PFNGLFRAGMENTLIGHTFVSGIXPROC) (GLenum light, GLenum
^
In file included from src/i_video.cc:33:0:
/usr/include/SDL/SDL_opengl.h:4871:103: error: conflicting declaration ‘typedef void (* PFNGLFRAGMENTLIGHTIVSGIXPROC)(GLenum, GLenum, const GLint*)’
FNGLFRAGMENTLIGHTIVSGIXPROC) (GLenum light, GLenum pname, const GLint *params);
^
In file included from src/i_defs_gl.h:30:0,
from src/i_video.cc:21:
/usr/include/GL/glew.h:15761:28: note: previous declaration as ‘typedef void (* PFNGLFRAGMENTLIGHTIVSGIXPROC)(GLenum, GLenum, GLint*)’
typedef void (GLAPIENTRY * PFNGLFRAGMENTLIGHTIVSGIXPROC) (GLenum light, GLenum
^
In file included from src/i_video.cc:33:0:
/usr/include/SDL/SDL_opengl.h:4873:96: error: conflicting declaration ‘typedef void (* PFNGLFRAGMENTLIGHTMODELFVSGIXPROC)(GLenum, const GLfloat*)’
NTRYP PFNGLFRAGMENTLIGHTMODELFVSGIXPROC) (GLenum pname, const GLfloat *params);
^
In file included from src/i_defs_gl.h:30:0,
from src/i_video.cc:21:
/usr/include/GL/glew.h:15755:28: note: previous declaration as ‘typedef void (* PFNGLFRAGMENTLIGHTMODELFVSGIXPROC)(GLenum, GLfloat*)’
typedef void (GLAPIENTRY * PFNGLFRAGMENTLIGHTMODELFVSGIXPROC) (GLenum pname, GL
^
In file included from src/i_video.cc:33:0:
/usr/include/SDL/SDL_opengl.h:4875:94: error: conflicting declaration ‘typedef void (* PFNGLFRAGMENTLIGHTMODELIVSGIXPROC)(GLenum, const GLint*)’
IENTRYP PFNGLFRAGMENTLIGHTMODELIVSGIXPROC) (GLenum pname, const GLint *params);
^
In file included from src/i_defs_gl.h:30:0,
from src/i_video.cc:21:
/usr/include/GL/glew.h:15757:28: note: previous declaration as ‘typedef void (* PFNGLFRAGMENTLIGHTMODELIVSGIXPROC)(GLenum, GLint*)’
typedef void (GLAPIENTRY * PFNGLFRAGMENTLIGHTMODELIVSGIXPROC) (GLenum pname, GL
^
In file included from src/i_video.cc:33:0:
/usr/include/SDL/SDL_opengl.h:4882:104: error: conflicting declaration ‘typedef void (* PFNGLGETFRAGMENTMATERIALFVSGIXPROC)(GLenum, GLenum, GLfloat*)’
NGLGETFRAGMENTMATERIALFVSGIXPROC) (GLenum face, GLenum pname, GLfloat *params);
^
In file included from src/i_defs_gl.h:30:0,
from src/i_video.cc:21:
/usr/include/GL/glew.h:15768:28: note: previous declaration as ‘typedef void (* PFNGLGETFRAGMENTMATERIALFVSGIXPROC)(GLenum, GLenum, const GLfloat*)’
typedef void (GLAPIENTRY * PFNGLGETFRAGMENTMATERIALFVSGIXPROC) (GLenum face, GL
^
In file included from src/i_video.cc:33:0:
/usr/include/SDL/SDL_opengl.h:4883:102: error: conflicting declaration ‘typedef void (* PFNGLGETFRAGMENTMATERIALIVSGIXPROC)(GLenum, GLenum, GLint*)’
PFNGLGETFRAGMENTMATERIALIVSGIXPROC) (GLenum face, GLenum pname, GLint *params);
^
In file included from src/i_defs_gl.h:30:0,
from src/i_video.cc:21:
/usr/include/GL/glew.h:15769:28: note: previous declaration as ‘typedef void (* PFNGLGETFRAGMENTMATERIALIVSGIXPROC)(GLenum, GLenum, const GLint*)’
typedef void (GLAPIENTRY * PFNGLGETFRAGMENTMATERIALIVSGIXPROC) (GLenum face, GL
^
src/i_video.cc:60:29: warning: ‘possible_modes’ defined but not used [-Wunused-variable]
static struct { int w, h; } possible_modes[] =
^
Makefiles/Makefile.linux:275: ошибка выполнения рецепта для цели «obj_linux/edge/i_video.o»
make: *** [obj_linux/edge/i_video.o] Ошибка 1
hmm, kinda different issue than what I'm seeing... can you try this patch as a wild stab?
diff --git a/src/i_video.cc b/src/i_video.cc
index 79479de..c967668 100644
--- a/src/i_video.cc
+++ b/src/i_video.cc
@@ -24,7 +24,7 @@
#include "GL/wglew.h"
/// If you don't hardlink under Win32, replace with ---> ^___________________^
#else
-#include <GL/glew.h>
+//#include <GL/glew.h>
#endif
#ifdef MACOSX
I just tried a build myself without GL/glew.h included and it still succeeded (tho succeeds without it commented for me as well)
@Corbachu has an open issue about replacing GLEW, so perhaps this is less needed since the SDL_opengl stuff is included..?
as for why it works for me without commenting out GL/glew.h, perhaps my compiler versions do something a bit different, are you using a really modern gcc by chance? newer than 4.9.3?
wow you are fast, had merged in the pull requests before i could finish writing the below comment on the pull request :-D there was one patch i did not share:
mmkay, in ddf/main.c:
without this, all compilers I have fail. any ideas? I don't know what I'm doing here :-) The closest clue i think i see is in the clang output, _N being defined by /usr/include/ctype.h on my system..
gcc 4.2.1:
gcc 4.9.3:
in clang 3.8.0: