Tom Lane <tgl@sss.pgh.pa.us> writes:
> teg@redhat.com (Trond Eivind Glomsrød) writes:
> > Tom Lane <tgl@sss.pgh.pa.us> writes:
> >> I speculate that your executable was picking up
> >> a non-MULTIBYTE libpq shared library from someplace. Check ldconfig
> >> and all that stuff...
>
> > I have an existing installation of 7.1 on the system, that's why I did
> > "make check" in the build directory.
>
> > "--prefix=/usr" seems to be the "culprit" - without it, it regression
> > tests run just fine.
>
> The pg_regress script sets LD_LIBRARY_PATH to try to cause libpq and
> the other shlibs to be picked up from the temp installation tree.
> Perhaps this is wrong or insufficient on your platform. It certainly
> sounds like the dynamic linker is choosing the installed libpq over
> the one that we want it to use. Any thoughts on fixing that?
Since it works when prefix isn't /usr, I'd guess that the build
process sets rpath. This takes precedence over LD_LIBRARY_PATH.
Fix? Don't use rpath - it's evil, and should be avoided anyway.
ld(1) contains some info on how libraries are resolved.
--
Trond Eivind Glomsrød
Red Hat, Inc.