Giter Site home page Giter Site logo

gheja / gbdk Goto Github PK

View Code? Open in Web Editor NEW
83.0 83.0 11.0 2.11 MB

GameBoy Developer's Kit (GBDK) 2.96a from 2002 tuned so it can be compiled on a modern system (Ubuntu 18.04 LTS and 16.04 LTS).

Shell 0.81% C 73.70% Perl 0.10% Assembly 4.57% C++ 10.43% Emacs Lisp 1.06% Objective-C 0.03% Awk 0.01% Python 0.19% Makefile 2.44% Batchfile 0.02% HTML 5.52% TeX 0.10% Lex 0.22% Yacc 0.58% NSIS 0.02% Roff 0.10% PHP 0.01% SWIG 0.12%

gbdk's People

Contributors

gheja avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

gbdk's Issues

SDCC.lex:45:7: error: redefinition of 'yylineno'

SDCC.lex:45:7: error: redefinition of 'yylineno'
:351:5: note: previous definition of 'yylineno' was here
SDCC.lex:50:12: error: expected '=', ',', ';', 'asm' or 'attribute' before 'YY_PROTO'
make[2]: *** [SDCClex.o] Error 1
make[2]: Leaving directory '/home/builder/project/sdcc/src'
make[1]: *** [sdcc-cc] Error 2
make[1]: Leaving directory '/home/builder/project/sdcc'
make: *** [sdcc-build] Error 2

Error compiling on cygwin x86-64 (missing typedef?)

Below is the relevant portion of the error dump. From this I suspect that _IO_ssize_t is not defined within the context of aslink.h.

make[4]: Entering directory '~/gbdk/sdcc/link/z80'
mkdir -p obj/-z80
gcc -c -ggdb -O2 -pipe -Wall  -I. -I../.. -I../../support/Util  -DINDEXLIB -DMLH_MAP -DUNIX -DSDK -funsigned-char -DUNIX -I../../as/z80 -I../../support/Util  -o obj/-z80/lkarea.o lkarea.c
In file included from lkarea.c:13:0:
../../as/z80/string.h:9:12: warning: conflicting types for built-in function ‘strlen’
 extern int strlen();
            ^
In file included from lkarea.c:14:0:
aslink.h:638:8: error: unknown type name ‘_IO_ssize_t’
 extern _IO_ssize_t getline(char **__restrict __lineptr, size_t *__restrict __n, FILE *__restrict __stream);
        ^
aslink.h:638:20: error: conflicting types for ‘getline’
 extern _IO_ssize_t getline(char **__restrict __lineptr, size_t *__restrict __n, FILE *__restrict __stream);
                    ^
In file included from /usr/include/stdio.h:29:0,
                 from lkarea.c:12:
/usr/include/sys/stdio.h:35:9: note: previous declaration of ‘getline’ was here
 ssize_t _EXFUN(getline, (char **, size_t *, FILE *));
         ^
make[4]: *** [Makefile:33: obj/-z80/lkarea.o] Error 1

Make error on AWS Cloud9

I am trying to build this on an AWS Cloud9 Ubuntu Server 18.04 LTS machine (not the normal AWS Linux machine). I am using this download:
https://sourceforge.net/projects/gbdk/files/gbdk/2.96/gbdk-2.96a.tar.gz/download

When I run the make I get the following error:
make[3]: Leaving directory '/home/ubuntu/environment/gbdk/sdcc/src/z80'
gcc -ggdb -O2 -pipe -Wall -DSDCC_SUB_VERSION_STR="gbdk-2.96a" -I. -I.. -I../support/Util -c ../support/Util/SDCCerr.c -o SDCCerr.o
gcc -ggdb -O2 -pipe -Wall -DSDCC_SUB_VERSION_STR="gbdk-2.96a" -I. -I.. -I../support/Util -c ../support/Util/NewAlloc.c -o NewAlloc.o
gcc -ggdb -O2 -pipe -Wall -DSDCC_SUB_VERSION_STR="gbdk-2.96a" -I. -I.. -I../support/Util -c ../support/Util/MySystem.c -o MySystem.o
gcc -ggdb -O2 -pipe -Wall -DSDCC_SUB_VERSION_STR="gbdk-2.96a" -I. -I.. -I../support/Util -c ../support/Util/BuildCmd.c -o BuildCmd.o
gcc -ggdb -O2 -pipe -Wall -DSDCC_SUB_VERSION_STR="gbdk-2.96a" -I. -I.. -I../support/Util -c SDCCy.c -o SDCCy.o
SDCC.y: In function ‘yyparse’:
SDCC.y:1004:4: error: label at end of compound statement
default:
^~~~~~~
Makefile:100: recipe for target 'SDCCy.o' failed
make[2]: *** [SDCCy.o] Error 1
make[2]: Leaving directory '/home/ubuntu/environment/gbdk/sdcc/src'
Makefile:55: recipe for target 'sdcc-cc' failed
make[1]: *** [sdcc-cc] Error 2
make[1]: Leaving directory '/home/ubuntu/environment/gbdk/sdcc'
Makefile:137: recipe for target 'sdcc-build' failed
make: *** [sdcc-build] Error 2

Error building on macOS

The #1 error I was getting was "error: unknown type name '_IO_ssize_t'" which seemed to me to be a bit trivial, so, (and maybe this has something to do with the second error considering idrk what i'm doing), I edited _IO_ssize_t to just ssize_t, that bit no longer gave errors, but further along compiling:

sh: /Users/admin/gbdk/sdcc/bin/sdcpp: No such file or directory
Looking through the Github files I can't find any SDCPP. Where can I get the source for this?
Thanks

Nevermind, fixed it. SDCPP wasn't compiling correctly, running autoconf in the SDCC/support/cpp2 directory seems to have fixed it.

Integrate to Travis CI

Integrate to Travis CI to have automatic build to ensure the code can be compiled without errors.

Missing sdcc/bin

As git does not store empty directories, sdcc/bin is now missing.

Work together with GBDK-N?

You're supporting the old GBDK which is based around a 15+ year old version of the compiler/assembler/linker in an ancient SDCC, full of bugs.

GBDK-N has been updated to work with the latest SDCC suite and is good moving forward to get people off of such an old compiler. Maybe it's a good idea to combine efforts so people, oblivious to an updated library, such as those doing homebrew in the gbdev scene can start using a modern set of tools?

Compilation fails on g++ 4.6.3 (ubuntu, Travis CI)

gcc -lm -o maccer maccer.o
maccer.o: In function 'output_float':
maccer.c:(.text+0x95): undefined reference to 'log'
maccer.c:(.text+0xa2): undefined reference to 'floor'
maccer.c:(.text+0xc3): undefined reference to 'exp'
collect2: ld returned 1 exit status
make[1]: *** [maccer] Error 1
make[1]: Leaving directory '/home/travis/build/gheja/gbdk/maccer'
make: *** [maccer-build] Error 2

SDCC.y:1004:4: error: label at end of compound statement

SDCC.y: In function 'yyparse':
SDCC.y:1004:4: error: label at end of compound statement
make[2]: *** [SDCCy.o] Error 1
make[2]: Leaving directory '/home/builder/gbdk/sdcc/src'
make[1]: *** [sdcc-cc] Error 2
make[1]: Leaving directory '/home/builder/gbdk/sdcc'
make: *** [sdcc-build] Error 2

Build of documentation fails

/usr/bin/install -c -d /home/builder/project/tmp/share/doc/sdcc
cp -rf *.html *.txt *.pdf sdccman.html test_suite_spec.html z80 avr /home/builder/project/tmp/share/doc/sdcc
cp: will not create hard link '/home/builder/project/tmp/share/doc/sdcc/sdccman.html' to directory '/home/builder/project/tmp/share/doc/sdcc/sdccman.html'
cp: will not create hard link '/home/builder/project/tmp/share/doc/sdcc/test_suite_spec.html' to directory '/home/builder/project/tmp/share/doc/sdcc/test_suite_spec.html'
make[2]: *** [install] Error 1
make[2]: Leaving directory '/home/builder/project/sdcc/doc'
make[1]: *** [install] Error 2

Binary release

Create binary releases for Linux (and maybe Windows).

Memory functions not working.

Upon compiling all of the memory allocation, etc. functions aren't defined.
I'm not entirely sure why, but this is what I get in the console.

main.c(67):warning *** function 'memset' implicit declaration

main.c(78):warning *** function 'free' implicit declaration

main.c(82):warning *** function 'malloc' implicit declaration

Is this just a weird bug on my end?

error: number of arguments doesn't match prototype -- getline()

asmain.c: In function 'main':
asmain.c:291:3: error: too few arguments to function 'getline'
In file included from asmain.c:15:0:
/usr/include/stdio.h:671:20: note: declared here
make[2]: *** [asmain.o] Error 1
make[2]: Leaving directory '/home/builder/project/sdcc/as/mcs51'
make[2]: Entering directory '/home/builder/project/sdcc/as'

lklex.c: In function 'getline':
lklex.c:425:1: error: number of arguments doesn't match prototype
In file included from lklex.c:16:0:
/usr/include/stdio.h:671:20: error: prototype declaration
make[4]: *** [obj/-z80/lklex.o] Error 1
make[4]: Leaving directory '/home/builder/project/sdcc/link/z80'

... and a lot more instances of these messages ...

Shoud BOOLEAN be unsigned?

Currently in gbdk/include/asm/types.h defines BOOLEAN as INT8 which is signed by default. The documentattion states "Prefer unsigned variables to signed ones. The code generated will be generally more efficient, espacially when comparing two values."

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.