I suspect it is due to mesa 18.3.x/19.0.0 as the mesa package owns the repeatedly mentioned /usr/include/GL/glext.h
I last compiled it successfully using mesa 18.2.2
ArtixLinux
mesa 19.0.0
gcc 8.2.1+20181127
Code: Select all
==== Building TEngine (release) ====
Creating ../obj/Release/TEngine
getself.c
../src/getself.c: In function ‘get_self_executable’:
../src/getself.c:32:2: warning: ignoring return value of ‘realpath’, declared with attribute warn_unused_result [-Wunused-result]
realpath("/proc/self/exe", res);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
particles.c
In file included from ../src/tgl.h:12,
from ../src/display_sdl.h:26,
from ../src/display.h:23,
from ../src/particles.c:21:
/usr/include/GL/glext.h:12066:25: error: conflicting types for ‘PFNGLFRAGMENTLIGHTFVSGIXPROC’
typedef void (APIENTRYP PFNGLFRAGMENTLIGHTFVSGIXPROC) (GLenum light, GLenum pname, const GLfloat *params);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ../src/display_sdl.h:25,
from ../src/display.h:23,
from ../src/particles.c:21:
../src/glew.h:13602:28: note: previous declaration of ‘PFNGLFRAGMENTLIGHTFVSGIXPROC’ was here
typedef void (GLAPIENTRY * PFNGLFRAGMENTLIGHTFVSGIXPROC) (GLenum light, GLenum pname, GLfloat* params);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ../src/tgl.h:12,
from ../src/display_sdl.h:26,
from ../src/display.h:23,
from ../src/particles.c:21:
/usr/include/GL/glext.h:12068:25: error: conflicting types for ‘PFNGLFRAGMENTLIGHTIVSGIXPROC’
typedef void (APIENTRYP PFNGLFRAGMENTLIGHTIVSGIXPROC) (GLenum light, GLenum pname, const GLint *params);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ../src/display_sdl.h:25,
from ../src/display.h:23,
from ../src/particles.c:21:
../src/glew.h:13604:28: note: previous declaration of ‘PFNGLFRAGMENTLIGHTIVSGIXPROC’ was here
typedef void (GLAPIENTRY * PFNGLFRAGMENTLIGHTIVSGIXPROC) (GLenum light, GLenum pname, GLint* params);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ../src/tgl.h:12,
from ../src/display_sdl.h:26,
from ../src/display.h:23,
from ../src/particles.c:21:
/usr/include/GL/glext.h:12070:25: error: conflicting types for ‘PFNGLFRAGMENTLIGHTMODELFVSGIXPROC’
typedef void (APIENTRYP PFNGLFRAGMENTLIGHTMODELFVSGIXPROC) (GLenum pname, const GLfloat *params);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ../src/display_sdl.h:25,
from ../src/display.h:23,
from ../src/particles.c:21:
../src/glew.h:13598:28: note: previous declaration of ‘PFNGLFRAGMENTLIGHTMODELFVSGIXPROC’ was here
typedef void (GLAPIENTRY * PFNGLFRAGMENTLIGHTMODELFVSGIXPROC) (GLenum pname, GLfloat* params);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ../src/tgl.h:12,
from ../src/display_sdl.h:26,
from ../src/display.h:23,
from ../src/particles.c:21:
/usr/include/GL/glext.h:12072:25: error: conflicting types for ‘PFNGLFRAGMENTLIGHTMODELIVSGIXPROC’
typedef void (APIENTRYP PFNGLFRAGMENTLIGHTMODELIVSGIXPROC) (GLenum pname, const GLint *params);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ../src/display_sdl.h:25,
from ../src/display.h:23,
from ../src/particles.c:21:
../src/glew.h:13600:28: note: previous declaration of ‘PFNGLFRAGMENTLIGHTMODELIVSGIXPROC’ was here
typedef void (GLAPIENTRY * PFNGLFRAGMENTLIGHTMODELIVSGIXPROC) (GLenum pname, GLint* params);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ../src/tgl.h:12,
from ../src/display_sdl.h:26,
from ../src/display.h:23,
from ../src/particles.c:21:
/usr/include/GL/glext.h:12079:25: error: conflicting types for ‘PFNGLGETFRAGMENTMATERIALFVSGIXPROC’
typedef void (APIENTRYP PFNGLGETFRAGMENTMATERIALFVSGIXPROC) (GLenum face, GLenum pname, GLfloat *params);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ../src/display_sdl.h:25,
from ../src/display.h:23,
from ../src/particles.c:21:
../src/glew.h:13611:28: note: previous declaration of ‘PFNGLGETFRAGMENTMATERIALFVSGIXPROC’ was here
typedef void (GLAPIENTRY * PFNGLGETFRAGMENTMATERIALFVSGIXPROC) (GLenum face, GLenum pname, const GLfloat* data);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ../src/tgl.h:12,
from ../src/display_sdl.h:26,
from ../src/display.h:23,
from ../src/particles.c:21:
/usr/include/GL/glext.h:12080:25: error: conflicting types for ‘PFNGLGETFRAGMENTMATERIALIVSGIXPROC’
typedef void (APIENTRYP PFNGLGETFRAGMENTMATERIALIVSGIXPROC) (GLenum face, GLenum pname, GLint *params);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ../src/display_sdl.h:25,
from ../src/display.h:23,
from ../src/particles.c:21:
../src/glew.h:13612:28: note: previous declaration of ‘PFNGLGETFRAGMENTMATERIALIVSGIXPROC’ was here
typedef void (GLAPIENTRY * PFNGLGETFRAGMENTMATERIALIVSGIXPROC) (GLenum face, GLenum pname, const GLint* data);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ../src/particles.h:24,
from ../src/particles.c:30:
../src/particles.c: In function ‘particles_draw’:
../src/tgl.h:86:10: warning: comparison of distinct pointer types lacks a cast
if ((p) != gl_c_texcoords_ptr || (nb) != gl_c_colors_nb) { glTexCoordPointer((nb), (t), (v), (p)); gl_c_texcoords_ptr=(p); gl_c_texcoords_nb = (nb); } \
^~
../src/particles.c:441:2: note: in expansion of macro ‘glTexCoordPointer’
glTexCoordPointer(2, GL_SHORT, 0, texcoords);
^~~~~~~~~~~~~~~~~
../src/tgl.h:86:119: warning: assignment to ‘GLfloat *’ {aka ‘float *’} from incompatible pointer type ‘GLshort *’ {aka ‘short int *’} [-Wincompatible-pointer-types]
b) != gl_c_colors_nb) { glTexCoordPointer((nb), (t), (v), (p)); gl_c_texcoords_ptr=(p); gl_c_texcoords_nb = (nb); } \
^
../src/particles.c:441:2: note: in expansion of macro ‘glTexCoordPointer’
glTexCoordPointer(2, GL_SHORT, 0, texcoords);
^~~~~~~~~~~~~~~~~
../src/particles.c: In function ‘thread_particle_init’:
../src/particles.c:796:54: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
printf("Particle args init error %x (%s): %s\n", (int)l, ps->args, lua_tostring(L, -1));
^
../src/particles.c:844:47: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
printf("Particle run error %x (%s): %s\n", (int)l, ps->args, lua_tostring(L, -1));
^
../src/particles.c: In function ‘thread_particles’:
../src/particles.c:1042:2: warning: implicit declaration of function ‘luaopen_shaders’; did you mean ‘luaopen_base’? [-Wimplicit-function-declaration]
luaopen_shaders(L);
^~~~~~~~~~~~~~~
luaopen_base
../src/particles.c: In function ‘free_particles_thread’:
../src/particles.c:1173:72: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
printf("Destroying particle thread %d (waiting for thread %x)\n", i, (int)pt->thread);
^
In file included from ../src/particles.c:33:
../src/particles.c: At top level:
../src/SFMT.h:74:6: warning: inline function ‘fill_array64’ declared but never defined
void fill_array64(uint64_t array[], int size);
^~~~~~~~~~~~
../src/SFMT.h:70:6: warning: inline function ‘fill_array32’ declared but never defined
void fill_array32(uint32_t array[], int size);
^~~~~~~~~~~~
../src/SFMT.h:66:10: warning: inline function ‘gen_rand64’ declared but never defined
uint64_t gen_rand64(void);
^~~~~~~~~~
../src/SFMT.h:62:10: warning: inline function ‘gen_rand32’ declared but never defined
uint32_t gen_rand32(void);
^~~~~~~~~~
In file included from ../src/display.h:23,
from ../src/particles.c:21:
../src/display_sdl.h:46:6: warning: inline function ‘sdlDrawImage’ declared but never defined
void sdlDrawImage(SDL_Surface *dest, SDL_Surface *image, int x, int y);
^~~~~~~~~~~~
make[1]: *** [TEngine.make:159: ../obj/Release/TEngine/particles.o] Error 1
make: *** [Makefile:17: TEngine] Error 2