From: | Paul Ramsey <pramsey(at)refractions(dot)net> |
---|---|
To: | Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> |
Cc: | PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: $libdir and 8.0 |
Date: | 2004-08-19 04:52:33 |
Message-ID: | 41243211.9060000@refractions.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
I am afraid it gets crazier...
I put /home/pramsey/pgtest/8.0/bin on my $PATH
Now:
[pramsey(at)localhost 8.0]$ pg_config --pkglibdir
/home/pramsey/pgtest/8.0/lib/postgresql
Hm, correct.
[pramsey(at)localhost 8.0]$ ./bin/pg_config --pkglibdir
/home/pramsey/pgtest/8.0/./lib/postgresql
Also correct, but getting strangely relative.
[pramsey(at)localhost 8.0]$ cd bin
[pramsey(at)localhost bin]$ ./pg_config --pkglibdir
/home/pramsey/pgtest/8.0/bin/lib/postgresql
Now incorrect. The answer depends on where I am asking from.
[pramsey(at)localhost bin]$ ./pg_config --bindir
/home/pramsey/pgtest/8.0/bin/.
Using the direct request. Using the $PATH assisted request:
[pramsey(at)localhost bin]$ pg_config --bindir
/home/pramsey/pgtest/8.0/bin
Entirely correct.
Problem solved? No...
[pramsey(at)localhost bin]$ createlang plpgsql test
ERROR: could not access file "$libdir/plpgsql": No such file or directory
createlang: language installation failed: ERROR: could not access file
"$libdir/plpgsql": No such file or directory
If I copy plpgsql.so into /home/pramsey/pgtest/8.0/lib then things work.
Bruce Momjian wrote:
> Ah, what is your $bindir? Is it /home/pramsey/pgtest/8.0/bin/postgresql?
>
> ---------------------------------------------------------------------------
>
> Paul Ramsey wrote:
>
>>Check this out!
>>
>>[pramsey(at)localhost bin]$ ./pg_config --pkglibdir
>>/home/pramsey/pgtest/8.0/bin/lib/postgresql
>> ^^^
>>
>>And yet:
>>
>>./port/pg_config_paths.h:#define PKGLIBDIR
>>"/home/pramsey/pgtest/8.0/lib/postgresql"
>>
>>Could the problem be here? (port/path.c):
>>
>>/*
>> * get_pkglib_path
>> */
>>void
>>get_pkglib_path(const char *my_exec_path, char *ret_path)
>>{
>> const char *p;
>>
>> if ((p = relative_path(PGBINDIR, PKGLIBDIR)))
>> make_relative(my_exec_path, p, ret_path);
>> else
>> StrNCpy(ret_path, PKGLIBDIR, MAXPGPATH);
>> canonicalize_path(ret_path);
>>}
>>
>>
>>Bruce Momjian wrote:
>>
>>>Devrim GUNDUZ wrote:
>>>
>>>
>>>>Hi,
>>>>
>>>>On Wed, 18 Aug 2004, Paul Ramsey wrote:
>>>>
>>>>
>>>>
>>>>>When installing PgSQL into a non-standard location (like /opt/foo) the
>>>>>configure script decides to install all the contrib libraries and
>>>>>plpglsq into /opt/foo/lib/postgresql. This would be fine, except that
>>>>>backend does not recognize this directory as a place to be searched for
>>>>>$libdir (perhaps it is referencing the $libdir macro instead of the
>>>>>$pkglibdir macro?). So tools like 'createlang' fail, and loading .sql
>>>>>files that reference things like $libdir/libfoo.so also fail.
>>>>
>>>>I'm not sure but if you add /opt/foo/lib/postgresql to /etc/ld.so.conf and
>>>>run ldconfig, it might work.
>>>
>>>
>>>I checked in the code and $libdir should expand to $(pkglibdir) as
>>>determined by configure. What value to you show for that in
>>>your Makefile.global?
>>>
>>
>
From | Date | Subject | |
---|---|---|---|
Next Message | Paul Ramsey | 2004-08-19 05:00:04 | Re: $libdir and 8.0 |
Previous Message | Tom Lane | 2004-08-19 04:47:19 | Re: $libdir and 8.0 |