[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 06:19:51PM +0000, Eur Ing Chris Green wrote:
> 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
>
Silly me - it's LOCL function so not available. So hstrerror really
*isn't* available on Solaris 2.6.
I might just try copying the libresolv.so from one of our 2.8 systems
and see if I can build against that. It's odds on that it will fall
in a crumpled heap because of dependencies but it's worth a try.
--
Chris Green