[redland-dev] 1.0.4 can't find libpq.so.4 during make?

Dave Beckett dave at dajobe.org
Mon Jul 10 04:56:22 BST 2006


Eric Hanson wrote:
> Hi,
> 
> I'm getting a compile error, while trying to make redland 1.0.4:
> 
> gcc -DLIBRDF_INTERNAL=1 -g -O2 -DLIBRDF_INTERNAL=1 -g -O2 -o
> .libs/redland-db-upgrade db_upgrade.o  ../librdf/.libs/librdf.so
> /usr/lib/gcc-lib/i486-slackware-linux/3.3.6/../../../../i486-slackware-linux/bin/ld:
> warning: libpq.so.4, needed by ../librdf/.libs/librdf.so, not found (try
> using -rpath or -rpath-link)
> ../librdf/.libs/librdf.so: undefined reference to `PQbackendPID'
> ../librdf/.libs/librdf.so: undefined reference to `PQresultErrorMessage'
> ../librdf/.libs/librdf.so: undefined reference to `PQconnectdb'
> ../librdf/.libs/librdf.so: undefined reference to `PQexec'
> ../librdf/.libs/librdf.so: undefined reference to `PQntuples'
> ../librdf/.libs/librdf.so: undefined reference to `PQgetlength'
> ../librdf/.libs/librdf.so: undefined reference to `PQclear'
> ../librdf/.libs/librdf.so: undefined reference to `PQresultStatus'
> ../librdf/.libs/librdf.so: undefined reference to `PQgetvalue'
> ../librdf/.libs/librdf.so: undefined reference to `PQstatus'
> ../librdf/.libs/librdf.so: undefined reference to `PQnfields'
> ../librdf/.libs/librdf.so: undefined reference to `PQescapeString'
> ../librdf/.libs/librdf.so: undefined reference to `PQfinish'
> ../librdf/.libs/librdf.so: undefined reference to `PQerrorMessage'
> collect2: ld returned 1 exit status
> make[1]: *** [redland-db-upgrade] Error 1
> make[1]: Leaving directory `/root/src/redland-1.0.4/utils'
> make: *** [all-recursive] Error 1
> root at vector:~/src/redland-1.0.4#

It looks like the output from libtool trying to build redland-db-upgrade
but seems to have lost all link arguments.    Can you include a full
configure run + at least the last 10 lines of the make that fails?

I'm not familiar with slackware linux but since libpq.so.4 is not
installed in the library search path (i.e. is not in /etc/ld.so.conf) it
thus needs the extra runtime link args that you quoted from the pg_config:

LDFLAGS = -Wl,-rpath,/usr/local/pgsql/lib

However I redland's configure does not use those LDFLAGS, aka
pg_config --ldflags, it just invokes pg_config like this:

  LIBS="$LIBRDF_LIBS -L`$PG_CONFIG --libdir` -lpq"
(and later)
  LIBRDF_LIBS="$LIBRDF_LIBS -L`$PG_CONFIG --libdir` -lpq"

maybe those lines should be something else?

Dave


More information about the redland-dev mailing list