[redland-dev] 1.0.4 can't find libpq.so.4 during make?
Eric Hanson
elh at cs.pdx.edu
Mon Jul 10 10:02:44 BST 2006
Eric Hanson wrote:
> Dave Beckett wrote:
>> 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?
>
> Full configure and make:
...
>> 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?
>
> Not sure what to do here. Sorry, my C knowledge is pretty limited.
Ok I did an
export LDFLAGS = -Wl,-rpath,/usr/local/pgsql/lib
before configure, and that got it done so now I'm up and running, yay!
Thanks,
Eric
More information about the redland-dev
mailing list