[postgis-devel] PATH required on make check

Bruce Rindahl bruce.rindahl at gmail.com
Tue Dec 18 08:55:44 PST 2018


Thanks.  I agree the documentation should just recommend pgsql/bin should
be in PATH.  That's the route I have been taking.
Bruce

On Tue, Dec 18, 2018, 8:47 AM Greg Troxel <gdt at lexort.com wrote:

> Bruce Rindahl <bruce.rindahl at gmail.com> writes:
>
> > That is the strange issue.  Postgresql is installed in the default
> > location.  As is gdal, geos, and proj which were also built from source.
>
> "default location" means different things to different people/programs.
>
> Typically, ./configure with no prefix argument builds for /usr/local,
> and this is broadly considered a default.   I always use pgsql via
> pkgsrc, so the prefix is /usr/pkg, and whatever pgsql's build system
> defaults to I don't encounter.  With an upstream default  of
> /usr/local/pgsql (vs /usr/local), there's a need to add that to PATH,
> and arguably the pgsql documentation should explain this.
>
> > Postgis ./configure finds those three just fine but I have to set
> > --with-pgconfig or it will error out saying unable to find pg_config.
>
> Presumably gdal/geos/proj are built with an implicit prefix of
> /usr/local, and thus gdal-config and geos-config are in /usr/local/bin,
> and proj.pc is in /usr/local/lib/pkgconfig/proj.pc.  With
> /usr/local/bin in PATH, and /usr/local/lib/pkgconfig in pkg-config's
> default search location, they will all be found.
>
> It is not surprising to me that you have to pass --with-pgconfig if
> /usr/local/pgsql/bin is not in PATH.  Perhaps if you added that to PATH
> before building and testing, all would be ok.
>
> > Then some of the tests seem to add the default path but some do not.
>
> If you mean 'the default chosen by the pgsql build process', then I'm
> not really surprised.  I think it's probably a bug to run anything postgis
> without the pgsql's bin directory in PATH.  But another view is that
> this directory should be stored in postgis machinery somewhow and
> automatically added when needed.  I see the second approach as working
> around not having done the straightforward thing, and too complicated.
>
> A third view is that any calls to pgsql programs that are embedded in
> postgis binaries/scripts should be fully qualified pathnames as found at
> configure time, and this extends to all tests as well.   I support this
> view - what bothers me is automatic mucking with PATH.
>
> > OS is raspian which is a version of Debian stretch.
>
> I suspect that your issues are about pgsql using /usr/local/pgsql and
> not specifically about Pi or Debian.
>
> I have Raspberry Pi 3 running NetBSD, and should run the postgis tests
> on it some day.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-devel/attachments/20181218/a3e5ab34/attachment.html>


More information about the postgis-devel mailing list