Can't open config file

Installing on windows
Post Reply
jacotton
Member
Posts: 44
Joined: Fri Nov 24, 2017 1:35 am

Can't open config file

Post 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.
User avatar
dom
Well known member
Posts: 1413
Joined: Sun Jul 15, 2007 10:01 pm

Re: Can't open config file

Post 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.
jacotton
Member
Posts: 44
Joined: Fri Nov 24, 2017 1:35 am

Re: Can't open config file

Post by jacotton »

The configuration is:
windows 10 with cygwin.
User avatar
dom
Well known member
Posts: 1413
Joined: Sun Jul 15, 2007 10:01 pm

Re: Can't open config file

Post 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
jacotton
Member
Posts: 44
Joined: Fri Nov 24, 2017 1:35 am

Re: Can't open config file

Post 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
User avatar
dom
Well known member
Posts: 1413
Joined: Sun Jul 15, 2007 10:01 pm

Re: Can't open config file

Post 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!
jacotton
Member
Posts: 44
Joined: Fri Nov 24, 2017 1:35 am

Re: Can't open config file

Post by jacotton »

Yes the file is libFram.c and .o

I have many files in this directory with mixed case file names.
User avatar
dom
Well known member
Posts: 1413
Joined: Sun Jul 15, 2007 10:01 pm

Re: Can't open config file

Post 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...
jacotton
Member
Posts: 44
Joined: Fri Nov 24, 2017 1:35 am

Re: Can't open config file

Post 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
jacotton
Member
Posts: 44
Joined: Fri Nov 24, 2017 1:35 am

Re: Can't open config file

Post 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....
jacotton
Member
Posts: 44
Joined: Fri Nov 24, 2017 1:35 am

Re: Can't open config file

Post 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
jacotton
Member
Posts: 44
Joined: Fri Nov 24, 2017 1:35 am

Re: Can't open config file

Post by jacotton »

Should I open a new thread for the next bug ?
$ zcc +test -c w5500.c
Optimiser error, cannot parse variable: a
User avatar
dom
Well known member
Posts: 1413
Joined: Sun Jul 15, 2007 10:01 pm

Re: Can't open config file

Post 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?
jacotton
Member
Posts: 44
Joined: Fri Nov 24, 2017 1:35 am

Re: Can't open config file

Post 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
User avatar
dom
Well known member
Posts: 1413
Joined: Sun Jul 15, 2007 10:01 pm

Re: Can't open config file

Post 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
Post Reply