cginternals / cginternals/globjects

Fails to build: ‘gl::BufferAccessMask’ has not been declared

Open
#411 4 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
563
Forks
59
PR merge metrics
No merged PRs in 30d

Description

I'm trying to build `globjects`, but it fails at symbol name `BufferAccessMask` which I can't find myself.

This is how I built `glbinding`, as it is a dependency for `globjects`.
```bash
git checkout v3.5.0
mkdir -p build install
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$PWD/install
cmake --build build --config Release
cmake --install build
```
This is how I built `globjects`.
```bash
git checkout v1.0.0
mkdir -p build install
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH=$PWD/../glbinding/install
cmake --build build --config Release
cmake --install build # error 2
```
Error 2 looks like this: (I'll address error 1 soon.)
```
[ 1%] Building CXX object source/globjects/CMakeFiles/globjects.dir/source/AbstractUniform.cpp.o
In file included from /path/to/Projects/globjects/source/globjects/include/globjects/globjects.h:15,
from /path/to/Projects/globjects/source/globjects/source/AbstractUniform.cpp:7:
/path/to/globjects/source/globjects/include/globjects/Buffer.h:178:69: error: ‘gl::BufferAccessMask’ has not been declared
178 | void * mapRange(gl::GLintptr offset, gl::GLsizeiptr length, gl::BufferAccessMask access);
| ^~~~~~~~~~~~~~~~
gmake[2]: *** [source/globjects/CMakeFiles/globjects.dir/build.make:93: source/globjects/CMakeFiles/globjects.dir/source/AbstractUniform.cpp.o] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:290: source/globjects/CMakeFiles/globjects.dir/all] Error 2
gmake: *** [Makefile:146: all] Error 2
```
I searched for its definition in both projects:
- `rg "[^a-zA-Z]BufferAccessMask"` gave no matches in `glbinding`
- `rg "[^a-zA-Z]BufferAccessMask"` gave 12 matches in `gobjects`, all of which were parameters.`

In the build description, it did not specify which version of `glbinding` I needed. I suspect/hope the issue is that I'm using the wrong version? How is nobody else running into this though...?

With regards to the first error, when I'd run `cmake ..` and all other commands exactly as suggested by the build instructions, I'd hit:
```
Could not find a package configuration file provided by "glbinding" with any of the following names:
glbindingConfig.cmake
glbinding-config.cmake
```
Therefore, I became a bit creative with the build instructions, though I have little experience with CMake.

I am on Debian 13.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start at source/globjects/include/globjects/Buffer.h around the mapRange declaration and reproduce the CMake build with the shown glbinding installation. Inspect the glbinding package configuration and the versions used by globjects; done means the dependency is found and globjects builds past the missing gl::BufferAccessMask error, with the required setup documented.

Written by the indexing model from the issue text.

Assessment

Tech stack
cmake, cpp
Domain
build-system
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
62/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.