Error: undefined reference to ‘errno’
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
stralloc.a alloc.a error.a env.a str.a case.a fs.a open.a
strerr.a(strerr_sys.o)(.text+0×8): In function `strerr_sysinit’:
: undefined reference to `errno’
substdio.a(substdi.o)(.text+0×2c): In function `oneread’:
: undefined reference to `errno’
substdio.a(substdo.o)(.text+0×43): In function `allwrite’:
: undefined reference to `errno’
alloc.a(alloc.o)(.text+0×48): In function `alloc’:
: undefined reference to `errno’
collect2: ld returned 1 exit status
make: *** [iftocc] Error 1
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This is the most often reported installation error. This is caused because the program does not contain the errno.h file.
I got the above errors while installing mess822 package (I was trying to integrate spamassassin with qmail).
You can fix this problem by modifying two configurations files. (Changes to any one of the conf file may work, but sometimes you may have to edit both confs).
Move present conf-cc to conf-cc.back and create a new conf-cc to read:
gcc -O2 -include /usr/include/errno.h
Do the following modifications In the error.h file.
remove the line:
extern int errno;
add the line:
#include <errno.h>
Now, the compilation should work fine.










thats for sure, dude
Thank you, it works!