Whenever I try to compile something (even just an empty file) for z80 or gbz80 I get a
Warning: Couldn't find
message. It does not say what it is that could not be found. If I remember correctly the message appeared with the recent linker/assembler updates.
Philipp
I think I already fixed this one:
2010-02-18 Borut Razem <borut.razem AT siol.net>
* src/SDCCmain.c: search C runtime initialization object files
crt0.rel in system library directories, then in user defined
library directories
"Couldn't find" meant that sdcc couldn't find the crt0.rel file, but the file name was not written by mistake.
Philipp, can you please verify if you are using the latest svn snapshot?
Borut
It wasn't the latest snapshot. Now I get a much nicer
Warning: couldn't find crt0.rel
I still don't know why I get this warning at all though:
> ls /usr/local/share/sdcc/lib/z80/
crt0.rel z80.lib
Philipp
Hmmm...
What does "sdcc --print-search-dirs" say?
Borut
> sdcc -mz80 --print-search-dirs
programs:
/usr/local/bin
datadir:
/usr/local/bin/../share
/usr/local/share
includedir:
/usr/local/bin/../share/sdcc/include/z80
/usr/local/share/sdcc/include/z80
/usr/local/bin/../share/sdcc/include
/usr/local/share/sdcc/include
libdir:
/usr/local/bin/../share/sdcc/lib
/usr/local/share/sdcc/lib
Philipp, can you help me to find out what is going wrong?
Add the line in SDCCmain.c:
printf("%s\n", dbuf_c_str (&crtpath));
at lines 1812 and 1840, immediately after lines:
dbuf_printf (&crtpath, "%s%s%s", s, DIR_SEPARATOR_STRING, *p);
This will print all paths where cdr0.rel is searched.
Borut
and go step by step
With the two lines added:
> sdcc -mz80 test.c
test.c:1: warning 190: ISO C forbids an empty source file
/usr/local/bin/../share/sdcc/lib/crt0.rel
/usr/local/share/sdcc/lib/crt0.rel
Warning: couldn't find crt0.rel
Fixed in svn revision #5703.
Philipp, thanks for helping me. Can you please try it?
Borut
Now I have
> sdcc -mz80 --print-search-dirs test.c
programs:
/usr/local/bin
datadir:
/usr/local/bin/../share
/usr/local/share
includedir:
/usr/local/bin/../share/sdcc/include/z80
/usr/local/share/sdcc/include/z80
/usr/local/bin/../share/sdcc/include
/usr/local/share/sdcc/include
libdir:
/usr/local/bin/../share/sdcc/lib/z80
/usr/local/share/sdcc/lib/z80
test.c:1: warning 190: ISO C forbids an empty source file
Warning: couldn't find crt0.rel
The libdir search path has changed, but I still get the warning.
I have compiled and installed from a fresh checkout of #5703.
Philipp
Philipp,
the library search pathe now seems OK.
Can you please retry it with added lines:
dbuf_printf (&crtpath, "%s%s%s", s, DIR_SEPARATOR_STRING, *p);
as before?
Borut
> sdcc -mz80 test.c
test.c:1: warning 190: ISO C forbids an empty source file
/usr/local/bin/../share/sdcc/lib/crt0.rel/z80
/usr/local/share/sdcc/lib/crt0.rel/z80
Warning: couldn't find crt0.rel
... you are right, I'm an idiot!
Philipp, if you still have nerves, you can try it once more.
Thanks for your patience,
Borut
Thanks, It does find crt0.rel now.
Philipp