Обсуждение: [GENERAL] Error During PostGIS Build From Source on Linux

Поиск
Список
Период
Сортировка

[GENERAL] Error During PostGIS Build From Source on Linux

От
Osahon Oduware
Дата:
Hi All,

I am working on a Linux OS (Centos 6.5). I built GDAL successfully from source as below:
./configure --prefix=/path/to/gdal
make
make install

Next I built PostgreSQL successfully from source as below:
./configure --prefix=/path/to/pgsql
make
make install

I attempted to configure PostGIS from source as below:
./configure --with-pgconfig=/home/path/to/
pg_config --with-gdalconfig=/path/to/gdal --with-geosconfig=/path/to/geos-config --with-xml2config=/path/to/xml2-config --with-projdir=/path/to/proj --with-gui --with-raster --with-topology

but I get the following error:
configure: error: PostGIS raster requires OGR to be enabled in GDAL. Use --without-raster to build without raster support.

I sure need the raster support to be enabled in PostGIS. Could anyone help me out with this.

Re: [GENERAL] Error During PostGIS Build From Source on Linux

От
Adrian Klaver
Дата:
On 04/12/2017 10:14 AM, Osahon Oduware wrote:
> Hi All,
>
> I am working on a Linux OS (Centos 6.5). I built GDAL successfully from
> source as below:
> ./configure --prefix=/path/to/gdal
> make
> make install
>
> Next I built PostgreSQL successfully from source as below:
> ./configure --prefix=/path/to/pgsql
> make
> make install
>
> I attempted to configure PostGIS from source as below:
> ./configure --with-pgconfig=/home/path/to/
> pg_config --with-gdalconfig=/path/to/gdal
> --with-geosconfig=/path/to/geos-config
> --with-xml2config=/path/to/xml2-config --with-projdir=/path/to/proj
> --with-gui --with-raster --with-topology
>
> but I get the following error:
> configure: error: PostGIS raster requires OGR to be enabled in GDAL. Use
> --without-raster to build without raster support.
>
> I sure need the raster support to be enabled in PostGIS. Could anyone
> help me out with this.


Use the Postgres YUM repos:

https://www.postgresql.org/download/linux/redhat/

--
Adrian Klaver
adrian.klaver@aklaver.com


Re: [GENERAL] Error During PostGIS Build From Source on Linux

От
Rob Sargent
Дата:

On 04/12/2017 12:01 PM, Adrian Klaver wrote:
> On 04/12/2017 10:14 AM, Osahon Oduware wrote:
>> Hi All,
>>
>> I am working on a Linux OS (Centos 6.5). I built GDAL successfully from
>> source as below:
>> ./configure --prefix=/path/to/gdal
>> make
>> make install
>>
>> Next I built PostgreSQL successfully from source as below:
>> ./configure --prefix=/path/to/pgsql
>> make
>> make install
>>
>> I attempted to configure PostGIS from source as below:
>> ./configure --with-pgconfig=/home/path/to/
>> pg_config --with-gdalconfig=/path/to/gdal
>> --with-geosconfig=/path/to/geos-config
>> --with-xml2config=/path/to/xml2-config --with-projdir=/path/to/proj
>> --with-gui --with-raster --with-topology
>>
>> but I get the following error:
>> configure: error: PostGIS raster requires OGR to be enabled in GDAL. Use
>> --without-raster to build without raster support.
>>
>> I sure need the raster support to be enabled in PostGIS. Could anyone
>> help me out with this.
>
>
> Use the Postgres YUM repos:
>
> https://www.postgresql.org/download/linux/redhat/
>
Been  years since I did this but you could (re)build GDAL with OGR as
requested in the error message.
rjs


Re: [GENERAL] Error During PostGIS Build From Source on Linux

От
Adrian Klaver
Дата:
On 04/12/2017 11:11 AM, Rob Sargent wrote:
>
>
> On 04/12/2017 12:01 PM, Adrian Klaver wrote:
>> On 04/12/2017 10:14 AM, Osahon Oduware wrote:
>>> Hi All,
>>>
>>> I am working on a Linux OS (Centos 6.5). I built GDAL successfully from
>>> source as below:
>>> ./configure --prefix=/path/to/gdal
>>> make
>>> make install
>>>
>>> Next I built PostgreSQL successfully from source as below:
>>> ./configure --prefix=/path/to/pgsql
>>> make
>>> make install
>>>
>>> I attempted to configure PostGIS from source as below:
>>> ./configure --with-pgconfig=/home/path/to/
>>> pg_config --with-gdalconfig=/path/to/gdal
>>> --with-geosconfig=/path/to/geos-config
>>> --with-xml2config=/path/to/xml2-config --with-projdir=/path/to/proj
>>> --with-gui --with-raster --with-topology
>>>
>>> but I get the following error:
>>> configure: error: PostGIS raster requires OGR to be enabled in GDAL. Use
>>> --without-raster to build without raster support.
>>>
>>> I sure need the raster support to be enabled in PostGIS. Could anyone
>>> help me out with this.
>>
>>
>> Use the Postgres YUM repos:
>>
>> https://www.postgresql.org/download/linux/redhat/
>>
> Been  years since I did this but you could (re)build GDAL with OGR as
> requested in the error message.

Did a little digging into this and the magic sauce seems to be:

--with-pg=ARG           Include PostgreSQL GDAL/OGR Support (ARG=path to
                           pg_config)


So something like:

./configure --prefix=/path/to/gdal --with-pg=/home/path/to/pg_config

which on my machine got, among other things:

PostgreSQL support:        yes

> rjs
>
>


--
Adrian Klaver
adrian.klaver@aklaver.com


Re: [GENERAL] Error During PostGIS Build From Source on Linux

От
Osahon Oduware
Дата:
Hi Adrian,

Thanks for your response. From the solution you provided, does it mean I have to build PostgreSQL first from source, before building GDAL from source?


On Apr 12, 2017 19:24, "Adrian Klaver" <adrian.klaver@aklaver.com> wrote:
On 04/12/2017 11:11 AM, Rob Sargent wrote:


On 04/12/2017 12:01 PM, Adrian Klaver wrote:
On 04/12/2017 10:14 AM, Osahon Oduware wrote:
Hi All,

I am working on a Linux OS (Centos 6.5). I built GDAL successfully from
source as below:
./configure --prefix=/path/to/gdal
make
make install

Next I built PostgreSQL successfully from source as below:
./configure --prefix=/path/to/pgsql
make
make install

I attempted to configure PostGIS from source as below:
./configure --with-pgconfig=/home/path/to/
pg_config --with-gdalconfig=/path/to/gdal
--with-geosconfig=/path/to/geos-config
--with-xml2config=/path/to/xml2-config --with-projdir=/path/to/proj
--with-gui --with-raster --with-topology

but I get the following error:
configure: error: PostGIS raster requires OGR to be enabled in GDAL. Use
--without-raster to build without raster support.

I sure need the raster support to be enabled in PostGIS. Could anyone
help me out with this.


Use the Postgres YUM repos:

https://www.postgresql.org/download/linux/redhat/

Been  years since I did this but you could (re)build GDAL with OGR as
requested in the error message.

Did a little digging into this and the magic sauce seems to be:

--with-pg=ARG           Include PostgreSQL GDAL/OGR Support (ARG=path to
                          pg_config)


So something like:

./configure --prefix=/path/to/gdal --with-pg=/home/path/to/pg_config

which on my machine got, among other things:

PostgreSQL support:        yes

rjs




--
Adrian Klaver
adrian.klaver@aklaver.com



--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] Error During PostGIS Build From Source on Linux

От
Adrian Klaver
Дата:
On 04/12/2017 02:37 PM, Osahon Oduware wrote:
> Hi Adrian,
>
> Thanks for your response. From the solution you provided, does it mean I
> have to build PostgreSQL first from source, before building GDAL from
> source?

Well you need something to provide pg_config for the version of Postgres
you want to install Postgis on it. That could come from packaged version
as well as a source built version. In your case you showed already
building Postgres. From your previous post:

"Next I built PostgreSQL successfully from source as below:
./configure --prefix=/path/to/pgsql
make
make install"

I would say the order is:

1) A Postgres installation with pg_config, whether that is building from
source or installing a package.

2) Build GDAL using the pg_config from 1)

3) Build Postgis using the pg_config from 1) and gdalconfig from 2)


I don't use Postgis so this is just a best guess on my part. That is why
I initially suggested just using the Postgres Yum repos to install
Postgres and Postgis. Then the build process is taken care of for you.

>
>
> On Apr 12, 2017 19:24, "Adrian Klaver" <adrian.klaver@aklaver.com
> <mailto:adrian.klaver@aklaver.com>> wrote:
>
>     On 04/12/2017 11:11 AM, Rob Sargent wrote:
>
>
>
>         On 04/12/2017 12:01 PM, Adrian Klaver wrote:
>
>             On 04/12/2017 10:14 AM, Osahon Oduware wrote:
>
>                 Hi All,
>
>                 I am working on a Linux OS (Centos 6.5). I built GDAL
>                 successfully from
>                 source as below:
>                 ./configure --prefix=/path/to/gdal
>                 make
>                 make install
>
>                 Next I built PostgreSQL successfully from source as below:
>                 ./configure --prefix=/path/to/pgsql
>                 make
>                 make install
>
>                 I attempted to configure PostGIS from source as below:
>                 ./configure --with-pgconfig=/home/path/to/
>                 pg_config --with-gdalconfig=/path/to/gdal
>                 --with-geosconfig=/path/to/geos-config
>                 --with-xml2config=/path/to/xml2-config
>                 --with-projdir=/path/to/proj
>                 --with-gui --with-raster --with-topology
>
>                 but I get the following error:
>                 configure: error: PostGIS raster requires OGR to be
>                 enabled in GDAL. Use
>                 --without-raster to build without raster support.
>
>                 I sure need the raster support to be enabled in PostGIS.
>                 Could anyone
>                 help me out with this.
>
>
>
>             Use the Postgres YUM repos:
>
>             https://www.postgresql.org/download/linux/redhat/
>             <https://www.postgresql.org/download/linux/redhat/>
>
>         Been  years since I did this but you could (re)build GDAL with
>         OGR as
>         requested in the error message.
>
>
>     Did a little digging into this and the magic sauce seems to be:
>
>     --with-pg=ARG           Include PostgreSQL GDAL/OGR Support (ARG=path to
>                               pg_config)
>
>
>     So something like:
>
>     ./configure --prefix=/path/to/gdal --with-pg=/home/path/to/pg_config
>
>     which on my machine got, among other things:
>
>     PostgreSQL support:        yes
>
>         rjs
>
>
>
>
>     --
>     Adrian Klaver
>     adrian.klaver@aklaver.com <mailto:adrian.klaver@aklaver.com>
>
>
>
>     --
>     Sent via pgsql-general mailing list (pgsql-general@postgresql.org
>     <mailto:pgsql-general@postgresql.org>)
>     To make changes to your subscription:
>     http://www.postgresql.org/mailpref/pgsql-general
>     <http://www.postgresql.org/mailpref/pgsql-general>
>
>


--
Adrian Klaver
adrian.klaver@aklaver.com


Re: [GENERAL] Error During PostGIS Build From Source on Linux

От
Adrian Klaver
Дата:
On 04/12/2017 02:37 PM, Osahon Oduware wrote:
> Hi Adrian,
>
> Thanks for your response. From the solution you provided, does it mean I
> have to build PostgreSQL first from source, before building GDAL from
> source?

Alright did a test run of the build.

I installed the dev packages for GEOS and Proj from packages and I
already had the xml2 dev libraries.

I built GDAL using the pg_config from my source install of Postgres.

So when building Postgis after building GDAL  I had to do:

--with-gdalconfig=/path/to/gdal/bin/gdal_config

to get it to see the config file and not throw an error. Then Postgis built.



>
>
> On Apr 12, 2017 19:24, "Adrian Klaver" <adrian.klaver@aklaver.com
> <mailto:adrian.klaver@aklaver.com>> wrote:
>
>     On 04/12/2017 11:11 AM, Rob Sargent wrote:
>
>
>
>         On 04/12/2017 12:01 PM, Adrian Klaver wrote:
>
>             On 04/12/2017 10:14 AM, Osahon Oduware wrote:
>
>                 Hi All,
>
>                 I am working on a Linux OS (Centos 6.5). I built GDAL
>                 successfully from
>                 source as below:
>                 ./configure --prefix=/path/to/gdal
>                 make
>                 make install
>
>                 Next I built PostgreSQL successfully from source as below:
>                 ./configure --prefix=/path/to/pgsql
>                 make
>                 make install
>
>                 I attempted to configure PostGIS from source as below:
>                 ./configure --with-pgconfig=/home/path/to/
>                 pg_config --with-gdalconfig=/path/to/gdal
>                 --with-geosconfig=/path/to/geos-config
>                 --with-xml2config=/path/to/xml2-config
>                 --with-projdir=/path/to/proj
>                 --with-gui --with-raster --with-topology
>
>                 but I get the following error:
>                 configure: error: PostGIS raster requires OGR to be
>                 enabled in GDAL. Use
>                 --without-raster to build without raster support.
>
>                 I sure need the raster support to be enabled in PostGIS.
>                 Could anyone
>                 help me out with this.
>
>
>
>             Use the Postgres YUM repos:
>
>             https://www.postgresql.org/download/linux/redhat/
>             <https://www.postgresql.org/download/linux/redhat/>
>
>         Been  years since I did this but you could (re)build GDAL with
>         OGR as
>         requested in the error message.
>
>
>     Did a little digging into this and the magic sauce seems to be:
>
>     --with-pg=ARG           Include PostgreSQL GDAL/OGR Support (ARG=path to
>                               pg_config)
>
>
>     So something like:
>
>     ./configure --prefix=/path/to/gdal --with-pg=/home/path/to/pg_config
>
>     which on my machine got, among other things:
>
>     PostgreSQL support:        yes
>
>         rjs
>
>
>
>
>     --
>     Adrian Klaver
>     adrian.klaver@aklaver.com <mailto:adrian.klaver@aklaver.com>
>
>
>
>     --
>     Sent via pgsql-general mailing list (pgsql-general@postgresql.org
>     <mailto:pgsql-general@postgresql.org>)
>     To make changes to your subscription:
>     http://www.postgresql.org/mailpref/pgsql-general
>     <http://www.postgresql.org/mailpref/pgsql-general>
>
>


--
Adrian Klaver
adrian.klaver@aklaver.com


Re: [GENERAL] Error During PostGIS Build From Source on Linux

От
John R Pierce
Дата:
On 4/12/2017 10:14 AM, Osahon Oduware wrote:
> Hi All,
>
> I am working on a Linux OS (Centos 6.5). I built GDAL successfully
> from source as below:
> ...
>
> I sure need the raster support to be enabled in PostGIS. Could anyone
> help me out with this.


if you install those packages from the yum repository, doesn't postgis
include raster support?

assuming you want pg 9.5 (if another, replace the 95's below with the
version you want...)

# yum install
https://download.postgresql.org/pub/repos/yum/9.5/redhat/rhel-6-x86_64/pgdg-centos95-9.5-3.noarch.rpm
# yum install gdal{,-devel} postgresql95{,-server,-devel,-contrib}
postgis2_95{,-devel,-utils}


--
john r pierce, recycling bits in santa cruz



Re: [GENERAL] Error During PostGIS Build From Source on Linux

От
Osahon Oduware
Дата:
Hi Adrian,

I followed the step you provided and the installation was successful. However, I created a test database and when I try to create a postgis extension in the test database using:
CREATE EXTENSION postgis;

I get the following error:
ERROR: could not load library "/path/to/postgresql/lib/postgis-2.3.so": /path/to/postgresql/lib/postgis-2.3.so: undefined symbol: GEOSClipByRect

Please, do you have any idea what I might be doing wrong?

On Thu, Apr 13, 2017 at 3:40 AM, Osahon Oduware <osahon.gis@gmail.com> wrote:
Hi Adrian,

I will try this and get back to you. Thanks a lot for your help.


On Apr 12, 2017 23:45, "Adrian Klaver" <adrian.klaver@aklaver.com> wrote:
On 04/12/2017 02:37 PM, Osahon Oduware wrote:
Hi Adrian,

Thanks for your response. From the solution you provided, does it mean I
have to build PostgreSQL first from source, before building GDAL from
source?

Alright did a test run of the build.

I installed the dev packages for GEOS and Proj from packages and I already had the xml2 dev libraries.

I built GDAL using the pg_config from my source install of Postgres.

So when building Postgis after building GDAL  I had to do:

--with-gdalconfig=/path/to/gdal/bin/gdal_config

to get it to see the config file and not throw an error. Then Postgis built.





On Apr 12, 2017 19:24, "Adrian Klaver" <adrian.klaver@aklaver.com
<mailto:adrian.klaver@aklaver.com>> wrote:

    On 04/12/2017 11:11 AM, Rob Sargent wrote:



        On 04/12/2017 12:01 PM, Adrian Klaver wrote:

            On 04/12/2017 10:14 AM, Osahon Oduware wrote:

                Hi All,

                I am working on a Linux OS (Centos 6.5). I built GDAL
                successfully from
                source as below:
                ./configure --prefix=/path/to/gdal
                make
                make install

                Next I built PostgreSQL successfully from source as below:
                ./configure --prefix=/path/to/pgsql
                make
                make install

                I attempted to configure PostGIS from source as below:
                ./configure --with-pgconfig=/home/path/to/
                pg_config --with-gdalconfig=/path/to/gdal
                --with-geosconfig=/path/to/geos-config
                --with-xml2config=/path/to/xml2-config
                --with-projdir=/path/to/proj
                --with-gui --with-raster --with-topology

                but I get the following error:
                configure: error: PostGIS raster requires OGR to be
                enabled in GDAL. Use
                --without-raster to build without raster support.

                I sure need the raster support to be enabled in PostGIS.
                Could anyone
                help me out with this.



            Use the Postgres YUM repos:

            https://www.postgresql.org/download/linux/redhat/
            <https://www.postgresql.org/download/linux/redhat/>

        Been  years since I did this but you could (re)build GDAL with
        OGR as
        requested in the error message.


    Did a little digging into this and the magic sauce seems to be:

    --with-pg=ARG           Include PostgreSQL GDAL/OGR Support (ARG=path to
                              pg_config)


    So something like:

    ./configure --prefix=/path/to/gdal --with-pg=/home/path/to/pg_config

    which on my machine got, among other things:

    PostgreSQL support:        yes

        rjs




    --
    Adrian Klaver
    adrian.klaver@aklaver.com <mailto:adrian.klaver@aklaver.com>




    --
    Sent via pgsql-general mailing list (pgsql-general@postgresql.org
    <mailto:pgsql-general@postgresql.org>)

    To make changes to your subscription:
    http://www.postgresql.org/mailpref/pgsql-general
    <http://www.postgresql.org/mailpref/pgsql-general>




--
Adrian Klaver
adrian.klaver@aklaver.com


Re: [GENERAL] Error During PostGIS Build From Source on Linux

От
Adrian Klaver
Дата:
On 04/13/2017 02:46 AM, Osahon Oduware wrote:
> Hi Adrian,
>
> I followed the step you provided and the installation was successful.
> However, I created a test database and when I try to create a postgis
> extension in the test database using:
> CREATE EXTENSION postgis;
>
> I get the following error:
> ERROR: could not load library "/path/to/postgresql/lib/postgis-2.3.so
> <http://postgis-2.3.so>": /path/to/postgresql/lib/postgis-2.3.so
> <http://postgis-2.3.so>: undefined symbol: GEOSClipByRect
>
> Please, do you have any idea what I might be doing wrong?
>

Looks to me like it did not compile with GEOS support.

I would really suggest just installing the CentOS packages.


--
Adrian Klaver
adrian.klaver@aklaver.com


Re: [GENERAL] Error During PostGIS Build From Source on Linux

От
Adrian Klaver
Дата:
On 04/13/2017 02:46 AM, Osahon Oduware wrote:
> Hi Adrian,
>
> I followed the step you provided and the installation was successful.
> However, I created a test database and when I try to create a postgis
> extension in the test database using:
> CREATE EXTENSION postgis;
>
> I get the following error:
> ERROR: could not load library "/path/to/postgresql/lib/postgis-2.3.so
> <http://postgis-2.3.so>": /path/to/postgresql/lib/postgis-2.3.so
> <http://postgis-2.3.so>: undefined symbol: GEOSClipByRect
>
> Please, do you have any idea what I might be doing wrong?
>

Should have added to my previous post:

If you are going to compile the code, the output at the end of the
./configure process for Postgis is helpful. It helps identify what is
going to be included and what is not.

In my case:

PostGIS is now configured for x86_64-pc-linux-gnu

  -------------- Compiler Info -------------
   C compiler:           gcc -g -O2
   SQL preprocessor:     /usr/bin/cpp -traditional-cpp -w -P

  -------------- Dependencies --------------
   GEOS config:          /usr/bin/geos-config
   GEOS version:         3.5.1
   GDAL config:          /home/aklaver/gdal/bin/gdal-config
   GDAL version:         2.1.3
   PostgreSQL config:    /usr/local/pgsql/bin/pg_config
   PostgreSQL version:   PostgreSQL 9.5.6
   PROJ4 version:        49
   Libxml2 config:       /usr/bin/xml2-config
   Libxml2 version:      2.9.4
   JSON-C support:       no
   PCRE support:         yes
   PostGIS debug level:  0
   Perl:                 /usr/bin/perl

  --------------- Extensions ---------------
   PostGIS Raster:       enabled
   PostGIS Topology:     enabled
   SFCGAL support:       disabled
   Address Standardizer support:       enabled

  -------- Documentation Generation --------
   xsltproc:             /usr/bin/xsltproc
   xsl style sheets:
   dblatex:
   convert:              /usr/bin/convert
   mathml2.dtd:          http://www.w3.org/Math/DTD/mathml2/mathml2.dtd

--
Adrian Klaver
adrian.klaver@aklaver.com


Re: [GENERAL] Error During PostGIS Build From Source on Linux

От
Osahon Oduware
Дата:
Hi Adrian,

Thanks for your help so far. This is the output of the PostGIS configuration:

-------------- Compiler Info -------------
  C compiler:           gcc -g -O2
  SQL preprocessor:     /usr/bin/cpp -traditional-cpp -w -P

 -------------- Dependencies --------------
  GEOS config:          /home/nagispg/local/geos361/bin/geos-config
  GEOS version:         3.6.1
  GDAL config:          /home/nagispg/local/gdal213/bin/gdal-config
  GDAL version:         2.1.3
  PostgreSQL config:    /home/nagispg/local/pgsql/bin/pg_config
  PostgreSQL version:   PostgreSQL 9.6.2
  PROJ4 version:        49
  Libxml2 config:       /usr/bin/xml2-config
  Libxml2 version:      2.7.6
  JSON-C support:       no
  PCRE support:         no
  PostGIS debug level:  0
  Perl:                 /usr/bin/perl

 --------------- Extensions ---------------
  PostGIS Raster:       enabled
  PostGIS Topology:     enabled
  SFCGAL support:       disabled
  Address Standardizer support:       disabled

 -------- Documentation Generation --------
  xsltproc:             /usr/bin/xsltproc
  xsl style sheets:    
  dblatex:             
  convert:              /usr/bin/convert
  mathml2.dtd:          http://www.w3.org/Math/DTD/mathml2/mathml2.dtd

I had to install a higher version of Proj (4.9.3) that was used to configure PostGIS (I think I read somewhere in the documentation that the version of Proj should be >= 4.6.0). Now, I get the following error when I run CREATE EXTENSION postgis:

ERROR: could not load library postgis-2.3.so: libproj.so.12: cannot open shared object file: No such file or directory

I would be glad if someone could point me to what I am doing wrong and possible solution.


On Thu, Apr 13, 2017 at 3:00 PM, Adrian Klaver <adrian.klaver@aklaver.com> wrote:
On 04/13/2017 02:46 AM, Osahon Oduware wrote:
Hi Adrian,

I followed the step you provided and the installation was successful.
However, I created a test database and when I try to create a postgis
extension in the test database using:
CREATE EXTENSION postgis;

I get the following error:
ERROR: could not load library "/path/to/postgresql/lib/postgis-2.3.so
<http://postgis-2.3.so>": /path/to/postgresql/lib/postgis-2.3.so
<http://postgis-2.3.so>: undefined symbol: GEOSClipByRect

Please, do you have any idea what I might be doing wrong?


Should have added to my previous post:

If you are going to compile the code, the output at the end of the ./configure process for Postgis is helpful. It helps identify what is going to be included and what is not.

In my case:

PostGIS is now configured for x86_64-pc-linux-gnu

 -------------- Compiler Info -------------
  C compiler:           gcc -g -O2
  SQL preprocessor:     /usr/bin/cpp -traditional-cpp -w -P

 -------------- Dependencies --------------
  GEOS config:          /usr/bin/geos-config
  GEOS version:         3.5.1
  GDAL config:          /home/aklaver/gdal/bin/gdal-config
  GDAL version:         2.1.3
  PostgreSQL config:    /usr/local/pgsql/bin/pg_config
  PostgreSQL version:   PostgreSQL 9.5.6
  PROJ4 version:        49
  Libxml2 config:       /usr/bin/xml2-config
  Libxml2 version:      2.9.4
  JSON-C support:       no
  PCRE support:         yes
  PostGIS debug level:  0
  Perl:                 /usr/bin/perl

 --------------- Extensions ---------------
  PostGIS Raster:       enabled
  PostGIS Topology:     enabled
  SFCGAL support:       disabled
  Address Standardizer support:       enabled

 -------- Documentation Generation --------
  xsltproc:             /usr/bin/xsltproc
  xsl style sheets:
  dblatex:
  convert:              /usr/bin/convert
  mathml2.dtd:          http://www.w3.org/Math/DTD/mathml2/mathml2.dtd

--
Adrian Klaver
adrian.klaver@aklaver.com

Re: [GENERAL] Error During PostGIS Build From Source on Linux

От
Adrian Klaver
Дата:
On 04/13/2017 07:54 AM, Osahon Oduware wrote:
> Hi Adrian,
>
> Thanks for your help so far. This is the output of the PostGIS
> configuration:
>
> -------------- Compiler Info -------------
>   C compiler:           gcc -g -O2
>   SQL preprocessor:     /usr/bin/cpp -traditional-cpp -w -P
>
>  -------------- Dependencies --------------
>   GEOS config:          /home/nagispg/local/geos361/bin/geos-config
>   GEOS version:         3.6.1
>   GDAL config:          /home/nagispg/local/gdal213/bin/gdal-config
>   GDAL version:         2.1.3
>   PostgreSQL config:    /home/nagispg/local/pgsql/bin/pg_config
>   PostgreSQL version:   PostgreSQL 9.6.2
>   PROJ4 version:        49
>   Libxml2 config:       /usr/bin/xml2-config
>   Libxml2 version:      2.7.6
>   JSON-C support:       no
>   PCRE support:         no
>   PostGIS debug level:  0
>   Perl:                 /usr/bin/perl
>
>  --------------- Extensions ---------------
>   PostGIS Raster:       enabled
>   PostGIS Topology:     enabled
>   SFCGAL support:       disabled
>   Address Standardizer support:       disabled
>
>  -------- Documentation Generation --------
>   xsltproc:             /usr/bin/xsltproc
>   xsl style sheets:
>   dblatex:
>   convert:              /usr/bin/convert
>   mathml2.dtd:          http://www.w3.org/Math/DTD/mathml2/mathml2.dtd
> <http://www.w3.org/Math/DTD/mathml2/mathml2.dtd>
>
> I had to install a *higher version of Proj (4.9.3)* that was used to
> configure PostGIS (I think I read somewhere in the documentation that
> the version of Proj should be >= 4.6.0). *Now, I get the following error
> when I run CREATE EXTENSION postgis:*

How did you install Proj, from a package or source?

>
> *ERROR: could not load library postgis-2.3.so <http://postgis-2.3.so>:
> libproj.so.12: cannot open shared object file: No such file or directory*

First find postgis-2.3.so and do:

ldd postgis-2.3.so

It should show something like:

         linux-vdso.so.1 (0x00007ffe3ed8a000)
         libgeos_c.so.1 => /usr/lib64/libgeos_c.so.1 (0x00007f975bd09000)
     ==> libproj.so.9 => /usr/lib64/libproj.so.9 (0x00007f975baaa000)
         libxml2.so.2 => /usr/lib64/libxml2.so.2 (0x00007f975b73f000)
         libm.so.6 => /lib64/libm.so.6 (0x00007f975b442000)
         libc.so.6 => /lib64/libc.so.6 (0x00007f975b09e000)
         libgeos-3.5.1.so => /usr/lib64/libgeos-3.5.1.so
(0x00007f975acef000)
         libstdc++.so.6 => /usr/lib64/libstdc++.so.6 (0x00007f975a966000)
         libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007f975a74e000)
         libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f975a531000)
         libdl.so.2 => /lib64/libdl.so.2 (0x00007f975a32d000)
         libz.so.1 => /lib64/libz.so.1 (0x00007f975a116000)
         liblzma.so.5 => /usr/lib64/liblzma.so.5 (0x00007f9759eed000)
         /lib64/ld-linux-x86-64.so.2 (0x000055ebafa02000)

That will verify if postgis-2.3.so is linked to libproj.



>
> I would be glad if someone could point me to what I am doing wrong and
> possible solution.
>
>

--
Adrian Klaver
adrian.klaver@aklaver.com


Re: [GENERAL] Error During PostGIS Build From Source on Linux

От
Osahon Oduware
Дата:
Hi Adrian,

I installed Proj from source and I can confirm that the file libproj.so.12 is in its lib folder.

I have not been able to confirm if it is linked to postgis-2.3.so as I am away for Easter holiday.

Just in case, how do I do the linking of libproj.so.12 to postgis-2.3.so as I believe this could be the cause of the error. Also, I tried earlier to copy the file to the PostgreSQL lib folder and this time when I try to run "CREATE EXTENSION postgis;" I get the initial error:
ERROR: could not load library "/path/to/postgresql/lib/postgis-2.3.so": /path/to/postgresql/lib/postgis-2.3.so: undefined symbol: GEOSClipByRect

I will be glad if anyone could help with this.

On Apr 13, 2017 18:27, "Adrian Klaver" <adrian.klaver@aklaver.com> wrote:
On 04/13/2017 07:54 AM, Osahon Oduware wrote:
Hi Adrian,

Thanks for your help so far. This is the output of the PostGIS
configuration:

-------------- Compiler Info -------------
  C compiler:           gcc -g -O2
  SQL preprocessor:     /usr/bin/cpp -traditional-cpp -w -P

 -------------- Dependencies --------------
  GEOS config:          /home/nagispg/local/geos361/bin/geos-config
  GEOS version:         3.6.1
  GDAL config:          /home/nagispg/local/gdal213/bin/gdal-config
  GDAL version:         2.1.3
  PostgreSQL config:    /home/nagispg/local/pgsql/bin/pg_config
  PostgreSQL version:   PostgreSQL 9.6.2
  PROJ4 version:        49
  Libxml2 config:       /usr/bin/xml2-config
  Libxml2 version:      2.7.6
  JSON-C support:       no
  PCRE support:         no
  PostGIS debug level:  0
  Perl:                 /usr/bin/perl

 --------------- Extensions ---------------
  PostGIS Raster:       enabled
  PostGIS Topology:     enabled
  SFCGAL support:       disabled
  Address Standardizer support:       disabled

 -------- Documentation Generation --------
  xsltproc:             /usr/bin/xsltproc
  xsl style sheets:
  dblatex:
  convert:              /usr/bin/convert
  mathml2.dtd:          http://www.w3.org/Math/DTD/mathml2/mathml2.dtd
<http://www.w3.org/Math/DTD/mathml2/mathml2.dtd>

I had to install a *higher version of Proj (4.9.3)* that was used to

configure PostGIS (I think I read somewhere in the documentation that
the version of Proj should be >= 4.6.0). *Now, I get the following error
when I run CREATE EXTENSION postgis:*

How did you install Proj, from a package or source?


*ERROR: could not load library postgis-2.3.so <http://postgis-2.3.so>:
libproj.so.12: cannot open shared object file: No such file or directory*

First find postgis-2.3.so and do:

ldd postgis-2.3.so

It should show something like:

        linux-vdso.so.1 (0x00007ffe3ed8a000)
        libgeos_c.so.1 => /usr/lib64/libgeos_c.so.1 (0x00007f975bd09000)
    ==> libproj.so.9 => /usr/lib64/libproj.so.9 (0x00007f975baaa000)
        libxml2.so.2 => /usr/lib64/libxml2.so.2 (0x00007f975b73f000)
        libm.so.6 => /lib64/libm.so.6 (0x00007f975b442000)
        libc.so.6 => /lib64/libc.so.6 (0x00007f975b09e000)
        libgeos-3.5.1.so => /usr/lib64/libgeos-3.5.1.so (0x00007f975acef000)
        libstdc++.so.6 => /usr/lib64/libstdc++.so.6 (0x00007f975a966000)
        libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007f975a74e000)
        libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f975a531000)
        libdl.so.2 => /lib64/libdl.so.2 (0x00007f975a32d000)
        libz.so.1 => /lib64/libz.so.1 (0x00007f975a116000)
        liblzma.so.5 => /usr/lib64/liblzma.so.5 (0x00007f9759eed000)
        /lib64/ld-linux-x86-64.so.2 (0x000055ebafa02000)

That will verify if postgis-2.3.so is linked to libproj.





I would be glad if someone could point me to what I am doing wrong and
possible solution.



--
Adrian Klaver
adrian.klaver@aklaver.com


Re: [GENERAL] Error During PostGIS Build From Source on Linux

От
Adrian Klaver
Дата:
On 04/14/2017 12:20 PM, Osahon Oduware wrote:
> Hi Adrian,
>

Something I meant to refer to earlier, it is considered bad etiquette to
cross post to multiple lists. It means in this case I have to remember
to drop the postgis list from my replies as I am not a member of that
list and I get a rejection notice if I forget.

> I installed Proj from source and I can confirm that the
> file libproj.so.12 is in its lib folder.

That directory would be?

>
> I have not been able to confirm if it is linked to postgis-2.3.so
> <http://postgis-2.3.so/> as I am away for Easter holiday.
>
> Just in case, how do I do the linking of libproj.so.12 to postgis-2.3.so
> <http://postgis-2.3.so/> as I believe this could be the cause of the
> error. Also, I tried earlier to copy the file to the PostgreSQL lib
> folder and this time when I try to run "CREATE EXTENSION postgis;" I get
> the initial error:
> ERROR: could not load library "/path/to/postgresql/lib/postgis-2.3.so
> <http://postgis-2.3.so/>": /path/to/postgresql/lib/postgis-2.3.so
> <http://postgis-2.3.so/>: undefined symbol: GEOSClipByRect

Probably going to involve dealing with ldconfig.

Look in /etc/ld.so.conf and see if the directory that contains
libproj.so.12 is in there?

>
> I will be glad if anyone could help with this.
>

--
Adrian Klaver
adrian.klaver@aklaver.com


Re: [GENERAL] Error During PostGIS Build From Source on Linux

От
John R Pierce
Дата:
On 4/15/2017 10:49 AM, Adrian Klaver wrote:
>
> Probably going to involve dealing with ldconfig.
>
> Look in /etc/ld.so.conf and see if the directory that contains
> libproj.so.12 is in there?

the catch-22 is, /etc/ld.so.conf is a global thing, and this guy is
building all his stuff to run under his /home/username/.... (where, btw,
selinux might get unhappy with you).   instead, if its private stuff
like that, use LD_LIBRARY_PATH in the environment of the processes that
need the libraries.   or link with the paths hard coded, eg
-Wl,-rpath=/home/username/..../lib64 when linking the packages that
refer to these libraries.




--
john r pierce, recycling bits in santa cruz



Re: [GENERAL] Error During PostGIS Build From Source on Linux

От
Adrian Klaver
Дата:
On 04/15/2017 11:25 AM, John R Pierce wrote:
> On 4/15/2017 10:49 AM, Adrian Klaver wrote:
>>
>> Probably going to involve dealing with ldconfig.
>>
>> Look in /etc/ld.so.conf and see if the directory that contains
>> libproj.so.12 is in there?
>
> the catch-22 is, /etc/ld.so.conf is a global thing, and this guy is
> building all his stuff to run under his /home/username/.... (where, btw,
> selinux might get unhappy with you).   instead, if its private stuff
> like that, use LD_LIBRARY_PATH in the environment of the processes that
> need the libraries.   or link with the paths hard coded, eg
> -Wl,-rpath=/home/username/..../lib64 when linking the packages that
> refer to these libraries.

Well when I did my build I also did some of it in my /home directory to
replicate the OP's process to a certain extent. To get everything to run
I symlinked the *.so's into the corresponding global directory covered
by ld.so.config and ran ldconfig. Then all was golden. Before that I got
similar error messages when CREATEing the postgis extension.

>
>
>
>


--
Adrian Klaver
adrian.klaver@aklaver.com


Re: [GENERAL] Error During PostGIS Build From Source on Linux

От
Devrim Gündüz
Дата:
Hi,

On Wed, 2017-04-12 at 16:10 -0700, John R Pierce wrote:
> if you install those packages from the yum repository, doesn't postgis 
> include raster support?

It does.

Regards,
--
Devrim Gündüz
EnterpriseDB: http://www.enterprisedb.com
PostgreSQL Danışmanı/Consultant, Red Hat Certified Engineer
Twitter: @DevrimGunduz , @DevrimGunduzTR

Вложения

Fwd: [GENERAL] Error During PostGIS Build From Source on Linux

От
Osahon Oduware
Дата:
Noted

Something I meant to refer to earlier, it is considered bad etiquette to cross post to multiple lists. It means in this case I have to remember to drop the postgis list from my replies as I am not a member of that list and I get a rejection notice if I forget.


Re: [GENERAL] Error During PostGIS Build From Source on Linux

От
Osahon Oduware
Дата:
Hi Adrian,

This suggestion helped to resolve the problem. Thanks a lot for your help.

On Sat, Apr 15, 2017 at 8:02 PM, Adrian Klaver <adrian.klaver@aklaver.com> wrote:
On 04/15/2017 11:25 AM, John R Pierce wrote:
On 4/15/2017 10:49 AM, Adrian Klaver wrote:

Probably going to involve dealing with ldconfig.

Look in /etc/ld.so.conf and see if the directory that contains
libproj.so.12 is in there?

the catch-22 is, /etc/ld.so.conf is a global thing, and this guy is
building all his stuff to run under his /home/username/.... (where, btw,
selinux might get unhappy with you).   instead, if its private stuff
like that, use LD_LIBRARY_PATH in the environment of the processes that
need the libraries.   or link with the paths hard coded, eg
-Wl,-rpath=/home/username/..../lib64 when linking the packages that
refer to these libraries.

Well when I did my build I also did some of it in my /home directory to replicate the OP's process to a certain extent. To get everything to run I symlinked the *.so's into the corresponding global directory covered by ld.so.config and ran ldconfig. Then all was golden. Before that I got similar error messages when CREATEing the postgis extension.







--
Adrian Klaver
adrian.klaver@aklaver.com



--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general