Re: compilation problem with dnsserver.c

From: Duane Wessels <[email protected]>
Date: Wed, 10 Feb 1999 16:46:22 -0700

Jon Bernard writes:

>On a SunOS 4.1.3 machine, with egcs-2.91.57, I get the following error
>when compiling:
>
>gcc -o dnsserver -g dnsserver.o -L../lib -lmiscutil -lm -lresolv -lnsl
>/lib/libresolv.a(res_send.o)(.text+0x80): undefined reference to
>`strerror'
>/lib/libresolv.a(res_send.o)(.text+0x10c): undefined reference to
>`strerror'
>collect2: ld returned 1 exit status
>make[1]: *** [dnsserver] Error 1
>make[1]: Leaving directory `/nfs/nerdy/u14/src/squid-2.0.RELEASE/src'
>make: *** [all] Error 1

I think SunOS ld has a bug (?) such that the order of the libraries
is important. If you manually edit the Makefile, and add -lmiscutil at
the end so it reads:

    ... -L../lib -lmiscutil -lm -lresolv -lnsl -lmiscutil

I'll bet it works.

Duane W.
Received on Wed Feb 10 1999 - 16:28:20 MST

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:44:30 MST