[postgis-users] About $libdir
Benjamin Thelen
benjamin.thelen at ccgis.de
Fri Apr 11 06:14:14 PDT 2003
Hi, thanks again!
Ok, I moved /usr/local/pgsql/lib/libpostgis.* (incl. the symlink) to
/usr/local/lib/postgresql and used postgis.sql with $libdir and it worked in
the same way like with absolute path. So, we were successful. But that too
means that this is a bug in the installation of postgis?
With which command would I use this -L switch, you recommended to use below?
The linker, who is it? But I don't need to do that anymore?
According to the statement, that postgis is an extension AND is compiled
against postgresql, I can't decide on my own where to install postgis. Is
pkglibdir then just an official recommendation then, as you write "should"
be installed in --pkglibdir? But, as postgis.sql didn't work, it is more
then a recommendation.
How can I find out, where I installed postgis? You wrote "I thought your
postgis got installed in `pg_config --libdir` but I understand now it's
not." I don't. :-). I now suppose, that postgis was correctly installed
into --pkglibdir (where can I configure that?), but did copy libpostgis.so*
into the wrong directory.
Thanks very much,
Benjamin
PS: I still get this output below using postgis.sql. I just ask in case
there is any relation. Otherwise I think it will be a new posting as soon as
I see something what I need is not working in postgis.
psql:../postgis.sql:18: NOTICE: ProcedureCreate: type histogram2d is not
yet defined
psql:../postgis.sql:23: NOTICE: Argument type "histogram2d" is only a shell
psql:../postgis.sql:39: NOTICE: ProcedureCreate: type box3d is not yet
defined
psql:../postgis.sql:44: NOTICE: Argument type "box3d" is only a shell
psql:../postgis.sql:59: NOTICE: ProcedureCreate: type spheroid is not yet
defined
psql:../postgis.sql:64: NOTICE: Argument type "spheroid" is only a shell
psql:../postgis.sql:79: NOTICE: ProcedureCreate: type wkb is not yet
defined
psql:../postgis.sql:84: NOTICE: Argument type "wkb" is only a shell
psql:../postgis.sql:99: NOTICE: ProcedureCreate: type chip is not yet
defined
psql:../postgis.sql:104: NOTICE: Argument type "chip" is only a shell
psql:../postgis.sql:120: NOTICE: ProcedureCreate: type geometry is not yet
defined
psql:../postgis.sql:125: NOTICE: Argument type "geometry" is only a shell
psql:../postgis.sql:154: NOTICE: CREATE TABLE / PRIMARY KEY will create
implicit index 'spatial_ref_sys_pkey' for table 'spatial_ref_sys'
psql:../postgis.sql:174: NOTICE: CREATE TABLE / PRIMARY KEY will create
implicit index 'geometry_columns_pk' for table 'geometry_columns'
> -----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 7:56 PM
> To: PostGIS Users Discussion
> Subject: Re: [postgis-users] About $libdir
>
>
> 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;
>
> _______________________________________________
> 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