minecraft-weekend icon indicating copy to clipboard operation
minecraft-weekend copied to clipboard

build on Linux: mismatched bound float[4]

Open phraggers opened this issue 4 years ago • 2 comments

I'm sure I'm doing something silly and rookie-ish so I apologize in advance. I'm on Arch Linux, I've typed the git clone command as per the readme, cd minecraft-weekend and make and I receive the following error while trying to make cglm: (I've shortened the paths below, sorry the new lines and spacing is kinda gone) ..minecraft-weekend/lib/cglm/src/vec4.c:127:25: error: argument 1 of type 'float[4]' with mismatched bound [-Werror=array-parameter=] 127 | glmc_vec4_scale_as(vec4 v, float s, vec4 dest) { | ~~~~~^ In file included from ../minecraft-weekend/lib/cglm/src/../include/cglm/call.h:17, from ../minecraft-weekend/lib/cglm/src/vec4.c:9: ../minecraft-weekend/lib/cglm/src/../include/cglm/call/vec4.h:102:25: note: previously declared as 'float[3]' 102 | glmc_vec4_scale_as(vec3 v, float s, vec3 dest); | ~~~~~^ ../minecraft-weekend/lib/cglm/src/vec4.c:127:42: error: argument 3 of type 'float[4]' with mismatched bound [-Werror=array-parameter=] 127 | glmc_vec4_scale_as(vec4 v, float s, vec4 dest) { | ~~~~~^~~~ In file included from ../minecraft-weekend/lib/cglm/src/../include/cglm/call.h:17, from ../minecraft-weekend/lib/cglm/src/vec4.c:9: ../minecraft-weekend/lib/cglm/src/../include/cglm/call/vec4.h:102:42: note: previously declared as 'float[3]' 102 | glmc_vec4_scale_as(vec3 v, float s, vec3 dest); | ~~~~~^~~~ cc1: all warnings being treated as errors

phraggers avatar Jan 09 '22 11:01 phraggers

To help anybody else who comes across this, simply update the libs/cglm submodule to the v0.8.4 tag and it should build fine.

jmaargh avatar Mar 28 '22 16:03 jmaargh

go to minecraft-weekend/lib/cglm/include/cglm/call/vec4.h in line 102, and change

glmc_vec4_scale_as(vec3 v, float s, vec3 dest); to glmc_vec4_scale_as(vec4 v, float s, vec4 dest);

Bonekazz avatar May 13 '24 06:05 Bonekazz