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 16:43:26
Message-ID: 200901141643.n0EGhQS18861@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Andrew Chernow wrote:
>
> >>>
> >> Forgot to mention, there is an easy fix:
> >>
> >> ~]# LDFLAGS="-lnsl" ./configure --enable-thread-safety
> >
> > But I assume that only works if I use gethostbyname_r(), right?
>
> No, works for gethostbyname as well. They are all in libnsl.
>
> > But we do check for that in thread_test.c.
>
> The problem with the current check is its only an AC_CHECK_FUNCS.
> We need an AC_SEARCH_LIBS first so the proper -llibrary is
> appended to LIBS, which is used by AC_CHECK_FUNCS.
>
> AC_SEARCH_LIBS(gethostbyname_r, c nsl) AC_CHECK_FUNCS([strerror_r
> getpwuid_r gethostbyname_r])
>
> (AC_CHECK_FUNCS from configure.in line 1371)

OK, patch attached and applied to CVS HEAD. The nsl (not 'nls') library
check was removed in Postgres 8.2 here:

http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/configure.in.diff?r1=1.448;r2=1.445;f=h

The new code is more specific by testing for gethostbyname_r() and only
on Solaris. I also added a comment about why it was re-added.

The next question is do we backpatch this back to 8.2?

--
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. +

Attachment Content-Type Size
/rtmp/diff text/x-diff 3.5 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Merlin Moncure 2009-01-14 16:56:32 Re: solaris libpq threaded build fails
Previous Message Joshua D. Drake 2009-01-14 16:38:54 Re: A single escape required for log_filename