pret / agbcc

C compiler
114 stars 84 forks source link

Error 126 when attempting to run build.sh #46

Open ryanedgewurth opened 2 years ago

ryanedgewurth commented 2 years ago
ryan@REDFOX MSYS ~/Desktop/decomps/new/agbcc
$ ./build.sh
make: Entering directory '/home/ryan/Desktop/decomps/new/agbcc/gcc'
rm -f agbcc agbcc.exe old_agbcc old_agbcc.exe
rm -f toplev.o version.o tree.o print-tree.o stor-layout.o fold-const.o function.o stmt.o except.o expr.o calls.o expmed.o explow.o optabs.o varasm.o emit-rtl.o genrtl.o real.o regmove.o dwarf2out.o alias.o integrate.o jump.o cse.o loop.o unroll.o flow.o stupid.o combine.o varray.o regclass.o local-alloc.o global.o reload.o reload1.o caller-save.o gcse.o insn-peep.o final.o recog.o insn-opinit.o insn-recog.o insn-extract.o insn-output.o insn-emit.o lcm.o insn-attrtab.o thumb.o getpwd.o convert.o dyn-string.o splay-tree.o graph.o sbitmap.o resource.o c-parse.o c-lex.o c-decl.o c-typeck.o c-convert.o c-aux-info.o c-common.o c-iterate.o rtl.o bitmap.o obstack.o rtlanal.o print-rtl.o
rm -f genrtl.c genrtl.h insn-peep.c insn-opinit.c insn-recog.c insn-extract.c insn-output.c insn-emit.c insn-attrtab.c tree-check.h insn-config.h insn-flags.h insn-codes.h insn-attr.h
rm -f genemit genoutput genrecog genextract genflags gencodes genconfig genpeep gengenrtl gencheck genattr genattrtab genopinit genemit.exe genoutput.exe genrecog.exe genextract.exe genflags.exe gencodes.exe genconfig.exe genpeep.exe gengenrtl.exe gencheck.exe genattr.exe genattrtab.exe genopinit.exe genemit.o genoutput.o genrecog.o genextract.o genflags.o gencodes.o genconfig.o genpeep.o gengenrtl.o gencheck.o genattr.o genattrtab.o genopinit.o
rm -f s-config s-flags s-codes s-emit s-recog s-opinit s-extract s-peep \
s-attr s-attrtab s-output s-genrtl s-check
rm -f -r .d
make: Leaving directory '/home/ryan/Desktop/decomps/new/agbcc/gcc'
make: Entering directory '/home/ryan/Desktop/decomps/new/agbcc/gcc'
gcc -g -std=gnu11 -Werror-implicit-function-declaration -DOLD_COMPILER  -I. -I. -c gengenrtl.c
gcc -g -std=gnu11 -Werror-implicit-function-declaration -DOLD_COMPILER -o gengenrtl gengenrtl.o
./gengenrtl tmp-genrtl.h tmp-genrtl.c
./gengenrtl: ./gengenrtl: cannot execute binary file
make: *** [Makefile:223: s-genrtl] Error 126
make: Leaving directory '/home/ryan/Desktop/decomps/new/agbcc/gcc'

When I attempt to compile on Windows 11 build 22509, the build of agbcc fails in Msys2 as provided by devKitPro, with all the installed items as per pokeemerald's installation instructions.

mid-kid commented 2 years ago

Can you try running git clean -xdf before running ./build.sh again?

ryanedgewurth commented 2 years ago
make: Entering directory '/home/ryan/Desktop/decomps/new/agbcc/gcc'
rm -f agbcc agbcc.exe old_agbcc old_agbcc.exe
rm -f toplev.o version.o tree.o print-tree.o stor-layout.o fold-const.o function.o stmt.o except.o expr.o calls.o expmed.o explow.o optabs.o varasm.o emit-rtl.o genrtl.o real.o regmove.o dwarf2out.o alias.o integrate.o jump.o cse.o loop.o unroll.o flow.o stupid.o combine.o varray.o regclass.o local-alloc.o global.o reload.o reload1.o caller-save.o gcse.o insn-peep.o final.o recog.o insn-opinit.o insn-recog.o insn-extract.o insn-output.o insn-emit.o lcm.o insn-attrtab.o thumb.o getpwd.o convert.o dyn-string.o splay-tree.o graph.o sbitmap.o resource.o c-parse.o c-lex.o c-decl.o c-typeck.o c-convert.o c-aux-info.o c-common.o c-iterate.o rtl.o bitmap.o obstack.o rtlanal.o print-rtl.o
rm -f genrtl.c genrtl.h insn-peep.c insn-opinit.c insn-recog.c insn-extract.c insn-output.c insn-emit.c insn-attrtab.c tree-check.h insn-config.h insn-flags.h insn-codes.h insn-attr.h
rm -f genemit genoutput genrecog genextract genflags gencodes genconfig genpeep gengenrtl gencheck genattr genattrtab genopinit genemit.exe genoutput.exe genrecog.exe genextract.exe genflags.exe gencodes.exe genconfig.exe genpeep.exe gengenrtl.exe gencheck.exe genattr.exe genattrtab.exe genopinit.exe genemit.o genoutput.o genrecog.o genextract.o genflags.o gencodes.o genconfig.o genpeep.o gengenrtl.o gencheck.o genattr.o genattrtab.o genopinit.o
rm -f s-config s-flags s-codes s-emit s-recog s-opinit s-extract s-peep \
s-attr s-attrtab s-output s-genrtl s-check
rm -f -r .d
make: Leaving directory '/home/ryan/Desktop/decomps/new/agbcc/gcc'
make: Entering directory '/home/ryan/Desktop/decomps/new/agbcc/gcc'
gcc -g -std=gnu11 -Werror-implicit-function-declaration -DOLD_COMPILER  -I. -I. -c gengenrtl.c
gcc -g -std=gnu11 -Werror-implicit-function-declaration -DOLD_COMPILER -o gengenrtl gengenrtl.o
./gengenrtl tmp-genrtl.h tmp-genrtl.c
./gengenrtl: ./gengenrtl: cannot execute binary file
make: *** [Makefile:223: s-genrtl] Error 126
make: Leaving directory '/home/ryan/Desktop/decomps/new/agbcc/gcc'

Same error as last time.

rawr51919 commented 2 years ago

chmod -x ./gengenrtl?

mid-kid commented 2 years ago

Windows doesn't need executable permissions to run a program and that command removes said permission...

rawr51919 commented 2 years ago

Meant +x, musta rushed through my comment too fast

rawr51919 commented 2 years ago

Windows doesn't need executable permissions to run a program and that command removes said permission...

chmod +x ./gengenrtl rather

rawr51919 commented 2 years ago

Fix added in #61

ketsuban commented 2 years ago

Do we even still support MSYS2? I would assume if you're using Windows 11 you have access to WSL, so you don't need it.

rawr51919 commented 2 years ago

pokeemerald's install instructions still have a category for MSYS2