Skip to content
This repository has been archived by the owner on Apr 17, 2022. It is now read-only.

Compile error with glew-1.11 #4218

Closed
wzdev-ci opened this issue Oct 3, 2014 · 13 comments
Closed

Compile error with glew-1.11 #4218

wzdev-ci opened this issue Oct 3, 2014 · 13 comments

Comments

@wzdev-ci
Copy link
Contributor

wzdev-ci commented Oct 3, 2014

resolution_fixed type_bug | by NoQ


I'm having the following compile error when building warzone2100-3.1.1 with glew-1.11; downgrading to glew-1.10 fixes the problem.

g++ -DHAVE_CONFIG_H -I. -I../.. -I/usr/include/libpng16 -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -DNDEBUG -DWZ_DATADIR="\"/usr/local/share/warzone2100\"" -DLOCALEDIR="\"/usr/local/share/locale\"" -I../.. -I../../3rdparty -I../../3rdparty/quesoglc -I/usr/include/GL -I/usr/include/libdrm -DQT_SHARED -I/usr/include/qt4 -I/usr/include/qt4/QtNetwork -I/usr/include/qt4 -I/usr/include/qt4/QtScript -I/usr/include/qt4 -I/usr/include/qt4/QtCore -g -Wno-enum-compare -Wall -Wextra -Wno-unused-parameter -Wno-sign-compare -Wcast-align -Wwrite-strings -Wpointer-arith -Wno-format-security -DQT_SHARED -I/usr/include/qt4 -I/usr/include/qt4/QtNetwork -I/usr/include/qt4 -I/usr/include/qt4/QtScript -I/usr/include/qt4 -I/usr/include/qt4/QtCore -fstack-protector -MT screen.o -MD -MP -MF .deps/screen.Tpo -c -o screen.o screen.cpp

screen.cpp: In function 'void screen_EnableMissingFunctions()':

screen.cpp:264:24: error: invalid conversion from 'PFNGLSHADERSOURCEARBPROC {aka void (*)(unsigned int, int, const char**, const int*)}' to 'PFNGLSHADERSOURCEPROC {aka void (*)(unsigned int, int, const char* const*, const int*)}' [-fpermissive]

make[2]: *** [screen.o] Error 1

make[2]: Leaving directory /home/noq/wz/warzone2100-3.1.1/lib/ivis_opengl'`

make[1]: *** [all-recursive] Error 1

make[1]: Leaving directory /home/noq/wz/warzone2100-3.1.1'`

make: *** [all] Error 2


Refers to lib/ivis_opengl/screen.cpp:

void screen_EnableMissingFunctions()
{
    // ...

    __glewShaderSource = __glewShaderSourceARB; // here

    // ...
}

Issue migrated from trac:4218 at 2022-04-16 11:44:43 -0700

@wzdev-ci
Copy link
Contributor Author

wzdev-ci commented Oct 5, 2014

vexed changed status from new to closed

@wzdev-ci
Copy link
Contributor Author

wzdev-ci commented Oct 5, 2014

vexed changed resolution from `` to external

@wzdev-ci
Copy link
Contributor Author

wzdev-ci commented Oct 5, 2014

vexed changed blocking which not transferred by tractive

@wzdev-ci
Copy link
Contributor Author

wzdev-ci commented Oct 5, 2014

vexed changed blockedby which not transferred by tractive

@wzdev-ci
Copy link
Contributor Author

wzdev-ci commented Oct 5, 2014

vexed commented


o_O

typedef void (GLAPIENTRY * PFNGLSHADERSOURCEPROC) (GLuint shader, GLsizei count, const GLchar *const* string, const GLint* length);

Upstream screwed up.

In case it isn't obvious, it should be

... const GLchar **string 

Which means 1.11 is broken. Maybe 1.12 will make a show quickly.

BTW, I don't really like that hack anyway a7d2c06c280c867fea61173d25c25d69012db489 from #3166. Would be better if the OEMs would just fix their drivers.
Oh well.

@wzdev-ci
Copy link
Contributor Author

wzdev-ci commented Oct 6, 2014

vexed changed status from closed to reopened

@wzdev-ci
Copy link
Contributor Author

wzdev-ci commented Oct 6, 2014

vexed changed resolution from external to ``

@wzdev-ci
Copy link
Contributor Author

wzdev-ci commented Oct 6, 2014

vexed changed _comment0 which not transferred by tractive

@wzdev-ci
Copy link
Contributor Author

wzdev-ci commented Oct 6, 2014

vexed commented


Well, what do you know, apparently, it was already reported, and they (glew) said it wasn't there fault, that is how openGL's registry has it.

Sure enough, looking at the registry itself, that is how they have for who knows why.
(That is a terrible style!)

Anyway, I guess we can use one heck of a ugly cast, or just dump that ugly hack.

@wzdev-ci
Copy link
Contributor Author

wzdev-ci commented Jun 8, 2015

vexed commented


I see no valid reason to keep supporting this hack, and it was already removed in master.

@wzdev-ci
Copy link
Contributor Author

wzdev-ci commented Jul 1, 2015

vexed changed status from reopened to closed

@wzdev-ci
Copy link
Contributor Author

wzdev-ci commented Jul 1, 2015

vexed changed resolution from `` to fixed

@wzdev-ci
Copy link
Contributor Author

wzdev-ci commented Jul 1, 2015

vexed commented


For what it is worth, as sad as this sounds, apparently, some linux/mac/windows drivers are still in bad shape, and doing this hack is the only way they can play the game, which is why I didn't just kill off our hack outright yet.

However, since per went ahead and removed it anyway in d512d1dc9857e3c2bbfa0a7b5856bdf420412b8f I guess we will just wait for the crash reports again.

@wzdev-ci wzdev-ci closed this as completed Jul 1, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant