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

Fix OpenGL symbol type mismatch warning at link time #3098

Merged
merged 1 commit into from Nov 6, 2023

Conversation

kcgen
Copy link
Member

@kcgen kcgen commented Nov 6, 2023

Description

Fixes the following symbol type mismatch issues flagged by the mold linker:

mold: warning: symbol type mismatch: glGenBuffersARB
>>> defined in src/gui/libgui.a(src/gui/libgui.a.p/sdlmain.cpp.o) as STT_OBJECT
>>> defined in /usr/lib/x86_64-linux-gnu/libGL.so as STT_FUNC
mold: warning: symbol type mismatch: glBufferDataARB
>>> defined in src/gui/libgui.a(src/gui/libgui.a.p/sdlmain.cpp.o) as STT_OBJECT
>>> defined in /usr/lib/x86_64-linux-gnu/libGL.so as STT_FUNC
mold: warning: symbol type mismatch: glDeleteBuffersARB
>>> defined in src/gui/libgui.a(src/gui/libgui.a.p/sdlmain.cpp.o) as STT_OBJECT
>>> defined in /usr/lib/x86_64-linux-gnu/libGL.so as STT_FUNC
mold: warning: symbol type mismatch: glUnmapBufferARB
>>> defined in src/gui/libgui.a(src/gui/libgui.a.p/sdlmain.cpp.o) as STT_OBJECT
>>> defined in /usr/lib/x86_64-linux-gnu/libGL.so as STT_FUNC
mold: warning: symbol type mismatch: glMapBufferARB
>>> defined in src/gui/libgui.a(src/gui/libgui.a.p/sdlmain.cpp.o) as STT_OBJECT
>>> defined in /usr/lib/x86_64-linux-gnu/libGL.so as STT_FUNC
mold: warning: symbol type mismatch: glBindBufferARB
>>> defined in src/gui/libgui.a(src/gui/libgui.a.p/sdlmain.cpp.o) as STT_OBJECT
>>> defined in /usr/lib/x86_64-linux-gnu/libGL.so as STT_FUNC

Related issues

None.

Manual testing

Tested OpenGL to confirm it's still working.

Checklist

I have:

  • followed the project's contributing guidelines and code of conduct.
  • performed a self-review of my code.
  • commented on the particularly hard-to-understand areas of my code.
  • split my work into well-defined, bisectable commits, and I named my commits well.
  • applied the appropriate labels (bug, enhancement, refactoring, documentation, etc.)
  • checked that all my commits can be built.
  • confirmed that my code does not cause performance regressions (e.g., by running the Quake benchmark).
  • added unit tests where applicable to prove the correctness of my code and to avoid future regressions.
  • made corresponding changes to the documentation or the website according to the documentation guidelines.
  • locally verified my website or documentation changes.

Fixes the following warnings:

mold: warning: symbol type mismatch: glGenBuffersARB
>>> defined in src/gui/libgui.a(src/gui/libgui.a.p/sdlmain.cpp.o) as STT_OBJECT
>>> defined in /usr/lib/x86_64-linux-gnu/libGL.so as STT_FUNC
mold: warning: symbol type mismatch: glBufferDataARB
>>> defined in src/gui/libgui.a(src/gui/libgui.a.p/sdlmain.cpp.o) as STT_OBJECT
>>> defined in /usr/lib/x86_64-linux-gnu/libGL.so as STT_FUNC
mold: warning: symbol type mismatch: glDeleteBuffersARB
>>> defined in src/gui/libgui.a(src/gui/libgui.a.p/sdlmain.cpp.o) as STT_OBJECT
>>> defined in /usr/lib/x86_64-linux-gnu/libGL.so as STT_FUNC
mold: warning: symbol type mismatch: glUnmapBufferARB
>>> defined in src/gui/libgui.a(src/gui/libgui.a.p/sdlmain.cpp.o) as STT_OBJECT
>>> defined in /usr/lib/x86_64-linux-gnu/libGL.so as STT_FUNC
mold: warning: symbol type mismatch: glMapBufferARB
>>> defined in src/gui/libgui.a(src/gui/libgui.a.p/sdlmain.cpp.o) as STT_OBJECT
>>> defined in /usr/lib/x86_64-linux-gnu/libGL.so as STT_FUNC
mold: warning: symbol type mismatch: glBindBufferARB
>>> defined in src/gui/libgui.a(src/gui/libgui.a.p/sdlmain.cpp.o) as STT_OBJECT
>>> defined in /usr/lib/x86_64-linux-gnu/libGL.so as STT_FUNC
@kcgen kcgen added build system Build system related issues plumbing Issues related to low-level support functions and classes labels Nov 6, 2023
@kcgen kcgen self-assigned this Nov 6, 2023
@kcgen
Copy link
Member Author

kcgen commented Nov 6, 2023

Uses the same namespace approach we're using for the OpenGL 2.x API calls.

No new code; plan to merge when passing CI.

@kcgen kcgen merged commit c6722e3 into main Nov 6, 2023
50 checks passed
@kcgen kcgen deleted the kc/gl-symbol-types-1 branch November 7, 2023 16:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build system Build system related issues plumbing Issues related to low-level support functions and classes
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

None yet

1 participant