Installation on Ubuntu 9.04

Problems installing on other platforms
Post Reply
jannone
New member
Posts: 5
Joined: Tue Sep 01, 2009 12:06 am

Installation on Ubuntu 9.04

Post by jannone »

Hey guys, this is my first post. :)

I've been getting some issues when trying to compile z88dk on Ubuntu 9.04 (the latest one, for now).

More specifically, it throws some errors when compiling the libs.

Here is the error log: http://pastebin.com/f6188b227

It seems to present a lot of Integers out of range.

Tried with the latest win32 sources, and also the CVS z88dk module. Same result for both.

Any clues?

Thanks in advance!
User avatar
dom
Well known member
Posts: 1195
Joined: Sun Jul 15, 2007 10:01 pm

Post by dom »

I'm guessing it's a 64 bit install?

Two solutions.

1. Compile as a 32 bit app: export CFLAGS=-m32 and rebuild
2. Apply the patch here: http://www.z88dk.org/forum/viewtopic.php?id=3534 which hopefully fixes the 64 bit problems.
jannone
New member
Posts: 5
Joined: Tue Sep 01, 2009 12:06 am

Post by jannone »

dom wrote:I'm guessing it's a 64 bit install?

Two solutions.

1. Compile as a 32 bit app: export CFLAGS=-m32 and rebuild
2. Apply the patch here: http://www.z88dk.org/forum/viewtopic.php?id=3534 which hopefully fixes the 64 bit problems.
Yes, it's a 64 bit install.

So I tried your patch and it compiled. That's great!

BUT... the MSX examples are not compiling using the examples/msx/Makefile. :(

Here is a log:

Code: Select all

jannone@hibiki:~/src/z88dk/examples/msx$ make -f Makefile
zcc +msx -llib3d -lmalloc -lm -lndos -create-app -oex1.bin ex1.c
cp /usr/local/share/z88dk/lib/msx_crt0.opt /tmp/tmpXXAtW67D.opt
cp /tmp/tmpXXAtW67D.opt /tmp/tmpXXAtW67D.asm
zcpp -I. -DZ80 -DSMALL_C -DMSX -D__MSX__ -DSCCZ80 -I/usr/local/share/z88dk/include  ex1.c /tmp/tmpXXs2Ovvo.i
sccz80    -//  /tmp/tmpXXs2Ovvo.i
copt /usr/local/share/z88dk/lib/z80rules.2 < /tmp/tmpXXs2Ovvo.asm > /tmp/tmpXXs2Ovvo.op1
copt /usr/local/share/z88dk/lib/z80rules.1 < /tmp/tmpXXs2Ovvo.op1 > /tmp/tmpXXs2Ovvo.opt
z80asm -eopt -ns -Mo -I/usr/local/share/z88dk/lib /tmp/tmpXXs2Ovvo.opt
z80asm -a -m -Mo -L/usr/local/share/z88dk/lib/clibs -oex1.bin -indos  -igen_math  -imalloc  -ilib3d  -indos  -imsx_clib  -iz80_crt0  /tmp/tmpXXAtW67D.opt /tmp/tmpXXs2Ovvo.o
1 errors occurred during assembly
Key to filenames:
/tmp/tmpXXs2Ovvo.o = ex1.c
File '/tmp/tmpXXAtW67D.asm', at line 2, File open/read error
make: ** [ex1.o] Erro 1
This is a real bummer for me, since I'm originally the author of the MSX libs that Stefano adapted to z88dk, and I'm really curious to see what you guys have achieved. I'd like to start using the compiler myself, maybe help improving the libs as much as possible.

OTOH, compiling as 32 bits didn't work for me. I guess for that I would need to install a whole stack of 32 bit headers and libs.
User avatar
dom
Well known member
Posts: 1195
Joined: Sun Jul 15, 2007 10:01 pm

Post by dom »

Almost there, it looks like you need to set Z80_OZFILES to {z88dk}/lib/
jannone
New member
Posts: 5
Joined: Tue Sep 01, 2009 12:06 am

Post by jannone »

dom wrote:Almost there, it looks like you need to set Z80_OZFILES to {z88dk}/lib/
Ok, thanks for the tip!

I tried it this way:

Code: Select all

jannone@hibiki:~/src/z88dk/examples/msx$ export Z80_OZFILES=/home/jannone/src/z88dk/lib/
jannone@hibiki:~/src/z88dk/examples/msx$ make
zcc +msx -llib3d -lmalloc -lm -lndos -create-app -oex1.bin ex1.c
cp /usr/local/share/z88dk/lib/msx_crt0.opt /tmp/tmpXXrmOcYE.opt
cp /tmp/tmpXXrmOcYE.opt /tmp/tmpXXrmOcYE.asm
zcpp -I. -DZ80 -DSMALL_C -DMSX -D__MSX__ -DSCCZ80 -I/usr/local/share/z88dk/include  ex1.c /tmp/tmpXXYjiwjR.i
sccz80    -//  /tmp/tmpXXYjiwjR.i
copt /usr/local/share/z88dk/lib/z80rules.2 < /tmp/tmpXXYjiwjR.asm > /tmp/tmpXXYjiwjR.op1
copt /usr/local/share/z88dk/lib/z80rules.1 < /tmp/tmpXXYjiwjR.op1 > /tmp/tmpXXYjiwjR.opt
z80asm -eopt -ns -Mo -I/usr/local/share/z88dk/lib /tmp/tmpXXYjiwjR.opt
z80asm -a -m -Mo -L/usr/local/share/z88dk/lib/clibs -oex1.bin -indos  -igen_math  -imalloc  -ilib3d  -indos  -imsx_clib  -iz80_crt0  /tmp/tmpXXrmOcYE.opt /tmp/tmpXXYjiwjR.o
The problem now is it gets stuck at this last line, consuming 100% CPU resources.
User avatar
dom
Well known member
Posts: 1195
Joined: Sun Jul 15, 2007 10:01 pm

Post by dom »

That looks like another 64 bit portability issue.

As you might have guessed, I'm slowly working through the issues that pop up (and with such old software there's bound to be a few!) so apologies, hopefully the next release will be 64 bit clean.

If you do a cvs update on src/z80asm and then rebuild z80asm then that problem should be sorted - after that I can do a build of the msx examples ex1, ex2 and ex3, ex4 fails due to a missing msx_get_vdp() function which hopefully Stefano can explain where it's got to!
jannone
New member
Posts: 5
Joined: Tue Sep 01, 2009 12:06 am

Post by jannone »

Thanks Dom, I'll try that.

If you need any help in providing debug logs for this stuff, just let me know what I can do.
stefano
Well known member
Posts: 1534
Joined: Mon Jul 16, 2007 7:39 pm

Post by stefano »

dom wrote:ex4 fails due to a missing msx_get_vdp() function which hopefully Stefano can explain where it's got to!
I will, I promise !
Erm.. as soon as I remember why :) probably it has to do with my latest attempts to separate the VDP related stuff and make it general for MSX, Sord, Sega, etc..
Probably it is just something missing in the .LSTed inclusions for the MSX library or in the #include definitions.

Anyway, welcome Rafael !
jannone
New member
Posts: 5
Joined: Tue Sep 01, 2009 12:06 am

Post by jannone »

stefano wrote:Anyway, welcome Rafael !
Thanks Stefano! :D

BTW, Dom, I just tested your fix now and it works.

Now the only remaining issue is the MSX emulator not recognizing the .BIN file format.

Tried with BLOAD "EX1.BIN",R, it throws a "Bad file mode" error.

I'm not sure how the BIN header is being generated by the assembler.
stefano
Well known member
Posts: 1534
Joined: Mon Jul 16, 2007 7:39 pm

Post by stefano »

Try with the "msx" ones. Bin is the z88dk default for the raw binary block.
Makefile.msd should, in turn, build the MSXDOS version of the same demos.

The error on ex4.c now fixed, I forgot the set_sprite_mode function when I renamed msx_set_vdp and msx_get_vdp to a generic form.
Post Reply