Gericom / GBARunner3

182 stars 24 forks source link

Will not build on macOS #133

Closed bMac244 closed 3 months ago

bMac244 commented 6 months ago

Whenever I try to build from the main makefile, it spits out a bunch of lines about truncated stuff and then errors out somewhere. This is the output when I try to make a second time, the first time errors out in the same way.

% make /Library/Developer/CommandLineTools/usr/bin/make -C libs/libtwl /Library/Developer/CommandLineTools/usr/bin/make -C libtwl9 make[3]: `/Users/cat1217/GBARunner3/code/libs/libtwl/libtwl9/lib/libtwl9.a' is up to date. /Library/Developer/CommandLineTools/usr/bin/make -C libtwl7 make[3]: `/Users/cat1217/GBARunner3/code/libs/libtwl/libtwl7/lib/libtwl7.a' is up to date. /Library/Developer/CommandLineTools/usr/bin/make -C bootstrap /Library/Developer/CommandLineTools/usr/bin/make -C ../core/arm9 linking arm9.elf ArmDtcm.o: in function `memu_armDispatchTable': (.dtcm+0x8): relocation truncated to fit: R_ARM_ABS16 against symbol `memu_armLdmStmRnTable_0' defined in .dtcm section in ArmLdmStmRn.o (.dtcm+0xa): relocation truncated to fit: R_ARM_ABS16 against symbol `memu_armStmRdTable' defined in .dtcm section in ArmLdmStmRd.o (.dtcm+0x10): relocation truncated to fit: R_ARM_ABS16 against symbol `memu_armLdmStmRnTable_0' defined in .dtcm section in ArmLdmStmRn.o (.dtcm+0x12): relocation truncated to fit: R_ARM_ABS16 against symbol `memu_armLdmRdTable' defined in .dtcm section in ArmLdmStmRd.o (.dtcm+0x18): relocation truncated to fit: R_ARM_ABS16 against symbol `memu_armLdmStmRnTable_1' defined in .dtcm section in ArmLdmStmRn.o (.dtcm+0x1a): relocation truncated to fit: R_ARM_ABS16 against symbol `memu_armStmRdTable' defined in .dtcm section in ArmLdmStmRd.o (.dtcm+0x20): relocation truncated to fit: R_ARM_ABS16 against symbol `memu_armLdmStmRnTable_1' defined in .dtcm section in ArmLdmStmRn.o (.dtcm+0x22): relocation truncated to fit: R_ARM_ABS16 against symbol `memu_armLdmRdTable' defined in .dtcm section in ArmLdmStmRd.o (.dtcm+0x28): relocation truncated to fit: R_ARM_ABS16 against symbol `memu_armLdmStmRnTable_0' defined in .dtcm section in ArmLdmStmRn.o (.dtcm+0x2a): relocation truncated to fit: R_ARM_ABS16 against symbol `memu_armStmRdTable' defined in .dtcm section in ArmLdmStmRd.o (.dtcm+0x30): additional relocation overflows omitted from the output collect2: error: ld returned 1 exit status make[3]: *** [/Users/cat1217/GBARunner3/code/core/arm9/arm9.elf] Error 1 make[2]: *** [build] Error 2 make[1]: *** [checkcorearm9] Error 2 make: *** [checkbootstrap] Error 2

lifehackerhansol commented 5 months ago

Should note it doesn't work on Linux. It seems to be something very specific to Windows, and so far no one knows why.

note: duplicate of #57

wujekbogdan commented 4 months ago

I can't compile either, I'm getting the following error messages:

ArmDtcm.o: in function `memu_armDispatchTable':
(.dtcm+0x8): relocation truncated to fit: R_ARM_ABS16 against symbol `memu_armLdmStmRnTable_0' defined in .dtcm section in ArmLdmStmRn.o
(.dtcm+0xa): relocation truncated to fit: R_ARM_ABS16 against symbol `memu_armStmRdTable' defined in .dtcm section in ArmLdmStmRd.o
(.dtcm+0x10): relocation truncated to fit: R_ARM_ABS16 against symbol `memu_armLdmStmRnTable_0' defined in .dtcm section in ArmLdmStmRn.o
(.dtcm+0x12): relocation truncated to fit: R_ARM_ABS16 against symbol `memu_armLdmRdTable' defined in .dtcm section in ArmLdmStmRd.o
(.dtcm+0x18): relocation truncated to fit: R_ARM_ABS16 against symbol `memu_armLdmStmRnTable_1' defined in .dtcm section in ArmLdmStmRn.o
(.dtcm+0x1a): relocation truncated to fit: R_ARM_ABS16 against symbol `memu_armStmRdTable' defined in .dtcm section in ArmLdmStmRd.o
(.dtcm+0x20): relocation truncated to fit: R_ARM_ABS16 against symbol `memu_armLdmStmRnTable_1' defined in .dtcm section in ArmLdmStmRn.o
(.dtcm+0x22): relocation truncated to fit: R_ARM_ABS16 against symbol `memu_armLdmRdTable' defined in .dtcm section in ArmLdmStmRd.o
(.dtcm+0x28): relocation truncated to fit: R_ARM_ABS16 against symbol `memu_armLdmStmRnTable_0' defined in .dtcm section in ArmLdmStmRn.o
(.dtcm+0x2a): relocation truncated to fit: R_ARM_ABS16 against symbol `memu_armStmRdTable' defined in .dtcm section in ArmLdmStmRd.o
(.dtcm+0x30): additional relocation overflows omitted from the output
collect2: error: ld returned 1 exit status
make[3]: *** [/opt/devkitpro/devkitARM/ds_rules:57: /workspace/code/core/arm9/arm9.elf] Error 1
make[2]: *** [Makefile:132: build] Error 2
make[2]: Leaving directory '/workspace/code/core/arm9'
make[1]: *** [Makefile:35: checkcorearm9] Error 2
make[1]: Leaving directory '/workspace/code/bootstrap'
make: *** [Makefile:26: checkbootstrap] Error 2
root@9c462da90669:/workspace/code# ls
bootstrap  core  libs  Makefile  test

I'm running the devkitpro/devkitarm Docker container on an M1 Mac.

bMac244 commented 3 months ago

As of the current commit (90b994f), It will build and pass on macOS, and the binary will run. There's audio problems but that's a different issue. You can probably close #57 as well.