13

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.

10
  • 1
    That error is commonly for the binary is not compatible with your processor. The 80386 appears to be 32-bit and your computer is most likely 64-bit. Do you have the 64/32-bit compatibility libraries installed?
    – RomaH
    Aug 16, 2016 at 20:39
  • @RomaH I know that's the error. The problem is that the libraries are bundled with the source code. So I'm in the process of painstakingly building each bundled dependency from scratch or moving to a more modern tool available on my system.
    – JAL
    Aug 16, 2016 at 20:40
  • Any answer is going to primarily be about getting libraries and binaries working on modern equipment. This feels off-topic. If this project is being maintained you'd be better off communicating directly with them. If you are resurrecting an abandoned project you probably just need to take this to a general computing forum of some sort.
    – user12
    Aug 17, 2016 at 21:45
  • @jdv Can you offer any suggestions on how this could be edited to be more on-topic? Or do you believe this question is unsalvageable for Retrocomputing.
    – JAL
    Aug 17, 2016 at 22:54
  • 4
    That's also a Linux binary, whereas you are using Mac OS X. Aug 26, 2016 at 10:54

2 Answers 2

9

Build it on a Linux VM of the era. The tools will probably expect command lines of GCC of the time, as well as libraries current at that time.

I'd say something like Debian 2.0 or Redhat 7 (not RHEL!) should be OK.

1

I did a quick search for macOS versions of the Gameboy Development kit and I found this:

https://github.com/x43x61x69/gbdk-osx

it doesn't build on my Mac but it looks like the issue is just one of locating build directories properly. However, it does include the source code of lcc and maccer.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .