Compilation Errors in Gentoo.

I was trying to install ucspi-tcp-0.88 for my qmail on my Gentoo and got this error, anyone knows how to fix it?

mail ucspi-tcp-0.88 # make
( cat warn-auto.sh; \
echo 'main="$1"; shift'; \
echo exec "`head -1 conf-ld`" \
'-o "$main" "$main".o ${1+"$@"}' \
) > load
head: `-1' option is obsolete; use `-n 1' since this will be removed in the future
chmod 755 load
( cat warn-auto.sh; \
echo exec "`head -1 conf-cc`" '-c ${1+"$@"}' \
) > compile
head: `-1' option is obsolete; use `-n 1' since this will be removed in the future
chmod 755 compile
cat warn-auto.sh choose.sh \
| sed s}HOME}"`head -1 conf-home`"}g \
> choose
head: `-1' option is obsolete; use `-n 1' since this will be removed in the future
chmod 755 choose
./choose clr trypoll iopause.h1 iopause.h2 > iopause.h
./choose clr tryulong64 uint64.h1 uint64.h2 > uint64.h
./compile tcpserver.c
make setup check
( ( ./compile tryulong32.c && ./load tryulong32 && \
./tryulong32 ) >/dev/null 2>&1 \
&& cat uint32.h2 || cat uint32.h1 ) > uint32.h
rm -f tryulong32.o tryulong32
./compile rules.c
./compile remoteinfo.c
./compile timeoutconn.c
( cat warn-auto.sh; \
echo CC=\'`head -1 conf-cc`\'; \
echo LD=\'`head -1 conf-ld`\'; \
cat find-systype.sh; \
) | sh > systype
head: `-1' option is obsolete; use `-n 1' since this will be removed in the future
head: `-1' option is obsolete; use `-n 1' since this will be removed in the future
( cat warn-auto.sh; \
echo 'main="$1"; shift'; \
echo 'rm -f "$main"'; \
echo 'ar cr "$main" ${1+"$@"}'; \
case "`cat systype`" in \
sunos-5.*) ;; \
unix_sv*) ;; \
irix64-*) ;; \
irix-*) ;; \
dgux-*) ;; \
hp-ux-*) ;; \
sco*) ;; \
*) echo 'ranlib "$main"' ;; \
esac \
) > makelib
chmod 755 makelib
./compile cdb.c
./compile cdb_hash.c
./compile cdb_make.c
./makelib cdb.a cdb.o cdb_hash.o cdb_make.o
./compile dns_dfd.c
./compile dns_domain.c
./compile dns_dtda.c
./compile dns_ip.c
./compile dns_ipq.c
./compile dns_name.c
./compile dns_nd.c
./compile dns_packet.c
./compile dns_random.c
./compile dns_rcip.c
./compile dns_rcrw.c
./compile dns_resolve.c
./compile dns_sortip.c
./compile dns_transmit.c
./compile dns_txt.c
./makelib dns.a dns_dfd.o dns_domain.o dns_dtda.o dns_ip.o \
dns_ipq.o dns_name.o dns_nd.o dns_packet.o dns_random.o \
dns_rcip.o dns_rcrw.o dns_resolve.o dns_sortip.o \
dns_transmit.o dns_txt.o
./choose c trysysel select.h1 select.h2 > select.h
./compile iopause.c
./compile tai_pack.c
./compile taia_add.c
./compile taia_approx.c
./compile taia_frac.c
./compile taia_less.c
./compile taia_now.c
./compile taia_pack.c
./compile taia_sub.c
./compile taia_uint.c
./makelib time.a iopause.o tai_pack.o taia_add.o \
taia_approx.o taia_frac.o taia_less.o taia_now.o \
taia_pack.o taia_sub.o taia_uint.o
./compile alloc.c
./compile alloc_re.c
./compile buffer.c
./compile buffer_0.c
./compile buffer_1.c
./compile buffer_2.c
./compile buffer_copy.c
./compile buffer_get.c
./compile buffer_put.c
./compile env.c
./compile error.c
./compile error_str.c
./compile fd_copy.c
./compile fd_move.c
./compile getln.c
./compile getln2.c
./compile ndelay_off.c
./compile ndelay_on.c
./compile open_read.c
./compile open_trunc.c
./compile open_write.c
./compile openreadclose.c
./compile pathexec_env.c
./compile pathexec_run.c
./compile chkshsgr.c
./load chkshsgr
./chkshsgr || ( cat warn-shsgr; exit 1 )
./choose clr tryshsgr hasshsgr.h1 hasshsgr.h2 > hasshsgr.h
./compile prot.c
./compile readclose.c
./compile seek_set.c
./compile sgetopt.c
./compile sig.c
./choose cl trysgprm hassgprm.h1 hassgprm.h2 > hassgprm.h
./compile sig_block.c
./choose cl trysgact hassgact.h1 hassgact.h2 > hassgact.h
./compile sig_catch.c
./compile sig_pause.c
./compile socket_accept.c
./compile socket_bind.c
./compile socket_conn.c
./compile socket_delay.c
./compile socket_listen.c
./compile socket_local.c
./compile socket_opts.c
./compile socket_remote.c
./compile socket_tcp.c
./compile socket_udp.c
./compile stralloc_cat.c
./compile stralloc_catb.c
./compile stralloc_cats.c
./compile stralloc_copy.c
./compile stralloc_eady.c
./compile stralloc_opyb.c
./compile stralloc_opys.c
./compile stralloc_pend.c
./compile strerr_die.c
./compile strerr_sys.c
./compile subgetopt.c
./choose cl trywaitp haswaitp.h1 haswaitp.h2 > haswaitp.h
./compile wait_nohang.c
./compile wait_pid.c
./makelib unix.a alloc.o alloc_re.o buffer.o buffer_0.o \
buffer_1.o buffer_2.o buffer_copy.o buffer_get.o \
buffer_put.o env.o error.o error_str.o fd_copy.o fd_move.o \
getln.o getln2.o ndelay_off.o ndelay_on.o open_read.o \
open_trunc.o open_write.o openreadclose.o pathexec_env.o \
pathexec_run.o prot.o readclose.o seek_set.o sgetopt.o \
sig.o sig_block.o sig_catch.o sig_pause.o socket_accept.o \
socket_bind.o socket_conn.o socket_delay.o socket_listen.o \
socket_local.o socket_opts.o socket_remote.o socket_tcp.o \
socket_udp.o stralloc_cat.o stralloc_catb.o stralloc_cats.o \
stralloc_copy.o stralloc_eady.o stralloc_opyb.o \
stralloc_opys.o stralloc_pend.o strerr_die.o strerr_sys.o \
subgetopt.o wait_nohang.o wait_pid.o
./compile byte_chr.c
./compile byte_copy.c
./compile byte_cr.c
./compile byte_diff.c
./compile byte_rchr.c
./compile byte_zero.c
./compile case_diffb.c
./compile case_diffs.c
./compile fmt_ulong.c
./compile ip4_fmt.c
./compile ip4_scan.c
./compile scan_ulong.c
./compile str_chr.c
./compile str_diff.c
./compile str_len.c
./compile str_start.c
./compile uint16_pack.c
./compile uint16_unpack.c
./compile uint32_pack.c
./compile uint32_unpack.c
./makelib byte.a byte_chr.o byte_copy.o byte_cr.o \
byte_diff.o byte_rchr.o byte_zero.o case_diffb.o \
case_diffs.o fmt_ulong.o ip4_fmt.o ip4_scan.o scan_ulong.o \
str_chr.o str_diff.o str_len.o str_start.o uint16_pack.o \
uint16_unpack.o uint32_pack.o uint32_unpack.o
( ( ./compile trylsock.c && \
./load trylsock -lsocket -lnsl ) >/dev/null 2>&1 \
&& echo -lsocket -lnsl || exit 0 ) > socket.lib
rm -f trylsock.o trylsock
./load tcpserver rules.o remoteinfo.o timeoutconn.o cdb.a \
dns.a time.a unix.a byte.a  `cat socket.lib`
tcpserver.o(.text+0x54d): In function `doit':
: undefined reference to `errno'
remoteinfo.o(.text+0x63): In function `mywrite':
: undefined reference to `errno'
remoteinfo.o(.text+0xe7): In function `myread':
: undefined reference to `errno'
timeoutconn.o(.text+0x41): In function `timeoutconn':
: undefined reference to `errno'
timeoutconn.o(.text+0xbf): In function `timeoutconn':
: undefined reference to `errno'
cdb.a(cdb.o)(.text+0xce): more undefined references to `errno' follow
collect2: ld returned 1 exit status
make: *** [tcpserver] Error 1
mail ucspi-tcp-0.88 # make setup check
./load tcpserver rules.o remoteinfo.o timeoutconn.o cdb.a \
dns.a time.a unix.a byte.a  `cat socket.lib`
tcpserver.o(.text+0x54d): In function `doit':
: undefined reference to `errno'
remoteinfo.o(.text+0x63): In function `mywrite':
: undefined reference to `errno'
remoteinfo.o(.text+0xe7): In function `myread':
: undefined reference to `errno'
timeoutconn.o(.text+0x41): In function `timeoutconn':
: undefined reference to `errno'
timeoutconn.o(.text+0xbf): In function `timeoutconn':
: undefined reference to `errno'
cdb.a(cdb.o)(.text+0xce): more undefined references to `errno' follow
collect2: ld returned 1 exit status
make: *** [tcpserver] Error 1
mail ucspi-tcp-0.88 #
jedistarAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

jedistarAuthor Commented:
anyone? alot of programs are having this problem
i.e daemontools, qmail conf etc.
0
ravenplCommented:
You need to path the ucspi-tcp with errno patch
http://www.qmail.org/moni.csi.hu/pub/glibc-2.3.1/ucspi-tcp-0.88.errno.patch
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
jedistarAuthor Commented:
mail qmail-conf-0.60 # make
./load auto-str djb.a
djb.a(buffer_put.o)(.text+0x43): In function `allwrite':
: undefined reference to `errno'
collect2: ld returned 1 exit status
make: *** [auto-str] Error 1
mail qmail-conf-0.60 #

ucs is ok, but qmail-conf is still having probs
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

ravenplCommented:
0
jedistarAuthor Commented:
didnt work.

mail qmail-conf-0.60 # patch -p1 < qmail-1.03.errno.patch
can't find file to patch at input line 4
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff -u qmail-1.03.old/cdb_seek.c qmail-1.03/cdb_seek.c
|--- qmail-1.03.old/cdb_seek.c  1998-06-15 05:52:55.000000000 -0500
|+++ qmail-1.03/cdb_seek.c      2003-01-08 15:55:53.000000000 -0600
--------------------------
File to patch:



mail qmail-conf-0.60 # ls
CHANGES           buffer_2.c      conf-cc          generic-conf.h        openreadclose.c         stralloc_eady.o
FILES             buffer_2.o      conf-ld          generic-conf.o        openreadclose.h         stralloc_opyb.c
Makefile          buffer_copy.c   conf-qmail       hier.c                openreadclose.o         stralloc_opyb.o
Makefile.ini      buffer_copy.o   conf-ucspi-tcp   load                  qmail-1.03.errno.patch  stralloc_opys.c
README            buffer_get.c    djb.a            makeaddclient.c       qmail-delivery-conf.c   stralloc_opys.o
SYSDEPS           buffer_get.o    djbdns-1.05      makeaddclient.h       qmail-delivery-conf.o   stralloc_pend.c
TARGETS           buffer_put.c    djbdns.files     makeaddrelayclient.c  qmail-pop3d-conf.c      stralloc_pend.o
VERSION           buffer_put.o    djbdns.mkinc     makeaddrelayclient.h  qmail-qmqpd-conf.c      strerr.h
alloc.c           buffer_read.c   djbdns.targets   makelib               qmail-qmtpd-conf.c      strerr_die.c
alloc.h           buffer_read.o   djbdns.version   makelogdir.c          qmail-smtpd-conf.c      strerr_die.o
alloc.o           buffer_write.c  error.c          makelogdir.h          readclose.c             strerr_sys.c
alloc_re.c        buffer_write.o  error.h          makemakefile.c        readclose.h             strerr_sys.o
alloc_re.o        byte.h          error.o          makemakefile.h        readclose.o             systype
auto-str.c        byte_chr.c      error_str.c      maketcp.c             readme.c                tcpserver.h
auto-str.o        byte_chr.o      error_str.o      maketcp.h             readme.h                tcpserver_env.c
auto_qmail.h      byte_copy.c     exit.h           open.h                str.h                   tcpserver_run.c
auto_ucspi_tcp.h  byte_copy.o     find-systype.sh  open_read.c           str_len.c               trycpp.c
buffer.c          byte_cr.c       gen_alloc.h      open_read.o           str_len.o               warn-auto.sh
buffer.h          byte_cr.o       gen_allocdefs.h  open_trunc.c          stralloc.h              x86cpuid.c
buffer.o          compile         generic-conf.c   open_trunc.o          stralloc_eady.c
0
ravenplCommented:
I'm sorry, the patch is for qmail itself
Unfortunatelly I can;t find patch for qmail-conf, but basicly You have to search in all files for line
extern int errno;
and change it to
 #include <errno.h>

Would You?
0
jedistarAuthor Commented:
is there any command to do that?
0
ravenplCommented:
> is there any command to do that?
no, but to find all occurances: grep -r "extern int errno;" .
then edit and change those lines.
Or tell me from where You have downloaded the qmail-conf package, I'll drop You a patch.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Linux

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.