slony1-bugs at lists.slony.info slony1-bugs at lists.slony.info
Wed Dec 5 19:00:52 PST 2007
http://www.slony.info/bugzilla/show_bug.cgi?id=25

           Summary: configure fails on Fedora 7
           Product: Slony-I
           Version: 1.2
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: major
          Priority: medium
         Component: other scripts
        AssignedTo: slony1-bugs at lists.slony.info
        ReportedBy: chad at DCFinc.com
                CC: slony1-bugs at lists.slony.info
   Estimated Hours: 0.0


Building Slony-I 1.2.12 on Fedora 7 against PostgreSQL 8.2.5 as shipped.

Build log entries:
Wed Dec  5 18:09:30 MST 2007
Configure of slony fails,
 configure: error: Your version of libpq doesn't have PQunescapeBytea
 this means that your version of PostgreSQL is lower than 7.3
 and thus not supported by Slony-I.

I believe this is because configure thinks it found libpq in
/usr/lib, but since the PostgreSQL we're running is the x86_64
version it should be looking in /usr/lib64.  Let's see if we can
force that.

Should be able to use
  --with-pglibdir=/usr/lib64
with configure, but doesn't seem to work.  We know the symbol is in
there:
  cd /usr/lib64
  nm -D libpq.so.5 | grep PQunescapeBytea
    00000033d680af00 T PQunescapeBytea

Wed Dec  5 19:38:31 MST 2007
Ok, here's the deal.  configure is looking for that symbol by
compiling a little program that calls for it, and checking if the 
compile succeeds.  On the gcc command line it uses -lpq to search
for the library.  On our Fedora 7, the default behavior is to build
x86_64 (64-bit) programs, which means the configuration test program
should be linked against the libraries in /usr/lib64 instead of
/usr/lib.  The linker tries to do that, looking for
"/usr/lib64/libpq.so", but that doesn't exist.  There is a
libpq.so.5 and a libpq.so.5.0.  I believe the Fedora
postgresql-libs.x86_64 package is missing a symlink
/usr/lib64/libpq.so -> libpq.so.5.0

We prove it by extracting the conftest.c program configure generated
from the config.log, compiling it (gcc -c conftest.c) and then
linking it using the path to the library rather than -lpq (gcc -o
conftest conftest.o /usr/lib64/libpq.so.5.0).  That works.  So the
error message is misleading.  The compile of the test program failed
because the linker couldn't find the right library, not because the
library didn't contain the needed routine.

Adding the symlink, running configure again.

Success.  Slony developers should know (add to FAQ?) and whomever builds the
postgresql-libs.x86_64 yum package should add the creation of the symlink.


-- 
Configure bugmail: http://www.slony.info/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
You are the assignee for the bug.


More information about the Slony1-bugs mailing list