[postgis-users] About $libdir
strk
strk at freek.keybit.net
Thu Apr 10 10:55:42 PDT 2003
benjamin.thelen wrote:
> Hi,
> Thanks for your response. It is confusing. I'll do my best, but I am not
> sure whether I understand your answers enough to do the right thing. Here
> are a few more questions, if you like to answer.
> Thanks!
>
>
> > -----Original Message-----
> > From: postgis-users-bounces at postgis.refractions.net
> > [mailto:postgis-users-bounces at postgis.refractions.net]On Behalf Of strk
> > Sent: Thursday, April 10, 2003 4:58 PM
> > To: PostGIS Users Discussion
> > Subject: Re: [postgis-users] About $libdir
> >
> >
> > benjamin.thelen wrote:
> > > Hi,
> > >
> > > Is there a way to find out, what $libdir contains? Something like echo
> > > $libdir or print $libdir?
> >
> > $libdir points to `pg_config --pkglibdir`
>
> I understand now.
>
> >
> > `pg_config --pkglibdir` is where extensions to postgres reside
> > `pg_config --libdir` is where postgres libs reside
> >
> > If you need to compile something against postgres you should use
> > -L`pg_config --libdir`. When installing an extension you should
> > use `pg_config --pkglibdir`.
>
>
> That would mean, to install postgis I call in
> 'postgresql-Sourcetree/contrib/postgis/' the gmake like
> gmake -L'pg_config --libdir' or gmake -L'pg_config --pkglibdir'? But
> somehow, I suppose that is not what you've meant :-). I couldn't find the -L
> switch for gmake in the man-page.
Nonono... -L is used to tell the linker where to find libs.
postgis did this in the right way (since you compiled it).
Forget gmake, you won't need it.
>
>
>
> >
> > Postgis "should" be installed in `pg_config --pkglibdir` and
> > then enabled pointing to $libdir in the enabler SQL code.
>
>
> I thought postgis is an extentension AND is compiled against postgresql.
> This is confusing!
You are right, both statements are true.
> The enabler SQL code is postgis.sql? How do I enable pointing to $libdir?
postgis.sql is the enabler.
>
>
>
> >
> > > I've changed $libdir to /usr/local/pgsql/lib and it now seem to
> > work fine.
> > > There are at the beginning of the output a few messages, which I don't
> > > understand:
> >
> > Your version of postgis has probably been installed in --libdir
> > instead of --pkglibdir.
> > $libdir in your case is probably pointing at
> > /usr/local/pgsql/lib/postgresql
> > (pg_config --pkglibdir)
> >
> > did I make enaught confusion :)
>
>
>
> I'm afraid yes. :-)
>
> I've checked pg_config immediately:
>
> pg_config --libdir --> /usr/local/lib
> pg_config --pkglibdir --> /usr/local/lib/postgresql
Ok. this helps understanding.
Now. If postgres is installed properly (pg_config says the truth)
this means that extension should go to /usr/local/lib/postgresql,
and AFAIK $libdir would point right there.
> So it's no surprise, why it did't work, as I used "/usr/local/pgsql/lib". A
> little different, isn't it!
> That means that libpostgis.so.0 should actually reside in
> /usr/local/lib/postgresql? Does the difference come from a compiling error?
>
Try putting libpostgis.so.0 (and all symlink chain) in
/usr/local/lib/postgresql and using $libdir in postgis.sql
If it works we have got a better understanding of $libdir.
>
>
>
> >
> > > Well, the question is, why does $libdir not work? How can I
> > make it work?
> >
> > # mv `pg_config --libdir`/libpostgis.* `pg_config --pkglibdir`
>
> I get "mv: No match"?! Differnt Syntax Unix/Linux?
> After that postgis.sql will work with $libdir, I suppose.
Sorry, I thought your postgis got installed in `pg_config --libdir`
but I understand now it's not. I suppose you'll have to move
from /usr/local/pgsql/lib/ .
--strk;
More information about the postgis-users
mailing list