Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Portage & Programming
  • Search

[SOLVED] sql-ledger/login.pl: symbol lookup error

Problems with emerge or ebuilds? Have a basic programming question about C, PHP, Perl, BASH or something else?
Post Reply
Advanced search
4 posts • Page 1 of 1
Author
Message
Joseph_sys
Advocate
Advocate
Posts: 2731
Joined: Tue Jun 08, 2004 4:05 pm
Location: Edmonton, AB

[SOLVED] sql-ledger/login.pl: symbol lookup error

  • Quote

Post by Joseph_sys » Sat Mar 10, 2007 12:16 am

After upgrading several perl script today, when I try to log-in to sql-ledger I get an error:
apache log:

Code: Select all

/usr/local/sql-ledger/login.pl: symbol lookup error: /usr/lib/perl5/vendor_perl/5.8.8/i686-linux/auto/DBD/Pg/Pg.so: undefined symbol: PQserverVersion
[client 127.0.0.1] Premature end of script headers: login.pl
Can anybody point me in the right direction?
Last edited by Joseph_sys on Sun Mar 11, 2007 4:44 am, edited 1 time in total.
Top
Joseph_sys
Advocate
Advocate
Posts: 2731
Joined: Tue Jun 08, 2004 4:05 pm
Location: Edmonton, AB

  • Quote

Post by Joseph_sys » Sat Mar 10, 2007 7:07 am

Running:

Code: Select all

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)
The "libpq.so.3" is linked to "/usr/lib/libpq.so.3"
but ther is a new "/usr/lib/libpq.so.4 -> libpq.so.4.0"
Does anybody knows how to change the "Pg.so" so it links to "libpq.so.4.0"
Top
Joseph_sys
Advocate
Advocate
Posts: 2731
Joined: Tue Jun 08, 2004 4:05 pm
Location: Edmonton, AB

  • Quote

Post by Joseph_sys » Sat Mar 10, 2007 7:35 am

More information.
From: http://cpan.uwinnipeg.ca/htdocs/DBD-Pg/README.html
I was able to find:
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.
Anybody knows how to "Check the setting of POSTGRES_LIB"
I wish their instructions were more "Gentoo like"; not every "Joe-blow" has to be a perl programmer :-/
Top
Joseph_sys
Advocate
Advocate
Posts: 2731
Joined: Tue Jun 08, 2004 4:05 pm
Location: Edmonton, AB

  • Quote

Post by Joseph_sys » Sun Mar 11, 2007 4:43 am

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:

Code: Select all

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:

Code: Select all

rm  /usr/lib/libpq.so
rm  /usr/lib/libpq.so.3
#note sure if these two steps below are needed
export POSTGRES_INCLUDE="/usr/local/pgsql/include"
export POSTGRES_LIB="/usr/local/pgsql/lib -lssl -lcrypto"
emerge libpq
revdev-rebuild
emerge DBD-Pg
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 why the package "DBD-Pq" didn't rebuild with the newest libraries?
Top
Post Reply

4 posts • Page 1 of 1

Return to “Portage & Programming”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy