Page 1 of 1

Can't open config file

Posted: Sat Mar 20, 2021 6:19 am
by jacotton
This bug seems to be afflicting only me. I have it on 2 machines. I did a fresh install from
z88dk-win32-2.1.zip and used the set_environment.sh

$ make
zcc +cpm -list --c-code-in-asm -Wall -pragma-include:zpragma.inc -c w5500.c
Can't open config file /home/lbmgm/projects/z88dk/lib/config/cpm.cfg
make: *** [Makefile:21: w5500.o] Error 1

I think this used to work (last year for certain).

I did scan and try a few of the fixes listed in the forum, no joy.

Re: Can't open config file

Posted: Sat Mar 20, 2021 9:58 am
by dom
What environment are you using it under? That looks like a unix path but you downloaded the windows binaries?

On windows I’d expect the path to end up as /cygdrive/c... or /c/... so I’m a little confused.

Re: Can't open config file

Posted: Sat Mar 20, 2021 4:19 pm
by jacotton
The configuration is:
windows 10 with cygwin.

Re: Can't open config file

Posted: Sat Mar 20, 2021 5:52 pm
by dom
Ah, right. I've not got an environment to test this out on at the moment.

But...the kit you downloaded is Windows application and as such expects to get Windows paths. However, that shell script sets up the paths using unix format.

So, I suspect you need to set the ZCCCFG variable with the cygpath equivalent of /home/lbmgm/projects/z88dk/lib/config

I think the following will work:

Code: Select all

#!/bin/sh

export PATH=`pwd`/bin:$PATH

CFG=`pwd`/lib/config/
case "`uname -s`" in
    CYGWIN*)    export ZCCCFG=`cygpath -m $CFG`;;
    *)          export ZCCCFG=$CFG ;;
esac

Re: Can't open config file

Posted: Sat Mar 20, 2021 6:20 pm
by jacotton
created a new 'set_env' script with your code and

$ make mac
zcc +cpm -list --c-code-in-asm -Wall -pragma-include:zpragma.inc -c mac.c
zcc +cpm -create-app -omac mac.o libFram.o
Error at file 'C:/cygwin64/tmp/zcc000027F43B856.lst' line 3: cannot read file 'l
ibFram.o'
make: *** [Makefile:90: mac] Error 1

It's not hitting the wall with the config directory.

Looks like that file is not in the tmp direcoctory
$ ls ../../../../tmp/zcc000027F43B856.lst
ls: cannot access '../../../../tmp/zcc000027F43B856.lst': No such file or directory

Re: Can't open config file

Posted: Sat Mar 20, 2021 6:29 pm
by dom
I'll setup a windows machine with cygwin and see what's going on - I wonder if it's now tripping over case insensitivity? Is the file actually called libFram.o on disc? Actually, where's the compilation line for that file?

I don't expect tmp files to remain after the run so that's reassuring in a way!

Re: Can't open config file

Posted: Sat Mar 20, 2021 7:03 pm
by jacotton
Yes the file is libFram.c and .o

I have many files in this directory with mixed case file names.

Re: Can't open config file

Posted: Sat Mar 20, 2021 7:19 pm
by dom
I've set up a tiny, noddy project:

Code: Select all

test: main.o libFram.o
        zcc +test -o $@ $^

%.o: %.c
        zcc +test -c $^ -o $@

clean:
        $(RM) *.o test

Code: Select all

//main.c
int main() {

}

Code: Select all

// libfram.c
int func() {
}
And:

1. Filename case doesn't matter
2. The only way I get that error is if an object file doesn't exist on disc

I must be missing something, but what...

Re: Can't open config file

Posted: Sat Mar 20, 2021 7:32 pm
by jacotton
That seems to work. So are we looking for a COPT flag ?

$ make -f Makenew
zcc +test -c main.c -o main.o
zcc +test -c libFram.c -o libFram.o
zcc +test -o test main.o libFram.o

Re: Can't open config file

Posted: Sat Mar 20, 2021 7:34 pm
by jacotton
uh, I built the libfram.o file first then did a build and it works.

Must be a bug in my make file....

Re: Can't open config file

Posted: Sat Mar 20, 2021 7:37 pm
by jacotton
$ make mac
zcc +cpm -list --c-code-in-asm -Wall -pragma-include:zpragma.inc -c mac.c
zcc +cpm -list --c-code-in-asm -Wall -pragma-include:zpragma.inc -c libfram.c
zcc +cpm -create-app -omac mac.o libfram.o
cp MAC.COM ~/HostFileBdos/c/mac.com

Just a tiny omission.....
mac: mac.o libfram.o
.................^^^^^^^^^^^^ forgot that clause .... must be getting old
zcc +cpm -create-app -omac mac.o libfram.o
$(CP) MAC.COM $(DESTDIR)mac.com

Re: Can't open config file

Posted: Sat Mar 20, 2021 7:42 pm
by jacotton
Should I open a new thread for the next bug ?
$ zcc +test -c w5500.c
Optimiser error, cannot parse variable: a

Re: Can't open config file

Posted: Sat Mar 20, 2021 7:44 pm
by dom
I've added in the rest of the options I can see you using and it's still working for me.

What compile line is being used for libFram.o?

Is it possible to share your project with me?

Re: Can't open config file

Posted: Sat Mar 20, 2021 7:57 pm
by jacotton
O.k. I did fix the libFram problem, It was an omission in the Makefile.

This new one is a bit more interesting .
To get the project git https://github.com/jayacotton/inettools-z80

Re: Can't open config file

Posted: Sat Mar 20, 2021 7:57 pm
by dom
Re the optimiser error, I've found your project and reproduced it and pushed this fix: https://github.com/z88dk/z88dk/commit/5 ... c0f2dee8cd

Just download and replace lib/z80rules.1