apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bob Rossi <bob_ro...@cox.net>
Subject Re: dbd pgsql autotools patch
Date Fri, 16 May 2008 10:26:18 GMT
On Fri, May 16, 2008 at 01:34:29PM +1000, Bojan Smojver wrote:
> On Thu, 2008-05-15 at 23:18 -0400, Bob Rossi wrote:
> > Ubuntu 7.04, /lib/libcrypt-2.5.so
> OK.
> > OK, perhaps we should just add -lcrypt to the pg line? I could check to
> > see if this works on my system if you think this is a good idea.
> Hmm, not sure if hardcoding here is the right thing to do. I don't see
> how that got omitted from the set of libraries that are required. What
> do you get when you run apr-1-config --libs (make sure you run
> apr-1-config of the one you used to build apr-util)?

This is before my patch to the apr-util build system,
  $ ./apu-1-config --libs
   -lsqlite3 -lexpat
This is after,
  $ ./apu-1-config --libs
  -lpq -lpgport -lz -lreadline -lcrypt -ldl -lm  -lsqlite3 -lexpat

Here is the check for the link against postgresql in my config.log at
line 184.
  configure:34071: checking for PQsendQueryPrepared in -lpq
  configure:34106: gcc -o conftest -g -Wall -pthread  -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE
-Ipostgresql/postgresql-8.3.1/lib  conftest.c -lpq -lpgport -lz -lreadline -lcrypt -ldl -lm

note this is my modified version, the original version only had -lpq,
which caused the link to fail.

Here is the check for crypt in my config.log, on line 415,

  configure:40238: checking for library containing crypt
  configure:40279: gcc -o conftest -g -Wall -pthread  -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE
 conftest.c  >&5
  /tmp/ccMsXBwK.o: In function `main':
  conftest.c:35: undefined reference to `crypt'
  collect2: ld returned 1 exit status

  configure:40279: gcc -o conftest -g -Wall -pthread  -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE
 conftest.c -lcrypt   >&5
  configure:40285: $? = 0
  configure:40313: result: -lcrypt

So, a couple things to note. The apr build system knows that I need
-lcrypt in order to get a link against that symbol. It checks for
-lcrypt after -lpq. If we reversed the order, we could pass -lcrypt to
the postgresql test, if the users system needs that.

(I'm just brainstorming here)

Bob Rossi

View raw message