vdexExtractor icon indicating copy to clipboard operation
vdexExtractor copied to clipboard

Issues using make array previously defined

Open kaosine opened this issue 3 years ago • 3 comments

Trying to build on manjaro and I get the following error:

ake: Entering directory '/vdexExtractor/src' rm -f *.o rm -f */*.o rm -f vdexExtractor make: Leaving directory '/vdexExtractor/src' make: Entering directory '/vdexExtractor/src' gcc -c -std=c11 -D_GNU_SOURCE -Wall -Wextra -Werror -DVERSION=\"dev-78f283b\" -c dex.c -o dex.o gcc -c -std=c11 -D_GNU_SOURCE -Wall -Wextra -Werror -DVERSION=\"dev-78f283b\" -c dex_instruction.c -o dex_instruction.o dex_instruction.c:655:43: error: argument 2 of type ‘u4[kMaxVarArgRegs]’ {aka ‘unsigned int[kMaxVarArgRegs]’} declared as a variable length array [-Werror=vla-parameter] 655 | void dexInstr_getVarArgs(u2 *code_ptr, u4 arg[kMaxVarArgRegs]) { | ~~~^~~~~~~~~~~~~~~~~~~ In file included from dex_instruction.c:23: dex_instruction.h:278:32: note: previously declared as an ordinary array ‘u4[]’ {aka ‘unsigned int[]’} 278 | void dexInstr_getVarArgs(u2 *, u4[]); | ^~~~ cc1: all warnings being treated as errors make: *** [Makefile:56: dex_instruction.o] Error 1 make: Leaving directory '/vdexExtractor/src' [-] build failed

Not entirely sure what's going on with it there since while I may be a programmer(or at least wanted to be) I never got far enough to decipher stuff like this. I know I should have all the libraries to make this and I'm just trying to patch lineageos to support spoofing....

kaosine avatar Sep 05 '21 04:09 kaosine

me too~ `gcc -c -std=c11 -D_GNU_SOURCE -Wall -Wextra -Werror -DVERSION="dev-" -c dex.c -o dex.o gcc -c -std=c11 -D_GNU_SOURCE -Wall -Wextra -Werror -DVERSION="dev-" -c dex_instruction.c -o dex_instruction.o dex_instruction.c:655:43: error: argument 2 of type ‘u4[kMaxVarArgRegs]’ {aka ‘unsigned int[kMaxVarArgRegs]’} declared as a variable length array [-Werror=vla-parameter] 655 | void dexInstr_getVarArgs(u2 *code_ptr, u4 arg[kMaxVarArgRegs]) { | ~~~^~~~~~~~~~~~~~~~~~~ In file included from dex_instruction.c:23: dex_instruction.h:278:32: note: previously declared as an ordinary array ‘u4[]’ {aka ‘unsigned int[]’} 278 | void dexInstr_getVarArgs(u2 *, u4[]); | ^~~~ cc1: all warnings being treated as errors make: *** [Makefile:56: dex_instruction.o] Error 1 make: Leaving directory '/cygdrive/e/vdexExtractor-master/src'

  • echo '[-] build failed' [-] build failed
  • exit 1

`

zhangyongfa888 avatar Sep 14 '21 08:09 zhangyongfa888

What is the gcc / compiler version you're using?

And of course you can disable the werror flag until issue is resolved.

anestisb avatar Oct 12 '21 08:10 anestisb

me too~ `gcc -c -std=c11 -D_GNU_SOURCE -Wall -Wextra -Werror -DVERSION="dev-" -c dex.c -o dex.o gcc -c -std=c11 -D_GNU_SOURCE -Wall -Wextra -Werror -DVERSION="dev-" -c dex_instruction.c -o dex_instruction.o dex_instruction.c:655:43: error: argument 2 of type ‘u4[kMaxVarArgRegs]’ {aka ‘unsigned int[kMaxVarArgRegs]’} declared as a variable length array [-Werror=vla-parameter] 655 | void dexInstr_getVarArgs(u2 *code_ptr, u4 arg[kMaxVarArgRegs]) { | ~~~^~~~~~~~~~~~~~~~~~~ In file included from dex_instruction.c:23: dex_instruction.h:278:32: note: previously declared as an ordinary array ‘u4[]’ {aka ‘unsigned int[]’} 278 | void dexInstr_getVarArgs(u2 *, u4[]); | ^~~~ cc1: all warnings being treated as errors make: *** [Makefile:56: dex_instruction.o] Error 1 make: Leaving directory '/cygdrive/e/vdexExtractor-master/src'

  • echo '[-] build failed' [-] build failed
  • exit 1

`

delete "-Werror" from makefile

q1f3 avatar Oct 28 '21 03:10 q1f3