Re: solaris libpq threaded build fails

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Andrew Chernow <ac(at)esilo(dot)com>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: solaris libpq threaded build fails
Date: 2009-01-14 03:39:19
Message-ID: 200901140339.n0E3dJD21843@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Andrew Chernow wrote:
> Bruce Momjian wrote:
> > I supposed Solaris 2.5.1 (release 1996) is just too old to add
> > threading, and this code has been unchanged for years.
> >
>
> Yeah, its old. Unfortunately for us, we still have to support it.
>
> To set the record straight, the issue is not threads. Threads work fine
> on 2.5.1. This is a configure system linking issue, "gethostbyname"
> requires linking with libnsl.so. So, thread_test.c must link with -lnsl.
>
> The bigger issue is that the configure script needs to include -lnsl for
> older solaris platforms. Solaris 2.5.1 has "gethostbyname_r" but the
> configure check fails for the same reason.
>
> configure:19821: checking for gethostbyname_r
> configure:19877: gcc -o conftest -O2 -Wall [...snip...]
> Undefined first referenced
> symbol in file
> gethostbyname_r /var/tmp//ccSuGLEn.o (symbol
> belongs to implicit dependency /usr/lib/libnsl.so.1)
> ld: fatal: Symbol referencing errors. No output written to conftest
> collect2: ld returned 1 exit status
>
> This is why thread_test.c thought it had to fall back on gethostbyname
> in the first place.

Well, part of the problem is we are running the thread test program from
_within_ configure so we don't have everything set up yet to work around
this problem, and with an OS that old, is it worth trying?

If you give me something that will uniquely indentify this
platform/version in configure and in C, I might be able to send you a
test patch to try, and if it works, I can apply it for 8.4.

--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com

+ If your life is a hard drive, Christ can be your backup. +

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2009-01-14 03:41:56 Re: solaris libpq threaded build fails
Previous Message Bruce Momjian 2009-01-14 03:32:06 Re: Proposal: new border setting in psql