Menu

#1619 Regression - Warning: Couldn't find

closed-fixed
5
2013-05-25
2010-02-20
No

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

Discussion

  • Borut Ražem

    Borut Ražem - 2010-02-20

    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

     
  • Borut Ražem

    Borut Ražem - 2010-02-20
    • milestone: --> fixed
    • assigned_to: nobody --> borutr
    • labels: --> C-Front End
    • status: open --> pending-fixed
     
  • Philipp Klaus Krause

    • status: pending-fixed --> open-fixed
     
  • Philipp Klaus Krause

    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

     
  • Borut Ražem

    Borut Ražem - 2010-02-20

    Hmmm...

    What does "sdcc --print-search-dirs" say?

    Borut

     
  • Philipp Klaus Krause

    > 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

     
  • Borut Ražem

    Borut Ražem - 2010-02-20

    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

     
  • Philipp Klaus Krause

    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

     
  • Borut Ražem

    Borut Ražem - 2010-02-20
    • status: open-fixed --> pending-fixed
     
  • Borut Ražem

    Borut Ražem - 2010-02-20

    Fixed in svn revision #5703.

    Philipp, thanks for helping me. Can you please try it?

    Borut

     
  • Philipp Klaus Krause

    • status: pending-fixed --> open-fixed
     
  • Philipp Klaus Krause

    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

     
  • Borut Ražem

    Borut Ražem - 2010-02-21

    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

     
  • Philipp Klaus Krause

    > 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

     
  • Borut Ražem

    Borut Ražem - 2010-02-21

    ... you are right, I'm an idiot!

    Philipp, if you still have nerves, you can try it once more.

    Thanks for your patience,
    Borut

     
  • Philipp Klaus Krause

    • status: open-fixed --> closed-fixed
     
  • Philipp Klaus Krause

    Thanks, It does find crt0.rel now.

    Philipp

     

Log in to post a comment.

MongoDB Logo MongoDB