Gameboy Development Forum

Discussion about software development for the old-school Gameboys, ranging from the "Gray brick" to Gameboy Color
(Launched in 2008)

You are not logged in.

#1 2010-08-22 18:33:28

Gimpneek
New member
From: London, UK
Registered: 2010-08-22
Posts: 2

Using GBDK under Mac OSX 10.6

Hi is anyone using a Mac to make their Gameboy awesomeness?
I've managed to get GBDK to install under linux before without a problem but at the moment I keep getting an error when I try to make the examples.

MacBook:gb gimpneek$ make
../../bin/lcc -Wa-l -Wl-m -Wl-j -c -o galaxy.o galaxy.c
../../bin/lcc: ../../bin/lcc: cannot execute binary file
make: *** [galaxy.o] Error 126

Happens even with sudo make.

bit confused so any help would be appreciated but also keen to find any Mac users who use GBDK.

Offline

 

#2 2010-09-04 14:42:06

Gimpneek
New member
From: London, UK
Registered: 2010-08-22
Posts: 2

Re: Using GBDK under Mac OSX 10.6

I've given up, I've installed Parallels and used Windows to compile. It's pretty nifty with Parallels. Highly recommended

Offline

 

#3 2011-06-03 14:41:10

ProGM
New member
Registered: 2011-06-03
Posts: 9

Re: Using GBDK under Mac OSX 10.6

If you need I've compiled GBDK v2.96a for Macos X 10.6.6.
You can find it here: >Click Me<

Sorry for necroposting, but I think that someone could be useful for some others.

Offline

 

#4 2011-08-02 13:46:33

eightbitraptor
New member
Registered: 2011-08-02
Posts: 4

Re: Using GBDK under Mac OSX 10.6

ProGM wrote:

If you need I've compiled GBDK v2.96a for Macos X 10.6.6.
You can find it here: >Click Me<

Sorry for necroposting, but I think that someone could be useful for some others.

I signed up here to ask this: but how did you get this to compile properly.

I downloaded v 2.96a, replaced the bundled SDCC with version 3 (the last version to have gbZ80 support IIRC) which builds fine, but I'm having massive problems building the gbdk-libs and the rest of it.

Did you have to make many Makefile modifications.

I guess this is pretty academic now that you've done the hard work for us already but colour me curious!

thanks

EDIT: I'm on 10.7 at the moment, which may make a difference, however I haven't had a successful build on 10.6 either.

Last edited by eightbitraptor (2011-08-02 13:49:08)

Offline

 

#5 2011-08-18 05:43:10

ProGM
New member
Registered: 2011-06-03
Posts: 9

Re: Using GBDK under Mac OSX 10.6

Can you tell me exactly what problem are you having?
Which part of the gbdk-libs can't be buit?
While building I had only one problem, related to an sdcpp building problem, I don't remember any other errors.
Maybe something about "doc" folder, that is not necessary for gbdk.

Offline

 

#6 2011-08-30 08:50:42

eightbitraptor
New member
Registered: 2011-08-02
Posts: 4

Re: Using GBDK under Mac OSX 10.6

Sorry for the late reply, I had temporarily shelved this as things got a lot busier at work!

back on it now though, and the errors I'm seeing are here: http://pastebin.com/6cw6ABz4

A small disclaimer but I haven't done any C development in about 6 years so my toolchain skills are a little rusty at best.

Offline

 

#7 2011-08-30 09:18:05

ProGM
New member
Registered: 2011-06-03
Posts: 9

Re: Using GBDK under Mac OSX 10.6

Uhm... go here /Users/matthew.house/Downloads/gbdk/sdcc/bin/ and search for "sdcpp". Can you run it correctly?
The part of the source that returns errors needs that sdcpp was been compiled correctly. It makes me some problems, too.

If sdcpp runs correctly, try to look this folder:
/Users/matthew.house/Downloads/gbdk/gbdk-lib/libc/
and try to understand why abs.o can't be found.

Offline

 

#8 2011-08-30 09:27:13

eightbitraptor
New member
Registered: 2011-08-02
Posts: 4

Re: Using GBDK under Mac OSX 10.6

sdcpp looks like it's been compiled correctly (as per the following output: http://pastebin.com/rRLTdJE1)

I can't find the abs.o file, If I'm understanding this correctly the object file is the result of correctly compiling abs.c so I tried re-running the command to recompile that file (from the output in my bash history) and I end up with what looks like an error in the stdlib.h that's in the include directory.

see here: http://pastebin.com/A0Rdtjjh

I'm going to try and take a look at that file and see what I can see

thanks for your help so far ProGM, it's much appreciated.

Offline

 

#9 2011-08-30 09:39:11

eightbitraptor
New member
Registered: 2011-08-02
Posts: 4

Re: Using GBDK under Mac OSX 10.6

I can get past this error by rolling back SDCC to version 2.9.0

The __ depracation warning seems to have been due to a change before version 2.9 (http://sourceforge.net/tracker/index.ph … tid=350599) and the functionality has been removed for 3.0

still getting some different errors as detailed here: http://pastebin.com/9jzf9Ckm but I'm trying to work through them now.

Offline

 

#10 2011-08-30 09:39:18

ProGM
New member
Registered: 2011-06-03
Posts: 9

Re: Using GBDK under Mac OSX 10.6

Ok, I think that the problem is that you are using a different version of sdcc from the one that the original gbdk library.
Try to open each .c file in the libc folder and replace each occurrence of "NONBANKED" with "__NONBANKED".
Do the same with stdlib.h and each other .h file in the include directory.
I don't know if this will be enough. GBDK is not tested to run new versions of sdcc, maybe you have to adapt some other code parts to make it compatible.

Offline

 

#11 2011-08-31 19:27:02

ProGM
New member
Registered: 2011-06-03
Posts: 9

Re: Using GBDK under Mac OSX 10.6

Oh, sorry, I haven't seen your second post.
Ok, to solve this simply edit printf.c like this:
http://pastie.org/2462625

Simply I replaced each istance of "at" with "att" (you could choose another keyword, If you like).

EDIT: My suggest is to avoid using this new version of sdcc, there are a lot of incompatibilities with gbdk library (you probably need to rewrite lcc source to fix all differences)

Last edited by ProGM (2011-09-01 10:08:58)

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2005 Rickard Andersson