...
./load envdir unix.a byte.a
envdir.o(.text+0x127): In function `main':
: undefined reference to `errno'
envdir.o(.text+0x282): In function `main':
: undefined reference to `errno'
unix.a(openreadclose.o)(.text+0x47): In function `openreadclose':
: undefined reference to `errno'
unix.a(pathexec_run.o)(.text+0x122): In function `pathexec_run':
: undefined reference to `errno'
unix.a(pathexec_run.o)(.text+0x163): In function `pathexec_run':
: undefined reference to `errno'
unix.a(readclose.o)(.text+0x67): more undefined references to `errno' follow
collect2: ld returned 1 exit status
make: *** [envdir] Error 1
I've searched the net but I don't see any solution to this. I even upgraded my gcc version to 3.3.1 but still nothing happens. I have another server running gcc 2.96 and this same code compiles without any problem on that. Does anyone know what’s happening here or what do I need to change?
Edit: BTW from what I could figure is if I add -static flag when linking the problem goes away.. but still I want to know why the above is happening with this new server? Any help will be appreciated!
[edited by - cyanide on October 16, 2003 10:49:21 PM]
ld returned 1 exit status?
I just got myself a new server (RH9 Linux - 2.4.20-20.9) and so I was trying to install qmail on it. But every time I run the 'make' command I get this error and everything aborts (it happens for all the programs):
Change all the places that have "extern int errno;" (envdir.c, openreadclose.c, pathexec_run.c and readclose.c unless they all include some common header) to have "#include <errno.h>" instead. errno is allowed to be a macro (the C standard defines it as "a modifiable lvalue that has type int" and in modern glibcs, it is in fact a #define for something like (*__errno_location()).
A ld error just means that something went wrong while trying to compile it. To find out what actually went wrong, you have to look at the lines above (i.e. undefined references to errno).
As to the solution to your problem, I have no idea, could be the AP is right.
As to the solution to your problem, I have no idea, could be the AP is right.
The change to
errno
in the latest glibc versions break qmail. There''s a patch to fix qmail; it contains the changes described by the AP.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement