[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [msmtp-users] Build problem on Solaris



On Sat, Feb 17, 2007 at 05:57:32PM +0000, Eur Ing Chris Green wrote:
> On Sat, Feb 17, 2007 at 12:18:26PM +0100, Martin Lambers wrote:
> > On Fri, 16. Feb 2007, 16:02:07 +0000, Eur Ing Chris Green wrote:
> > > I'm trying to build msmtp on a Solaris 2.6 system, but I'm getting the
> > > following compile error:-
> > > 
> > >     gcc  -g -O2   -o msmtp conf.o list.o msmtp.o  net.o netrc.o smtp.o stream.o  tools.o ../gnulib/libgnu.a -lposix4  -lsocket -lnsl
> > >     Undefined                       first referenced
> > >      symbol                             in file
> > >      hstrerror                           net.o
> > >     ld: fatal: Symbol referencing errors. No output written to msmtp
> > >     collect2: ld returned 1 exit status
> > >     *** Error code 1
> > >     make: Fatal error: Command failed for target `msmtp'
> > >     Current working directory /proj/chris/msmtp-1.4.10/src
> > > 
> > > Does anyone have any idea how to work around this?
> > 
> > Try 
> > $ ./configure LIBS="-lresolv" 
> > to force linking against libresolv.
> > 
> > Could you send me your config.log? Configure should have added -lresolv
> > automatically...
> > 
> That isn't the problem, while running ./configure I see:-
> 
>     checking for hstrerror... no
>     checking for hstrerror in -lresolv... no
> 
> There isn't a hstrerror in Solaris 2.6.  It's on our Solaris 2.8
> systems though (not sure about 2.7, we don't have any).
> 
... actually it's not as simple as that.  There is no hstrerror
*documented* in Solaris 2.6 but there is one is the libraries, maybe
it's a Sun patch has added it.

I.e.:-

     nm /usr/lib/libresolv.so | grep hstrerror
     [55]    |     11752|      84|FUNC |LOCL |0    |11     |hstrerror


However I still get the above error (both of them) when trying to build.

Extract from config.log:-

    configure:15536: gcc -o conftest -g -O2  -D_REENTRANT -I/proj/chris/include  conftest.c -lposix4 -lresolv -l>
    Undefined                       first referenced
     symbol                             in file
    hstrerror                           /var/tmp//cc5Invpd.o
    ld: fatal: Symbol referencing errors. No output written to conftest

It's almost as if it's picking up the wrong resolv library, I'll check
if there's one that might be found before the one in /usr/lib.

-- 
Chris Green