Continuing with my quest to build the Infinity Game Boy Color source code, I am trying to build the Unix source of GBDK 2.1.5 on my macOS El Capitan machine.
Trying to make
the files in the lib
directory gives me this error:
➜ lib git:(master) ✗ make
../bin/lcc -Wa-l -c -o floor.o floor.s
../bin/lcc: ../bin/lcc: cannot execute binary file
make: *** [floor.o] Error 126
Running file
on the lcc
binary reveals that an ancient version of the lcc compiler was bundled with the 2.1.5 release:
➜ lib git:(master) ✗ file ../bin/lcc
../bin/lcc: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.0.0, not stripped
Ok, this won't work on my machine. I'll attempt to fix this by switching all references to lcc
to clang
in the Makefile.
The next dependency is a tool called maccer
, Michael Hope's macro preprocessor. This tool has the same issue as lcc:
➜ lib git:(master) ✗ make
../bin/maccer -o floor.s floor.ms
../bin/maccer: ../bin/maccer: cannot execute binary file
make: *** [floor.s] Error 126
➜ lib git:(master) ✗ file ../bin/maccer
../bin/maccer: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.0.0, not stripped
I can't for the life of me find the source of this, but I did find a modified version called MaccerX.
Question
Is MaccerX a viable alternative to the original maccer? Has anyone successfully built GBDK 2.1.5 on a modern platform with a modern compiler? I expect to run into more of these issues as I attempt to use SDK tools from 15+ years ago.
Well I found maccer, it was in the same GBDK repo. Looking to see if I can make a native build now. I'm not sure the maccer source and be built without doc++ (whatever that is), so looking into that now.