| Summary: | dev-perl/DBD-Pg - undefined symbol PQserverVersion | ||
|---|---|---|---|
| Product: | Gentoo Linux | Reporter: | Joseph <syscon780> |
| Component: | Current packages | Assignee: | Gentoo Perl team <perl> |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | ||
| Priority: | High | ||
| Version: | unspecified | ||
| Hardware: | All | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Package list: | Runtime testing required: | --- | |
|
Description
Joseph
2007-03-10 06:56:02 UTC
According to documentation from: http://cpan.uwinnipeg.ca/htdocs/DBD-Pg/README.html -----quote------ If you get an error message like: perl: error while loading shared libraries: /usr/lib/perl5/site_perl/5.6.1/i386-linux/auto/DBD/Pg/Pg.so: undefined symbol: PQconnectdb when you call DBI->connect, then your libpq.so was probably not seen at build-time. This should have caused 'make test' to fail; did you really run it and look at the output? Check the setting of POSTGRES_LIB and recompile DBD-Pg. -----end quote------- Can somebody provide a hint how to ""Check the setting of POSTGRES_LIB" ? #Joseph Solved!
When new perl scripts emerged one of them: DBD-Pg-1.49 build with dependency: libpq
Since I had an several older versions of libpq.so:
libpq.so
libpq.so.3
libpq.so.4 (newest one)
ldd of Pq.so showed the following output:
ldd /usr/lib/perl5/vendor_perl/5.8.8/i686-linux/auto/DBD/Pg/Pg.so
linux-gate.so.1 => (0xffffe000)
libpq.so.3 => /usr/lib/libpq.so.3 (0xb7f89000)
libc.so.6 => /lib/libc.so.6 (0xb7e62000)
libssl.so.0.9.8 => /usr/lib/libssl.so.0.9.8 (0xb7e24000)
libcrypto.so.0.9.8 => /usr/lib/libcrypto.so.0.9.8 (0xb7cec000)
libcrypt.so.1 => /lib/libcrypt.so.1 (0xb7cbe000)
libresolv.so.2 => /lib/libresolv.so.2 (0xb7cac000)
libnsl.so.1 => /lib/libnsl.so.1 (0xb7c95000)
/lib/ld-linux.so.2 (0x80000000)
libdl.so.2 => /lib/libdl.so.2 (0xb7c91000)
And on my main working server the ldd Pg.so is showing:
...
libpq.so.4 => /usr/lib/libpq.so.4
...
So it seems to me the DBD-pg found an older library and linked to it.
Solution:
rm /usr/lib/libpq.so
rm /usr/lib/libpq.so.3
emerge DBD-Pq
After re-emerging DBD-Pg the output of the ldd Pq.so was:
# ldd /usr/lib/perl5/vendor_perl/5.8.8/i686-linux/auto/DBD/Pg/Pg.so
linux-gate.so.1 => (0xffffe000)
libc.so.6 => /lib/libc.so.6 (0xb7e24000)
/lib/ld-linux.so.2 (0x80000000)
So the libpq no longer showed up so I guess the client (sql-ledger) doesn't need it as I was able to login to sql-ledger.
Next, run:
revdev-rebuild
it will complain that libpq.so.3 is missing in some packages but it will rebuild them with libpq.so.4 (I think) as libpq.so.3 did not show up in /usr/lib/ directory
I don't know how that glitch happened but there should me some way of removing older library, to prevent such obscure bugs.
I always do "emerge -uDNav world" so it makes me wander why the DBD-Pq-1.49 didn't build with the newest library ?
#Joseph
|