[postgis-users] About $libdir

Benjamin Thelen benjamin.thelen at ccgis.de
Thu Apr 10 09:30:49 PDT 2003

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.

> -----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.

> 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!
The enabler SQL code is postgis.sql? How do I enable pointing to $libdir?

> > 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

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?

> > 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.

> > Maybe it was not the best idea to change $libdir into the absolute path?
> it was enaught good to make it work.. new releases will fix this for you

Thanks for your good help!!


> --strk;
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users

More information about the postgis-users mailing list