Mac OSX
Sure!
Since there's no binaries, I'll explain how to do it from source.
1. Make sure you've got the developer tools installed
2. Extract the release kit to your home directory
3. Set the following variables in your .bash_profile:
4. Enter $HOME/z88dk and type make
To recompile the libs do the following:
1. cd $HOME/z88dk/libsrc
2. make
3. cp *.lib ../lib/clibs
Since there's no binaries, I'll explain how to do it from source.
1. Make sure you've got the developer tools installed
2. Extract the release kit to your home directory
3. Set the following variables in your .bash_profile:
Code: Select all
export Z80_OZFILES=$HOME/z88dk/lib/
export ZCCCFG=$HOME/z88dk/lib/config/
export PATH=$HOME/z88dk/bin:$PATH
To recompile the libs do the following:
1. cd $HOME/z88dk/libsrc
2. make
3. cp *.lib ../lib/clibs
Have I got to set up those variables every time (unless I add them to my profile) when I'm compiling. I keep getting: "Can't open config file /usr/local/lib/z88dk/lib/config/zcc.cfg". It has been a while since I've used z88dk but I am going to try. Assuming I can get past my own inadequacies I'm going to need to write a library for the project I'm working on.dom wrote:3. Set the following variables in your .bash_profile:Code: Select all
export Z80_OZFILES=$HOME/z88dk/lib/ export ZCCCFG=$HOME/z88dk/lib/config/ export PATH=$HOME/z88dk/bin:$PATH
-
- Member
- Posts: 16
- Joined: Thu Feb 24, 2011 7:03 pm
I'm having problems compiling current CVS version under OSX Lion.
OS: OSX Lion with XCode 4.1.1
Steps to get the current CVS revision:
# cd ~
# cvs -d:pserver:anonymous@z88dk.cvs.sourceforge.net:/cvsroot/z88dk login
# cvs -z3 -d:pserver:anonymous@z88dk.cvs.sourceforge.net:/cvsroot/z88dk co -P z88dk
# cd ~/z88dk/
# cvs update -d
Steps for preparing the environment:
# export Z80_OZFILES=$HOME/z88dk/lib/
# export ZCCCFG=$HOME/z88dk/lib/config/
# export PATH=$HOME/z88dk/bin:$PATH
Steps for compiling:
# cd ~/z88dk
# ./build.sh
and I get this error:
Any ideas? Thanks!
OS: OSX Lion with XCode 4.1.1
Steps to get the current CVS revision:
# cd ~
# cvs -d:pserver:anonymous@z88dk.cvs.sourceforge.net:/cvsroot/z88dk login
# cvs -z3 -d:pserver:anonymous@z88dk.cvs.sourceforge.net:/cvsroot/z88dk co -P z88dk
# cd ~/z88dk/
# cvs update -d
Steps for preparing the environment:
# export Z80_OZFILES=$HOME/z88dk/lib/
# export ZCCCFG=$HOME/z88dk/lib/config/
# export PATH=$HOME/z88dk/bin:$PATH
Steps for compiling:
# cd ~/z88dk
# ./build.sh
and I get this error:
Code: Select all
echo '#define PREFIX "/usr/local/lib/z88dk"' > src/config.h
echo '#define UNIX 1' >> src/config.h
make -C src/appmake
cc -c mtx.c
mtx.c:9:20: error: malloc.h: No such file or directory
make[1]: *** [mtx.o] Error 1
make: *** [appmake] Error 2
Last edited by wintermute on Sat Sep 24, 2011 11:44 am, edited 1 time in total.
-
- Member
- Posts: 16
- Joined: Thu Feb 24, 2011 7:03 pm
-
- Member
- Posts: 16
- Joined: Thu Feb 24, 2011 7:03 pm
Thanks for the heads up Dom! But there's something tricky going on there.
If I remove z88dk/include/malloc.h, compilation starts and passes beyond my previous error. But then it stops here:
But if now I restore z88dk/include/malloc.h and rerun ./build.sh, the compilation runs OK to the end. Weird...
If I remove z88dk/include/malloc.h, compilation starts and passes beyond my previous error. But then it stops here:
Code: Select all
cd setjmp ; make ; cd ..
zcc +test -vn -make-lib -Wn43 longjmp.c
zcc +test -vn -make-lib -Wn43 setjmp.c
cd assert ; make ; cd ..
zcc +test -vn -make-lib -Wn43 assert.c
cpp: line 83, Fatal error: Cannot open include file "malloc.h"
#include <malloc.h>
from file assert.c, line 14:
#include <stdlib.h>
make[1]: *** [assert.o] Error 1
make gamesdeps
rm -f -f games/*.o
cd games ; make lz88 ; cd ..
zcc +z88 -vn -make-lib -Wn43 -DZ88 bit_frequency.c
zcc +z88 -vn -make-lib -Wn43 -DZ88 bit_play.c
z80asm -d -ns -nm -Mo -DFORz88 -x./z88_clib @./z88.lst
Error: File 'assert/assert.o' open error
1 errors occurred during assembly
make: *** [z88_clib.lib] Error 1
cp ./*.lib ../lib/clibs
cp: ./*.lib: No such file or directory
make: *** [install] Error 1
-
- Member
- Posts: 16
- Joined: Thu Feb 24, 2011 7:03 pm
-
- Member
- Posts: 16
- Joined: Thu Feb 24, 2011 7:03 pm
Hi!
Ok, here we go again... now the issue is that I can't get to compile SP1 library correctly.
After building the CVS, I do these steps:
and this output is generated:
But no sp1.lib is compiled anywhere... only sp1.h is copied correctly.
What could be wrong?
Ok, here we go again... now the issue is that I can't get to compile SP1 library correctly.
After building the CVS, I do these steps:
Code: Select all
# export Z80_OZFILES=$HOME/z88dk/lib/
# export ZCCCFG=$HOME/z88dk/lib/config/
# export PATH=$HOME/z88dk/bin:$PATH
# cd ~/z88dk/libsrc/
# make sp1-spectrum
Code: Select all
cd sprites/software/sp1 ; make sp1-spectrum; cd ../../..
SP1 Software Sprite Engine
making sinclair spectrum version
z80asm -d -ns -nm -Mo -x../../.././sp1 @spectrum.lst
cp spectrum/spectrum-sp1.h ../../../../include/sprites/sp1.h
all done
What could be wrong?
It looks like the assembler/linker has got a bit of a bug in it.
Paulo has been doing some work in the assembler lately and this looks like one for him, I'll pass it on unless he's looking out for problems on the forum.
The issue is that we ask it to replace the extension on ./zx_clib with the intention of creating ./zx_clib.lib, but it ends up creating .lib instead.
Paulo has been doing some work in the assembler lately and this looks like one for him, I'll pass it on unless he's looking out for problems on the forum.
The issue is that we ask it to replace the extension on ./zx_clib with the intention of creating ./zx_clib.lib, but it ends up creating .lib instead.
-
- Member
- Posts: 16
- Joined: Thu Feb 24, 2011 7:03 pm
-
- Member
- Posts: 16
- Joined: Thu Feb 24, 2011 7:03 pm
Hi,
updated to 10.75, Xcode 4.3.3, latest from repo, and I get the following errors:
echo '#define PREFIX "/usr/local/lib/z88dk"' > src/config.h
echo '#define UNIX 1' >> src/config.h
make -C src/appmake
make[1]: Nothing to be done for `all'.
make -C src/appmake PREFIX=`pwd` install
install appmake /z88dk/bin
make -C src/copt
make[1]: Nothing to be done for `all'.
make -C src/copt PREFIX=`pwd` install
install copt /z88dk/bin
make -C src/cpp
make[1]: `zcpp' is up to date.
make -C src/cpp PREFIX=`pwd` install
install zcpp /z88dk/bin
make -C src/sccz80
make[1]: Nothing to be done for `all'.
make -C src/sccz80 PREFIX=`pwd` install
install -m 755 sccz80 /z88dk/bin/sccz80
echo 'Configure z80asm for ENDIAN status!!'
Configure z80asm for ENDIAN status!!
make -C src/z80asm
cc -c -o z80pass.o z80pass.c
In file included from z80pass.c:73:
./config.h:73:5: error: invalid token at start of a preprocessor expression
#if #cpu(m68k) || #cpu(sparc) || #cpu(hppa) || #cpu(powerpc)
^
z80pass.c:97:6: error: conflicting types for 'getline'
void getline (void);
^
/usr/include/stdio.h:449:9: note: previous declaration is here
ssize_t getline(char ** __restrict, size_t * __restrict, FILE * ...
^
z80pass.c:168:1: error: conflicting types for 'getline'
getline (void)
^
/usr/include/stdio.h:449:9: note: previous declaration is here
ssize_t getline(char ** __restrict, size_t * __restrict, FILE * ...
^
z80pass.c:201:11: error: too few arguments to function call, expected 3, have 0
getline (); /* get a copy of current source line */
~~~~~~~ ^
/usr/include/stdio.h:449:1: note: 'getline' declared here
ssize_t getline(char ** __restrict, size_t * __restrict, FILE * ...
^
z80pass.c:522:25: warning: equality comparison with extraneous parentheses
[-Wparentheses-equality]
if ((modulehdr->first == CURRENTMODULE))
~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~
z80pass.c:522:25: note: remove extraneous parentheses around the comparison to
silence this warning
if ((modulehdr->first == CURRENTMODULE))
~ ^ ~
z80pass.c:522:25: note: use '=' to turn this equality comparison into an
assignment
if ((modulehdr->first == CURRENTMODULE))
^~
=
z80pass.c:856:25: warning: field width should have type 'int', but argument has
type 'unsigned long' [-Wformat]
fprintf (listfile, "%*.*s", (int) 122 - strlen (copyrightmsg), (int) ...
~~^~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
z80pass.c:858:34: warning: field width should have type 'int', but argument has
type 'unsigned long' [-Wformat]
...%03d%*s'%s'\n\n\n", ++PAGENR, (int) 122 - 9 - 2 - strlen (lstfilename), ...
~~^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3 warnings and 4 errors generated.
updated to 10.75, Xcode 4.3.3, latest from repo, and I get the following errors:
echo '#define PREFIX "/usr/local/lib/z88dk"' > src/config.h
echo '#define UNIX 1' >> src/config.h
make -C src/appmake
make[1]: Nothing to be done for `all'.
make -C src/appmake PREFIX=`pwd` install
install appmake /z88dk/bin
make -C src/copt
make[1]: Nothing to be done for `all'.
make -C src/copt PREFIX=`pwd` install
install copt /z88dk/bin
make -C src/cpp
make[1]: `zcpp' is up to date.
make -C src/cpp PREFIX=`pwd` install
install zcpp /z88dk/bin
make -C src/sccz80
make[1]: Nothing to be done for `all'.
make -C src/sccz80 PREFIX=`pwd` install
install -m 755 sccz80 /z88dk/bin/sccz80
echo 'Configure z80asm for ENDIAN status!!'
Configure z80asm for ENDIAN status!!
make -C src/z80asm
cc -c -o z80pass.o z80pass.c
In file included from z80pass.c:73:
./config.h:73:5: error: invalid token at start of a preprocessor expression
#if #cpu(m68k) || #cpu(sparc) || #cpu(hppa) || #cpu(powerpc)
^
z80pass.c:97:6: error: conflicting types for 'getline'
void getline (void);
^
/usr/include/stdio.h:449:9: note: previous declaration is here
ssize_t getline(char ** __restrict, size_t * __restrict, FILE * ...
^
z80pass.c:168:1: error: conflicting types for 'getline'
getline (void)
^
/usr/include/stdio.h:449:9: note: previous declaration is here
ssize_t getline(char ** __restrict, size_t * __restrict, FILE * ...
^
z80pass.c:201:11: error: too few arguments to function call, expected 3, have 0
getline (); /* get a copy of current source line */
~~~~~~~ ^
/usr/include/stdio.h:449:1: note: 'getline' declared here
ssize_t getline(char ** __restrict, size_t * __restrict, FILE * ...
^
z80pass.c:522:25: warning: equality comparison with extraneous parentheses
[-Wparentheses-equality]
if ((modulehdr->first == CURRENTMODULE))
~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~
z80pass.c:522:25: note: remove extraneous parentheses around the comparison to
silence this warning
if ((modulehdr->first == CURRENTMODULE))
~ ^ ~
z80pass.c:522:25: note: use '=' to turn this equality comparison into an
assignment
if ((modulehdr->first == CURRENTMODULE))
^~
=
z80pass.c:856:25: warning: field width should have type 'int', but argument has
type 'unsigned long' [-Wformat]
fprintf (listfile, "%*.*s", (int) 122 - strlen (copyrightmsg), (int) ...
~~^~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
z80pass.c:858:34: warning: field width should have type 'int', but argument has
type 'unsigned long' [-Wformat]
...%03d%*s'%s'\n\n\n", ++PAGENR, (int) 122 - 9 - 2 - strlen (lstfilename), ...
~~^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3 warnings and 4 errors generated.
-
- Member
- Posts: 16
- Joined: Thu Feb 24, 2011 7:03 pm
-
- Member
- Posts: 16
- Joined: Thu Feb 24, 2011 7:03 pm
Hi again groox!
I think I've figured out your compiling problem: you need to install the GCC compiler through xCode.
Start xCode and go to the menu option xCode->Preferences. Choose the Downloads icon and then the Components tab, and choose to install the Command Line tools.
Hope this solves the issue.
I think I've figured out your compiling problem: you need to install the GCC compiler through xCode.
Start xCode and go to the menu option xCode->Preferences. Choose the Downloads icon and then the Components tab, and choose to install the Command Line tools.
Hope this solves the issue.

Hi wintermute,
I've been able to compile and install.
When I try to compile I always get the same error:
zcc +zx -vn prueba2.c -o prueba2.bin -lndos -lsp1 -lmalloc -lim2 -create-app -zorg=32768
sccz80:"prueba2.c" L:150 Warning:#36:In function: drawmap() line 1
sccz80:"prueba2.c" L:150 Warning:#13:Pointer/pointer type mismatch
sccz80:"prueba2.c" L:150 Warning:#34:Func expects: struct sp1_tp*
sccz80:"prueba2.c" L:150 Warning:#35:Func gets: unsigned char *
Error at module 'ZX82_CRT0': Cannot read from file
1 errors occurred during assembly
Key to filenames:
/tmp/tmpJ6il8x2w.o = prueba2.c
Error at module 'ZX82_CRT0': Cannot read from file
make: *** [prueba2.bin] Error 1
I really don't know what I'm doing wrong.
Thx
I've been able to compile and install.
When I try to compile I always get the same error:
zcc +zx -vn prueba2.c -o prueba2.bin -lndos -lsp1 -lmalloc -lim2 -create-app -zorg=32768
sccz80:"prueba2.c" L:150 Warning:#36:In function: drawmap() line 1
sccz80:"prueba2.c" L:150 Warning:#13:Pointer/pointer type mismatch
sccz80:"prueba2.c" L:150 Warning:#34:Func expects: struct sp1_tp*
sccz80:"prueba2.c" L:150 Warning:#35:Func gets: unsigned char *
Error at module 'ZX82_CRT0': Cannot read from file
1 errors occurred during assembly
Key to filenames:
/tmp/tmpJ6il8x2w.o = prueba2.c
Error at module 'ZX82_CRT0': Cannot read from file
make: *** [prueba2.bin] Error 1
I really don't know what I'm doing wrong.
Thx
-
- Member
- Posts: 16
- Joined: Thu Feb 24, 2011 7:03 pm
Hello!


But have you compiled the SP1 library for the ZX81 target? The SP1 library must be configured and compiled apart of the whole compiling process.
Great!groox wrote:I've been able to compile and install.

This escapes to my knowledge.groox wrote:When I try to compile I always get the same error:
[...]
I really don't know what I'm doing wrong.

But have you compiled the SP1 library for the ZX81 target? The SP1 library must be configured and compiled apart of the whole compiling process.
Hello,
I built and installed the development kit with the latest nightly snapshot, and had no problems so far.
- Except that I got the same Error at "Building Interface 1 RS232 library" which is in the nightly report, either.
(My system configuration is 10.7.5 with XCode 4.5.1 and latest command line tools installed.)
I encountered a problem with the global installation.
After buid.sh, make install and make install-libs I went to z88dk/examples/z88
and ran, as an the README
which brought the output
In fact there was no config-directory in /usr/local/lib/z88dk/lib/.
I solved it by adding the following lines to make install-libs in my Makefile:
And ran it again.
Running the same command for the example above I now got
As I'm not sure if it is a really "bug", a specific problem on OS X, or there is something wrong with the environment variables, I wanted to ask you here.
BTW, my environment variables have been set as follows at both tests:
Thanks for your help in advance.
Oliver
I built and installed the development kit with the latest nightly snapshot, and had no problems so far.
- Except that I got the same Error at "Building Interface 1 RS232 library" which is in the nightly report, either.
(My system configuration is 10.7.5 with XCode 4.5.1 and latest command line tools installed.)
I encountered a problem with the global installation.
After buid.sh, make install and make install-libs I went to z88dk/examples/z88
and ran, as an the README
Code: Select all
zcc -lgfx gfx.c
Code: Select all
Can't open config file /usr/local/lib/z88dk/lib/config/zcc.cfg
I solved it by adding the following lines to make install-libs in my Makefile:
Code: Select all
mkdir -p $(prefix)/lib/z88dk/lib/config
cp -R lib/config/* $(prefix)/lib/z88dk/lib/config/
find $(prefix)/lib/z88dk/lib/config -type f | xargs chmod 644
Running the same command for the example above I now got
Code: Select all
cp /usr/local/share/z88dk/lib/z88_crt0.opt /tmp/tmpR46qXjpD.opt
cp /tmp/tmpR46qXjpD.opt /tmp/tmpR46qXjpD.asm
zcpp -I. -DZ80 -DSMALL_C -DZ88 -D__Z88__ -DSCCZ80 -I/usr/local/share/z88dk/include gfx.c /tmp/tmpBKBZdfJX.i
sccz80 /tmp/tmpBKBZdfJX.i
copt /usr/local/share/z88dk/lib/z80rules.2 < /tmp/tmpBKBZdfJX.asm > /tmp/tmpBKBZdfJX.op1
copt /usr/local/share/z88dk/lib/z80rules.1 < /tmp/tmpBKBZdfJX.op1 > /tmp/tmpBKBZdfJX.opt
z80asm -eopt -ns -Mo -I/usr/local/share/z88dk/lib /tmp/tmpBKBZdfJX.opt
z80asm -a -m -Mo -L/usr/local/share/z88dk/lib/clibs -I/usr/local/share/z88dk/lib -oa.bas -igfx -iz88_clib -iz80_crt0 /tmp/tmpR46qXjpD.opt /tmp/tmpBKBZdfJX.o
BTW, my environment variables have been set as follows at both tests:
Code: Select all
ZCCCFG = /usr/local/share/z88dk/lib/config/
Z80_OZFILES = /usr/local/share/z88dk/lib/
Oliver