Bug 118003 - www/apache22: with PgSQL option require only libpq.so.3
Summary: www/apache22: with PgSQL option require only libpq.so.3
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-apache (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-11-12 14:20 UTC by Sergey
Modified: 2010-05-07 21:08 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sergey 2007-11-12 14:20:01 UTC
I build apache22 with PGSQL option.
Then I try run tcl-written cgi-script and got errors:
httpd-error.log
[Fri Nov 09 21:02:37 2007] [error] [client 192.168.107.2] couldn't load file "libpgtcl.so": Shared object "libpq.so.3" not found, required by "libpgtcl.so"
[Fri Nov 09 21:02:37 2007] [error] [client 192.168.107.2]     while executing
[Fri Nov 09 21:02:37 2007] [error] [client 192.168.107.2] "load libpgtcl.so"
[Fri Nov 09 21:02:37 2007] [error] [client 192.168.107.2]     (file "select.cgi" line 6)
[Fri Nov 09 21:02:37 2007] [error] [client 192.168.107.2]
[Fri Nov 09 21:02:37 2007] [error] [client 192.168.107.2] Premature end of script headers: select.cgi
I have postgresql-server-8.2.5_2 and it use /usr/local/lib/libpq.so.5 but apache try to find libpq.so.3 shared library.

Fix: 

I have a quick, but bad fix:
make symlink libpq.so.3->libpq.so.5
How-To-Repeat: 0. Install tcl84, PostgreSQL82
1. Build apache22 with PGSQL option
run any tcl-written cgi-script (like this one-line script #!/usr/local/bin/tclsh)
look at /varlog/httpd-error.log for error:
[Fri Nov 09 21:02:37 2007] [error] [client 192.168.107.2] couldn't load file "libpgtcl.so": Shared object "libpq.so.3" not found, required by "libpgtcl.so"
Comment 1 Remko Lodder freebsd_committer freebsd_triage 2007-11-12 15:11:07 UTC
Responsible Changed
From-To: freebsd-bugs->freebsd-ports-bugs

this is a ports thingy.
Comment 2 Mark Linimon freebsd_committer freebsd_triage 2007-11-28 03:10:27 UTC
Responsible Changed
From-To: freebsd-ports-bugs->clement

Over to maintainer.
Comment 3 Philip M. Gollucci freebsd_committer freebsd_triage 2008-12-27 20:29:32 UTC
Responsible Changed
From-To: clement->apache

apache team
Comment 4 Philip M. Gollucci freebsd_committer freebsd_triage 2010-05-07 21:03:24 UTC
State Changed
From-To: open->closed

you mix-mastered your pgsql libraries 

$ cd /var/db/pkg
$ ls -1d apr* apache* tcl* post*
apache-2.2.15_2/
apr-devrandom-gdbm-db42-mysql55-pgsql82-1.4.2.1.3.9_1/
postgresql-client-8.2.15_1/
postgresql-server-8.2.15_1/
tcl-8.2.3_9/

$ cd /usr/local/www/apache22/cgi-bin
$ cat t.tcsh 
#!/usr/local/bin/tclsh8.2

puts "Content-Type: text/plain\n\n";
puts "Hello World";

$ cd ~
$ curl http://localhost/cgi-bin/t.tcsh

Hello World

$ tail /var/log/httpd-error.log
[Fri May 07 16:05:44 2010] [notice] caught SIGTERM, shutting down
[Fri May 07 16:05:44 2010] [warn] Init: Session Cache is not configured [hint: SSLSessionCache]
[Fri May 07 16:05:45 2010] [notice] Digest: generating secret for digest authentication ...
[Fri May 07 16:05:45 2010] [notice] Digest: done
[Fri May 07 16:05:46 2010] [notice] Apache/2.2.15 (FreeBSD) mod_ssl/2.2.15 OpenSSL/1.0.0 DAV/2 PHP/5.3.2 with Suhosin-Patch configured -- resuming normal operations