From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Andrew Zabolotny" To: "Dave Love" Cc: "egcs@cygnus.com" Subject: Re: __eprintf problem in f77 Date: Thu, 11 Dec 1997 05:11:00 -0000 Message-id: <199712111310.QAA08024@freya> X-SW-Source: 1997-12/msg00646.html On 10 Dec 1997 20:21:51 +0000, Dave Love wrote: > Andrew> "undefined symbol __eprintf in fini.o" > Andrew> cause: > Andrew> gcc/assert.h defines assert() to call __eprintf when assertion fails. > Andrew> fini.c includes some .h file which in turn includes assert.h. > Andrew> __eprintf is not present in default libraries when using cc >I'm not sure what exactly this comes from. Do you mean you're >building f771 not with gcc? Of course not. I'm building f771 in the whole egcs context. Let me describe the problem more detailed: When I run make in egcs/gcc subdirectory it compiles almost everything with egcs/gcc being the current directory. Since one of GCC options is -I. it will catch "assert.h" from current directory, which will define assert() to call __eprintf on failure. The system header file assert.h defines assert in a different way, and the system libraries doesn't contain __eprintf (although __eprintf is contained in libgcc). However, egcs/gcc/f/fini.c is compiled/linked with the _system_ compiler, which doesn't know where from to take __eprintf. So fini.c compilation fails. (this is the only thing that fails diring compilation -- other programs either doesn't use __eprintf, or provide a __eprintf themself). So to resolve this problem it is needed to define __eprintf inside f/fini.c Greetings, _\ndy@teamOS/2