Re: configure doesn't detect SSL support in libpq

From: Guillaume Lelarge <guillaume(at)lelarge(dot)info>
To: Dave Page <dpage(at)pgadmin(dot)org>
Cc: pgadmin-hackers <pgadmin-hackers(at)postgresql(dot)org>
Subject: Re: configure doesn't detect SSL support in libpq
Date: 2011-12-13 13:09:44
Message-ID: 1323781784.4359.65.camel@localhost.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-hackers

On Tue, 2011-12-13 at 16:53 +0530, Dave Page wrote:
> On Tue, Dec 13, 2011 at 12:54 PM, Guillaume Lelarge
> <guillaume(at)lelarge(dot)info> wrote:
> > On Tue, 2011-12-13 at 00:03 +0100, Guillaume Lelarge wrote:
> >> On Tue, 2011-12-13 at 04:20 +0530, Dave Page wrote:
> >> > On Tue, Dec 13, 2011 at 2:48 AM, Guillaume Lelarge
> >> > <guillaume(at)lelarge(dot)info> wrote:
> >> > > Hi,
> >> > >
> >> > > It seems our configure script doesn't detect SSL support in libpq. It
> >> > > detects the SSL library though.
> >> > >
> >> > > The following patch fixes it, but I'm not sure of it as I'm in no way an
> >> > > expert in those things;
> >> > >
> >> > > diff --git a/acinclude.m4 b/acinclude.m4
> >> > > index 4030966..0640a68 100644
> >> > > --- a/acinclude.m4
> >> > > +++ b/acinclude.m4
> >> > > @@ -538,7 +538,7 @@ AC_DEFUN([SETUP_POSTGRESQL],
> >> > > PG_SSL="no"
> >> > > fi
> >> > > else
> >> > > - AC_CHECK_LIB(pq, SSL_connect,
> >> > > [PG_SSL=yes], [PG_SSL=no])
> >> > > + AC_CHECK_LIB(pq, SSL_connect,
> >> > > [PG_SSL=yes], [PG_SSL=no], "-lssl")
> >> > > fi
> >> > > fi
> >> > > else
> >> > >
> >> > > Any comments would be appreciated :)
> >> >
> >> > What exactly are you trying to fix? I spent quite a while on this last
> >> > cycle and though I'd ironed out all the wrinkles. Note that -lssl
> >> > isn't always enough - on some platforms you'll also need -lcrypt (or
> >> > -lcrypto, I forget which).
> >> >
> >>
> >> Well, without this patch, I always get a "PostgreSQL SSL support:
> >> Missing" message after configure. config.log shows this:
> >>
> >> configure:5737: gcc -o conftest -g -O2 -L/opt/postgresql-head/lib
> >> conftest.c -lpq >&5
> >> /usr/bin/ld: /tmp/ccAr1HM4.o: undefined reference to symbol
> >> 'SSL_connect'
> >> /usr/bin/ld: note: 'SSL_connect' is defined in
> >> DSO /usr/lib64/libssl.so.10 so try adding it to the linker command line
> >> /usr/lib64/libssl.so.10: could not read symbols: Invalid operation
> >> collect2: ld returned 1 exit status
> >>
> >> My full config.log is attached.
> >>
> >> And actually, I'm not alone having issues with SSL. See
> >> https://bugs.launchpad.net/ubuntu/+source/pgadmin3/+bug/780565.
> >>
> >
> > BTW, Fedora users also have this issue. I cannot say it's exactly the
> > same issue, but, on Fedora 16, I can't use the SSL combobox on the
> > server dialog.
>
> OK, well I don't think it'll break Linux, and the Mac uses a different
> code path anyway. My main concern is with Solaris, but that port seems
> to need some attention at the moment anyway, as it's trying to use GCC
> flags that don't work on S10/Sparc, and SunStudio is linking png2c
> with libpq.
>
> Please commit, and I'll look at the solaris issues.
>

Done. Thanks.

--
Guillaume
http://blog.guillaume.lelarge.info
http://www.dalibo.com

In response to

Browse pgadmin-hackers by date

  From Date Subject
Next Message Dave Page 2011-12-13 14:06:21 pgAdmin III commit: Fix the "no rows" messages shown in the Dependencie
Previous Message Guillaume Lelarge 2011-12-13 13:09:24 pgAdmin III commit: Allow SSL use