-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 25/04/2011 16:36, Tatsuo Ishii wrote: >>>>> - Add SHLIB_LINK some parameters so that it referrers to >>>>> /usr/local/lib if libpcp is located in the directory. I know this is >>>>> horrible and it only works on Linux system but I don't know how to >>>>> enhance it. >>>> >>>> You don't need that. This should be set when configuring PostgreSQL >>>> source tree. so: >>>> >>>> * clean your postgresql source tree using "make distclean", >>>> * ./configure --whatever-options-you-need >>>> - --with-libraries=/usr/local/lib --with-includes=/usr/local/include >>>> * (optional I guess) make && sudo make install >>>> * cd contrib/pgpool_adm && make && sudo make install >>> >>> But this technique cannot be used with PostgreSQL rpm, no? >> >> this technique allows to build pgpool_adm.so, then install it along >> others contrib modules. >> >> However, when calling pgpool_adm functions from psql, pgpool_adm.so will >> look for libpcp.so.0 to try to load it. >> >> In consequence, you need to set up your /etc/ld.so.conf (or add a file >> in /etc/ld.so.conf.d/*.conf depending on your system) so it can find it: >> >> * add "/usr/local/lib" to your "/etc/ld.so.conf" >> (I added it in "/etc/ld.so.conf.d/local.conf") >> * run the following command as root: >> # ldconfig >> * check if libpcp is available: >> $ ldconfig -p | grep libpcp.so >> >> Let me know if it work or not. Maybe I forgot smth, but it does compile >> and work on my system without having to add this path in the Makefile... > > I know using ldconfig will do the trick but this requires root > privilege, which is not always available for DB admin. Also some > people don't want to add /usr/local/lib to ld.so.conf for a security > reason. > > So customizing Makefile is better, I think.
IMHO, this is the responsability of the application packager or the sys admin to put libraries in a place where they can be loaded by applications. If people compile and install pgpool under /usr/local, and put the related libraries here they know what they are doing and should be able to either move the libraries or tweak their ld.so.conf. Hard-coding this path in the Makefile is, as you said, horrible. But even trying to discover where the lib is to tweak the Makefile dynamically using ./configure is out of our scope. The only thing we should do is to document that, and maybe explain how to run make giving a custom library path if the pgpool installation require it, ie: make SHLIB_LINK="-L/usr/local/lib -lpcp - -Wl,-rpath,'/usr/local/lib',--enable-new-dtags" ...again, IMHO. > -- > Tatsuo Ishii > SRA OSS, Inc. Japan > English: http://www.sraoss.co.jp/index_en.php > Japanese: http://www.sraoss.co.jp - -- Jehan-Guillaume (ioguix) de Rorthais DBA http://www.dalibo.com -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk21iu4ACgkQXu9L1HbaT6LGGACg8Co/d3jDfv1xzmzWl/DMWxJD WgQAoMqKppNAkEP1e41hDscRbRZEVUVQ =nuPc -----END PGP SIGNATURE----- _______________________________________________ Pgpool-hackers mailing list [email protected] http://pgfoundry.org/mailman/listinfo/pgpool-hackers
