gheja / gbdk Goto Github PK
View Code? Open in Web Editor NEWGameBoy 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).
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).
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
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
Buld now run on i386 but not on amd64 architecture.
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
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.
Add support of .deb package creation to Makefile.
Integrate to Travis CI to have automatic build to ensure the code can be compiled without errors.
maccer should be included in this repository.
SDCC.lex:49: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
andreasjhkarlsson/gbdk-n@70da9c0
Thanks @flozz for bringing this to my attention.
As git does not store empty directories, sdcc/bin is now missing.
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?
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
Build still fails on amd64, see #6.
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
/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
Create binary releases for Linux (and maybe Windows).
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?
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 ...
can this project build on MacOS?
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."
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.