Page 1 of 1

Strange error in Linux, but not in Windows

Posted: Wed Oct 16, 2019 11:53 am
by sm0rvv
Hi all,

I'm trying to use zcc for my brand new RC2014.

I'm using this commandline:
zcc +rc2014 -subtype=basic -v --list -m test.asm -o test

And I get this output:

-------------------------------------
PROCESSING test.asm
cat "test.asm" >> "/tmp/tmpXXoZejGE.asm"
cat "/tmp/tmpXXoZejGE.asm" >> "/tmp/tmpXXoZejGE.tmp"
cat "/tmp/tmpXXoZejGE.tmp" >> "/tmp/tmpXXoZejGE.asm"
z80asm -D__SDCC_IY -I"/home/e/kod/z80/z88dk/lib/config/../..//libsrc/_DEVELOPMENT/target/rc2014" -D__SDCC --list -s -mz80 -I"/home/e/kod/z80/z88dk/lib/config/../..//lib" -I"/home/e/kod/z80/rc2014asm" "/tmp/tmpXXoZejGE.asm"

z80asm: invalid option -- 'D'
z80asm: invalid option -- '_'
z80asm: invalid option -- '_'
z80asm: invalid option -- 'S'
z80asm: invalid option -- 'D'
z80asm: invalid option -- 'C'
z80asm: invalid option -- 'C'
z80asm: invalid option -- '_'
z80asm: invalid option -- 'D'
z80asm: invalid option -- '_'
z80asm: invalid option -- '_'
z80asm: invalid option -- 'S'
z80asm: invalid option -- 'D'
z80asm: invalid option -- 'C'
z80asm: invalid option -- 'C'
z80asm: invalid option -- 's'
z80asm: invalid option -- 'm'
z80asm: invalid option -- 'z'
z80asm: invalid option -- '8'
z80asm: invalid option -- '0'
/tmp/tmpXXSWrL29.asm:1: error: command or comment expected (was MODULE test_asm )
/tmp/tmpXXSWrL29.asm:1: error: junk at end of line: MODULE test_asm
/tmp/tmpXXSWrL29.asm:2: error: command or comment expected (was LINE 0, "test.asm" )
/tmp/tmpXXSWrL29.asm:2: error: junk at end of line: LINE 0, "test.asm"
*** 4 errors found ***
-------------------------------------

The source is:
-------------------------------------
org 0x8000

LD A, $21
LD C, 2
CALL $30
RET
-------------------------------------

The funny is that it works on my windows 10 machine with the downloaded pre-built z88dk. But not on my linux machine on which I've built z88dk from source. I have followed instructions from z88dk wiki (using nightly and installing dependencies and so on).

The build of z88dk seemed to go fine, some warnings but no errors. All binaries created.

My linux version is Ubuntu 19.04

uname -a:
Linux dragon 5.0.0-31-generic #33-Ubuntu SMP Mon Sep 30 18:51:59 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

gcc:
gcc version 8.3.0 (Ubuntu 8.3.0-6ubuntu1)

./Erik

Posted: Wed Oct 16, 2019 1:46 pm
by dom
Have you got another z80asm installed somewhere? You might need to rejig your path so that the z88dk version comes first.

Posted: Wed Oct 16, 2019 3:48 pm
by sm0rvv
dom wrote:Have you got another z80asm installed somewhere? You might need to rejig your path so that the z88dk version comes first.
Oh my God, that was embarrassing. :-)

Yes, I installed z80asm from Ubuntu's repos some time ago, and forgot about it.

Thank you
./Erik