Compiling Postgis with gdal support

774 views
Skip to first unread message

Vietnhi Phuvan

unread,
Jun 18, 2014, 3:31:55 PM6/18/14
to car...@googlegroups.com
I am downloading sqlite3 v3.8.2 with FTS support and compiling it manually as per these instructions: https://github.com/coolaj86/node-sqlite-fts-demo

curl http://www.sqlite.org/2013/sqlite-autoconf-3080200.tar.gz -o sqlite-autoconf-3080200.tar.gz
tar xvf sqlite-autoconf-*.tar.gz -C ./
cd sqlite-autoconf-*/
./configure
make
sudo make install


I have installed gdal as follows:

sudo apt-get install gdal-bin libgdal1-dev


I am running the first step f compiling Post-GIS 2.1.2:

./configure --with-raster --with-topology


I am getting

checking for library containing GDALAllRegister... no
configure: error: could not find GDAL

What corrective action should I be taking?

Sandro Santilli

unread,
Jun 19, 2014, 3:31:28 AM6/19/14
to car...@googlegroups.com
On Wed, Jun 18, 2014 at 12:31:54PM -0700, Vietnhi Phuvan wrote:

> I have installed gdal as follows:
> sudo apt-get install gdal-bin libgdal1-dev
>
> I am running the first step f compiling Post-GIS 2.1.2:
> ./configure --with-raster --with-topology
>
>
> I am getting
> checking for library containing GDALAllRegister... no
> configure: error: could not find GDAL
>
> What corrective action should I be taking?

Try: sudo apt-get install libgdal1
(just in case the actual library was not installed)
Then run: dpkg -l | grep gdal
and show the result here if it still doesn't work

--strk;

()  ASCII ribbon campaign -- Keep it simple !
/\  http://strk.keybit.net/rants/ascii_mails.txt

Vietnhi Phuvan

unread,
Jun 19, 2014, 5:30:57 AM6/19/14
to car...@googlegroups.com

ubuntu@ip-10-179-151-133:~$ dpkg -l | grep gdal
ii  gdal-bin                         1.10.1-0cdb1~precise2       Geospatial Data Abstraction Library - Utility programs
ii  libgdal-dev                      1.10.1-0cdb1~precise2       Geospatial Data Abstraction Library - Development files
ii  libgdal1-dev                     1.10.1-0cdb1~precise2       Geospatial Data Abstraction Library - Development files
ii  libgdal1h                        1.10.1-0cdb1~precise2       Geospatial Data Abstraction Library


ubuntu@ip-10-179-151-133:~$ sudo apt-get install libgdal1
Reading package lists... Done
Building dependency tree      
Reading state information... Done
Package libgdal1 is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
However the following packages replace it:
  libgdal1h:i386 libgdal1h

The Ubuntu server is a 12.04 64-bit machine

I should additionally point out that the failure to link GDAL is connected to this error message in config.log of PostGIS:

/usr/lib/libgdal.so: undefined reference to `sqlite3_column_table_name'

Sandro Santilli

unread,
Jun 19, 2014, 5:33:46 AM6/19/14
to car...@googlegroups.com
On Thu, Jun 19, 2014 at 02:30:57AM -0700, Vietnhi Phuvan wrote:
>
> ubuntu@ip-10-179-151-133:~$ dpkg -l | grep gdal
> ii gdal-bin 1.10.1-0cdb1~precise2 Geospatial
> Data Abstraction Library - Utility programs
> ii libgdal-dev 1.10.1-0cdb1~precise2 Geospatial
> Data Abstraction Library - Development files
> ii libgdal1-dev 1.10.1-0cdb1~precise2 Geospatial
> Data Abstraction Library - Development files
> ii libgdal1h 1.10.1-0cdb1~precise2 Geospatial
> Data Abstraction Library
>
>
> ubuntu@ip-10-179-151-133:~$ sudo apt-get install libgdal1
> Reading package lists... Done
> Building dependency tree
> Reading state information... Done
> Package libgdal1 is not available, but is referred to by another package.
> This may mean that the package is missing, has been obsoleted, or
> is only available from another source
> However the following packages replace it:
> libgdal1h:i386 libgdal1h
>
> The Ubuntu server is a 12.04 64-bit machine
>
> I should additionally point out that the failure to link GDAL is connected
> to this error message in config.log of PostGIS:
>
> /usr/lib/libgdal.so: undefined reference to `sqlite3_column_table_name'

Ah, that explains.
Sounds like a broken "libgdal1h" package, report it to the packagers ?
You could build gdal yourself or see .travis.yml for where it gets
the packages from.

--strk;

Vietnhi Phuvan

unread,
Jun 19, 2014, 7:01:12 PM6/19/14
to car...@googlegroups.com


On Wednesday, June 18, 2014 3:31:55 PM UTC-4, Vietnhi Phuvan wrote:
I am downloading sqlite3 v3.8.2 with FTS support and compiling it manually as per these instructions: https://github.com/coolaj86/node-sqlite-fts-demo

curl http://www.sqlite.org/2013/sqlite-autoconf-3080200.tar.gz -o sqlite-autoconf-3080200.tar.gz
tar xvf sqlite-autoconf-*.tar.gz -C ./
cd sqlite-autoconf-*/
./configure
make
sudo make install


I have installed gdal as follows:

sudo apt-get install gdal-bin libgdal1-dev

It gets better: I compiled gdal manually. I couldn't get Postgis to recognize gdal until I copied /usr/lib/x86_64_linux/libsqlite3.so0.8.6 to /usr/local/lib. Of course, when I do that, every time I run thel sqlite3 command, I get a complaint from sqlite3 about a header mismatch.
Reply all
Reply to author
Forward
0 new messages