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

Linux build: Errors with cglm vec4 (with workaround) #49

Open
crims0nHD opened this issue Jun 13, 2021 · 2 comments
Open

Linux build: Errors with cglm vec4 (with workaround) #49

crims0nHD opened this issue Jun 13, 2021 · 2 comments

Comments

@crims0nHD
Copy link

Hello

After cloning the repo and submodules and installing all necessary dependencies, I was not able to build the project.
This was due to the fact that the build of cglm failed at 2 points:
minecraft-weekend/lib/cglm/src/vec4.c:127 at character 25 and 42.
At both points the compiler complained about wrong boundaries of the float[4] array [-Werror=array-parameter=].

I resolved the issue by changing the typedef of vec3[3] in lib/cglm/include/cglm/types.h at line 46 to vec3[4].

Before:
typedef float vec3[3];
After:
typedef float vec3[4];

I assume that the error is caused by struct alignment inconsistencies however I would be grateful if somebody could explain what acutally happened and what the correct way of fixing it would be.

@lessneek
Copy link

Or you can simply checkout the latest stable release tag (e.g. 0.8.4) for the cglm submodule.

ScoreUnder added a commit to ScoreUnder/minecraft-weekend that referenced this issue Feb 9, 2022
ScoreUnder added a commit to ScoreUnder/minecraft-weekend that referenced this issue Feb 9, 2022
@rice7th
Copy link

rice7th commented Jul 19, 2023

Lol it actually worked thank you for the workaround!

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