Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build failure 'glGetStringi' undeclared #987

Closed
jubalh opened this issue Jan 21, 2019 · 8 comments
Closed

Build failure 'glGetStringi' undeclared #987

jubalh opened this issue Jan 21, 2019 · 8 comments

Comments

@jubalh
Copy link

jubalh commented Jan 21, 2019

I'm compiling 5.2.4.0 with the patch from #976 (since I had the same issue without this patch) on openSUSE Tumbleweed.

And get the following:

[   12s] /home/abuild/rpmbuild/BUILD/allegro-5.2.4.0/src/opengl/extensions.c: In function '_al_ogl_manage_extensions':                                                                        
[   12s] /home/abuild/rpmbuild/BUILD/allegro-5.2.4.0/src/opengl/extensions.c:799:4: error: 'glGetStringi' undeclared (first use in this function); did you mean 'glGetString'?                
[   12s]     glGetStringi = ext_api->GetStringi;                                                                                                                                              
[   12s]     ^~~~~~~~~~~~                                                                                                                                                                     
[   12s]     glGetString                                                                                                                                                                      
[   12s] /home/abuild/rpmbuild/BUILD/allegro-5.2.4.0/src/opengl/extensions.c:799:4: note: each undeclared identifier is reported only once for each function it appears in                    
[   12s] /home/abuild/rpmbuild/BUILD/allegro-5.2.4.0/src/opengl/extensions.c:799:26: error: 'ALLEGRO_OGL_EXT_API' {aka 'struct ALLEGRO_OGL_EXT_API'} has no member named 'GetStringi'         
[   12s]     glGetStringi = ext_api->GetStringi;

During the build I see:

[    7s] -- Performing Test ALLEGRO_HAVE_VA_COPY - Success                                                                                                                                    
[    7s] CMake Warning (dev) at /usr/share/cmake/Modules/FindOpenGL.cmake:270 (message):                                                                                                      
[    7s]   Policy CMP0072 is not set: FindOpenGL prefers GLVND by default when                                                                                                                
[    7s]   available.  Run "cmake --help-policy CMP0072" for policy details.  Use the                                                                                                         
[    7s]   cmake_policy command to set the policy and suppress this warning.                                                                                                                  
[    7s]                                                                                                                                                                                      
[    7s]   FindOpenGL found both a legacy GL library:                                                                                                                                         
[    7s]                                                                                                                                                                                      
[    7s]     OPENGL_gl_LIBRARY: /usr/lib64/libGL.so                                                                                                                                           
[    7s]                                                                                                                                                                                      
[    7s]   and GLVND libraries for OpenGL and GLX:                                                                                                                                            
[    7s]                                                                                                                                                                                      
[    7s]     OPENGL_opengl_LIBRARY: /usr/lib64/libOpenGL.so                                                                                                                                   
[    7s]     OPENGL_glx_LIBRARY: /usr/lib64/libGLX.so                                                                                                                                         
[    7s]                                                                                                                                                                                      
[    7s]   OpenGL_GL_PREFERENCE has not been set to "GLVND" or "LEGACY", so for                                                                                                               
[    7s]   compatibility with CMake 3.10 and below the legacy GL library will be used.                                                                                                        
[    7s] Call Stack (most recent call first):                                                                                                                                                 
[    7s]   CMakeLists.txt:551 (find_package)                                                                                                                                                  
[    7s] This warning is for project developers.  Use -Wno-dev to suppress it.                                                                                                                
[    7s]                                                                                                                                                                                      
[    7s] -- Found OpenGL: /usr/lib64/libOpenGL.so

Might this be a problem?
The build recipe can be seen here: https://build.opensuse.org/package/view_file/games/allegro/allegro.spec?expand=1

Full log file is available here: https://build.opensuse.org/build/games/openSUSE_Tumbleweed/x86_64/allegro/_log

@jubalh jubalh changed the title Build failure Build failure 'glGetStringi' undeclared Jan 21, 2019
@SiegeLord
Copy link
Member

Would it be possible to try to compile master? We had a relatively large refactor, and had changes relevant to the CMake error you've mentioned.

@jubalh
Copy link
Author

jubalh commented Jan 21, 2019

I could compile master for a test, but actually I would need to fix the distribution package if we want allegro to stay in the distribution :-/

Do you plan to have a new release soon? Then I could try to postpone until this is ready.

@SiegeLord
Copy link
Member

Yes, there'll be a release soon but either way we need to know if master compiles.

@dos1
Copy link
Contributor

dos1 commented Jan 21, 2019

I'd guess that master still has this issue.

As far as I know, different platforms may have different things exposed via glx/eglGetProcAddress and via linking/dlsym. I'm not sure where this particular difference comes from (what's the Mesa version in openSUSE?), but nevertheless, I don't think Allegro expecting this to be always available via linker is correct.

@jubalh
Copy link
Author

jubalh commented Jan 21, 2019

Yes, there'll be a release soon but either way we need to know if master compiles.

Okay, I will try to test it soon.

what's the Mesa version in openSUSE?

18.3.1

@dos1
Copy link
Contributor

dos1 commented Jan 21, 2019

Oh wait, it's not a linking issue - it's not declared in the headers. There was a fix for recent Mesa (a40d30e), could be related.

@dos1
Copy link
Contributor

dos1 commented Jan 21, 2019

OK, I have the same issue here with 5.2.4 + fd29999 cherry-picked. Adding also a40d30e fixes it :)

@jubalh
Copy link
Author

jubalh commented Jan 21, 2019

@dos1 thanks!

I can confirm that a40d30e with the previously mentioned fb77af2 fixes the build for me.

@jubalh jubalh closed this as completed Jan 21, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants