SFCGAL : trouble installing

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

SFCGAL : trouble installing

Rémi Cura
Hey list (and salut SFCGAL guys).

I would like to use SFCGAL but can't make it work.

On a Ubuntu 12.04 LTS, Postgres 9.3, postgis 2.1, CGAL 4.2 , SFCGAL 1.0.2.

  1. I compil &install CGAL : fine
  2. I configure and compil SFCGAL : fine
  3. I install SFCGAL : fine (see log)

  1. I clean postgis : fine
  2. I configure postgis : strange (see log) **SFCGAL version is marked as 1.0.0 where it should be 1.0.2
  3. I compil postgis : fine (see log)
  4. I install Postgis : fine (see log)

Then I create a new database : 
  • CREATE DATABASE test_sfcgal;
And try to add postgis
  • CREATE EXTENSION postgis VERSION '2.1.0';

Then I get the error message : 
  • "ERROR:  could not load library "/usr/lib/postgresql/9.3/lib/postgis-2.1.so": libSFCGAL.so: cannot open shared object file: No such file or directory"

Yet libsfcgal.so is in "/usr/local/lib".

Is it related to the fact that I have two postgres server (9.2 and 9.3, on port 5432 and 5433), even if only the 9.3 is running when installing etc?

I tried to configure postgis with a given sfcgal path : 'usr/local'
SFCGAL version is not detected in Postgis configure step.
Then I get error while building postgis (raster section)
/bin/bash ../../libtool --mode=link gcc -g -O2  -fPIC -DPIC  -Wall -Wmissing-prototypes -I../rt_core -I../../liblwgeom  -I/usr/include/gdal -I/usr/local/include   ../rt_core/librtcore.a raster2pgsql.o ../../liblwgeom/liblwgeom.la -L/usr/lib -lgdal  -L/usr/local/lib -lgeos_c  -lc -lm -o raster2pgsql
libtool: link: gcc -g -O2 -fPIC -DPIC -Wall -Wmissing-prototypes -I../rt_core -I../../liblwgeom -I/usr/include/gdal -I/usr/local/include raster2pgsql.o -o .libs/raster2pgsql  ../rt_core/librtcore.a ../../liblwgeom/.libs/liblwgeom.so -L/usr/lib -lgdal -L/usr/local/lib /usr/local/lib/libgeos_c.so -lc -lm
../../liblwgeom/.libs/liblwgeom.so: undefined reference to `sfcgal_linestring_add_point' ....

I also tried to install SFCGAL in a custom directory ,
then use the --with-sfcgal=the_directory
I got the same error while building than when indicating 'usr/local' 

Postgis_full_version() before installing sfcgal :
POSTGIS="2.1.0 r11822" GEOS="3.4.2-CAPI-1.8.2 r3921" PROJ="Rel. 4.8.0, 6 March 2012" GDAL="GDAL 1.10.0, released 2013/04/24" LIBXML="2.8.0" TOPOLOGY RASTER


Any help appreciated, as I tried everything I could think of !

Cheers

Rémi-C


_______________________________________________
postgis-devel mailing list
[hidden email]
http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-devel
Reply | Threaded
Open this post in threaded view
|

Re: SFCGAL : trouble installing

Rémi Cura
Missing logs, of course :
See attachment,
Cheers,
Rémi-C


2013/10/14 Rémi Cura <[hidden email]>
Hey list (and salut SFCGAL guys).

I would like to use SFCGAL but can't make it work.

On a Ubuntu 12.04 LTS, Postgres 9.3, postgis 2.1, CGAL 4.2 , SFCGAL 1.0.2.

  1. I compil &install CGAL : fine
  2. I configure and compil SFCGAL : fine
  3. I install SFCGAL : fine (see log)

  1. I clean postgis : fine
  2. I configure postgis : strange (see log) **SFCGAL version is marked as 1.0.0 where it should be 1.0.2
  3. I compil postgis : fine (see log)
  4. I install Postgis : fine (see log)

Then I create a new database : 
  • CREATE DATABASE test_sfcgal;
And try to add postgis
  • CREATE EXTENSION postgis VERSION '2.1.0';

Then I get the error message : 
  • "ERROR:  could not load library "/usr/lib/postgresql/9.3/lib/postgis-2.1.so": libSFCGAL.so: cannot open shared object file: No such file or directory"

Yet libsfcgal.so is in "/usr/local/lib".

Is it related to the fact that I have two postgres server (9.2 and 9.3, on port 5432 and 5433), even if only the 9.3 is running when installing etc?

I tried to configure postgis with a given sfcgal path : 'usr/local'
SFCGAL version is not detected in Postgis configure step.
Then I get error while building postgis (raster section)
/bin/bash ../../libtool --mode=link gcc -g -O2  -fPIC -DPIC  -Wall -Wmissing-prototypes -I../rt_core -I../../liblwgeom  -I/usr/include/gdal -I/usr/local/include   ../rt_core/librtcore.a raster2pgsql.o ../../liblwgeom/liblwgeom.la -L/usr/lib -lgdal  -L/usr/local/lib -lgeos_c  -lc -lm -o raster2pgsql
libtool: link: gcc -g -O2 -fPIC -DPIC -Wall -Wmissing-prototypes -I../rt_core -I../../liblwgeom -I/usr/include/gdal -I/usr/local/include raster2pgsql.o -o .libs/raster2pgsql  ../rt_core/librtcore.a ../../liblwgeom/.libs/liblwgeom.so -L/usr/lib -lgdal -L/usr/local/lib /usr/local/lib/libgeos_c.so -lc -lm
../../liblwgeom/.libs/liblwgeom.so: undefined reference to `sfcgal_linestring_add_point' ....

I also tried to install SFCGAL in a custom directory ,
then use the --with-sfcgal=the_directory
I got the same error while building than when indicating 'usr/local' 

Postgis_full_version() before installing sfcgal :
POSTGIS="2.1.0 r11822" GEOS="3.4.2-CAPI-1.8.2 r3921" PROJ="Rel. 4.8.0, 6 March 2012" GDAL="GDAL 1.10.0, released 2013/04/24" LIBXML="2.8.0" TOPOLOGY RASTER


Any help appreciated, as I tried everything I could think of !

Cheers

Rémi-C



_______________________________________________
postgis-devel mailing list
[hidden email]
http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-devel

postgis_2_1_configure.txt (15K) Download Attachment
postgis_2_1_make.txt (109K) Download Attachment
postgis_2_1_make_install.txt (25K) Download Attachment
SFCGAL_make_install.txt (11K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: SFCGAL : trouble installing

Oliver Courtin
In reply to this post by Rémi Cura

On Oct 14, 2013, at 12:30 PM, Rémi Cura wrote:

Hi Rémi,

I would like to use SFCGAL but can't make it work.

And try to add postgis
  • CREATE EXTENSION postgis VERSION '2.1.0';

Here is the issue.

Right now (and until 2.2.0) sfcgal don't use EXTENSION
so need to create the spatial database with the old school method:

psql database < postgis.sql
psql database < spatial_ref_sys.sql
psql database < sfcgal.sql


Should be enough to make it works.



I also will look why you did'nt get the 1.0.2 right version number.




O.




_______________________________________________
postgis-devel mailing list
[hidden email]
http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-devel
Reply | Threaded
Open this post in threaded view
|

Re: SFCGAL : trouble installing

Rémi Cura
Hey Olivier ,
thanks for the answer !

great news for 2.2, I hope I'll be able to try sfcgal before that :-)

Still not working, what am I doing wrong?

su postgres
cd /usr/share/postgresql/9.3/contrib/postgis-2.1/
psql -d test_sfcgal -p 5433 < postgis.sql
test_sfcgal being a data base created for the test.

the postgis.sql breaks at the 2nd statement with the classical : 

ERROR: could not load library "/usr/lib/postgresql/9.3/lib/postgis-2.1.so": libSFCGAL.so: cannot open shared object file: No such file or directory
État SQL :58P01

what now?
It seems like postgis has no link to libsfcgal.so.
Can I manually set it?

make check in postgis goves the same error old error.

Cheers,

Rémi-C

2013/10/14 Olivier Courtin <[hidden email]>

On Oct 14, 2013, at 12:30 PM, Rémi Cura wrote:

Hi Rémi,

I would like to use SFCGAL but can't make it work.

And try to add postgis
  • CREATE EXTENSION postgis VERSION '2.1.0';

Here is the issue.

Right now (and until 2.2.0) sfcgal don't use EXTENSION
so need to create the spatial database with the old school method:

psql database < postgis.sql
psql database < spatial_ref_sys.sql
psql database < sfcgal.sql


Should be enough to make it works.



I also will look why you did'nt get the 1.0.2 right version number.




O.




_______________________________________________
postgis-devel mailing list
[hidden email]
http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-devel


_______________________________________________
postgis-devel mailing list
[hidden email]
http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-devel
Reply | Threaded
Open this post in threaded view
|

Re: [postgis-users] SFCGAL : trouble installing

Oliver Courtin

Le 14 oct. 2013 à 15:17, Rémi Cura a écrit :

Rémi,

great news for 2.2, I hope I'll be able to try sfcgal before that :-)

:)

the postgis.sql breaks at the 2nd statement with the classical : 

ERROR: could not load library "/usr/lib/postgresql/9.3/lib/postgis-2.1.so": libSFCGAL.so: cannot open shared object file: No such file or directory
État SQL :58P01

what now?


Did you done a ldconfig ?

What give a :
ldconfig -v | grep -i sfcgal 


What give also a:
ldd /usr/lib/postgresql/9.3/lib/postgis-2.1.so


O.





_______________________________________________
postgis-devel mailing list
[hidden email]
http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-devel
Reply | Threaded
Open this post in threaded view
|

Re: [postgis-users] SFCGAL : trouble installing

Rémi Cura
Thanks for your detailed help !

Strange: everything seems to be recognized both by system and by postgis.


ldconfig :
/usr/local/lib:
libgeos-3.4.2.so -> libgeos.so
libSFCGAL.so -> libSFCGAL.so
libCGAL_Core.so.10 -> libCGAL_Core.so.10.0.1
libcunit.so.1 -> libcunit.so.1.0.1
liblwgeom-2.1.0.so -> liblwgeom.so
libgeos_c.so.1 -> libgeos_c.so.1.8.2
libCGAL.so.10 -> libCGAL.so.10.0.1

ldd :
linux-gate.so.1 =>  (0xb77c8000)
libgeos_c.so.1 => /usr/local/lib/libgeos_c.so.1 (0xb76e1000)
libproj.so.0 => /usr/lib/libproj.so.0 (0xb7696000)
libxml2.so.2 => /usr/lib/i386-linux-gnu/libxml2.so.2 (0xb7545000)
libSFCGAL.so => /usr/local/lib/libSFCGAL.so (0xb6e0e000)
libc.so.6 => /lib/i386-linux-gnu/libc.so.6 (0xb6c65000)
libgeos-3.4.2.so => /usr/local/lib/libgeos-3.4.2.so (0xb6ae1000)
libstdc++.so.6 => /usr/lib/i386-linux-gnu/libstdc++.so.6 (0xb69fc000)
libgcc_s.so.1 => /lib/i386-linux-gnu/libgcc_s.so.1 (0xb69dd000)
libm.so.6 => /lib/i386-linux-gnu/libm.so.6 (0xb69b1000)
libdl.so.2 => /lib/i386-linux-gnu/libdl.so.2 (0xb69ac000)
libz.so.1 => /lib/i386-linux-gnu/libz.so.1 (0xb6996000)
liblzma.so.5 => /usr/lib/i386-linux-gnu/liblzma.so.5 (0xb696f000)
libCGAL.so.10 => /usr/local/lib/libCGAL.so.10 (0xb694b000)
libCGAL_Core.so.10 => /usr/local/lib/libCGAL_Core.so.10 (0xb6916000)
libgmp.so.10 => /usr/lib/i386-linux-gnu/libgmp.so.10 (0xb6897000)
libmpfr.so.4 => /usr/lib/i386-linux-gnu/libmpfr.so.4 (0xb683a000)
libboost_thread.so.1.46.1 => /usr/lib/libboost_thread.so.1.46.1 (0xb6823000)
libboost_serialization.so.1.46.1 => /usr/lib/libboost_serialization.so.1.46.1 (0xb67bb000)
/lib/ld-linux.so.2 (0xb77c9000)
libpthread.so.0 => /lib/i386-linux-gnu/libpthread.so.0 (0xb67a0000)




2013/10/14 Oliver Courtin <[hidden email]>

Le 14 oct. 2013 à 15:17, Rémi Cura a écrit :

Rémi,

great news for 2.2, I hope I'll be able to try sfcgal before that :-)

:)

the postgis.sql breaks at the 2nd statement with the classical : 

ERROR: could not load library "/usr/lib/postgresql/9.3/lib/postgis-2.1.so": libSFCGAL.so: cannot open shared object file: No such file or directory
État SQL :58P01

what now?


Did you done a ldconfig ?

What give a :
ldconfig -v | grep -i sfcgal 


What give also a:
ldd /usr/lib/postgresql/9.3/lib/postgis-2.1.so


O.





_______________________________________________
postgis-devel mailing list
[hidden email]
http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-devel


_______________________________________________
postgis-devel mailing list
[hidden email]
http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-devel
Reply | Threaded
Open this post in threaded view
|

Re: [postgis-users] SFCGAL : trouble installing

Rémi Cura
In reply to this post by Oliver Courtin
[SOLVED]

I had to put permissive rights on the libSFCGAL.* file in "/usr/local/lib"
(chmod 777)

Then 
su postgres

createdb test_sfcgal -p 5433
createlang plpgsql test_sfcgal -p 5433
psql -d test_sfcgal -p 5433 -f postgis.sql
psql -d test_sfcgal -p 5433 -f spatial_ref_sys.sql
psql -d test_sfcgal -p 5433 -f sfcgal.sql

Thanks again Olivier for help !

Cheers,

Rémi-C

PS : may I suggest to add those lines at the end of the "installation" page in the github of SFCGAL.
""""""""
Right now (and until 2.2.0) sfcgal doesn't use EXTENSION
so we need to create the spatial database with the old school method:

cd /usr/share/postgresql/9.3/contrib/postgis-2.1
psql -d your_database -f postgis.sql
psql your_database -f  spatial_ref_sys.sql
psql your_database -f  sfcgal.sql
""""""""


2013/10/14 Oliver Courtin <[hidden email]>

Le 14 oct. 2013 à 15:17, Rémi Cura a écrit :

Rémi,

great news for 2.2, I hope I'll be able to try sfcgal before that :-)

:)

the postgis.sql breaks at the 2nd statement with the classical : 

ERROR: could not load library "/usr/lib/postgresql/9.3/lib/postgis-2.1.so": libSFCGAL.so: cannot open shared object file: No such file or directory
État SQL :58P01

what now?


Did you done a ldconfig ?

What give a :
ldconfig -v | grep -i sfcgal 


What give also a:
ldd /usr/lib/postgresql/9.3/lib/postgis-2.1.so


O.





_______________________________________________
postgis-devel mailing list
[hidden email]
http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-devel


_______________________________________________
postgis-devel mailing list
[hidden email]
http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-devel
Reply | Threaded
Open this post in threaded view
|

Re: [postgis-users] SFCGAL : trouble installing

Oliver Courtin
Le 14 oct. 2013 à 17:12, Rémi Cura a écrit :

Rémi,

[SOLVED]

Goodie,

I had to put permissive rights on the libSFCGAL.* file in "/usr/local/lib"
(chmod 777)

755 should be enough…


Thanks again Olivier for help !

You're welcome, any feedback at this stage is really appreciated...


PS : may I suggest to add those lines at the end of the "installation" page in the github of SFCGAL.
""""""""
Right now (and until 2.2.0) sfcgal doesn't use EXTENSION
so we need to create the spatial database with the old school method:

cd /usr/share/postgresql/9.3/contrib/postgis-2.1
psql -d your_database -f postgis.sql
psql your_database -f  spatial_ref_sys.sql
psql your_database -f  sfcgal.sql


Well even if SFCGAL is for now use in conjunction with PostGIS,
we could imagine to use it without PostGIS…
(as others softwares than PostGIS use GEOS too)


So this documentation installation step is more relevant in PostGIS doc…
And your right i was supposed to write SFCGAL Install Part in 8.10,
and still not done it... 

I will so do it soon !


Right now the more recent documentation related to installation/usage
is the FOSS4G Workshop about PostGIS 3D:


HTH,


O.

_______________________________________________
postgis-devel mailing list
[hidden email]
http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-devel
Reply | Threaded
Open this post in threaded view
|

Re: [postgis-users] SFCGAL : trouble installing

Rémi Cura
Np =)

Thanks for the Workshop, from now I'll refer to it before asking questions !

I'll post here if I encounter problems (or sucesses) with SFCGAL.

Cheers,
Rémi-C 


2013/10/14 Oliver Courtin <[hidden email]>
Le 14 oct. 2013 à 17:12, Rémi Cura a écrit :

Rémi,

[SOLVED]

Goodie,

I had to put permissive rights on the libSFCGAL.* file in "/usr/local/lib"
(chmod 777)

755 should be enough…


Thanks again Olivier for help !

You're welcome, any feedback at this stage is really appreciated...


PS : may I suggest to add those lines at the end of the "installation" page in the github of SFCGAL.
""""""""
Right now (and until 2.2.0) sfcgal doesn't use EXTENSION
so we need to create the spatial database with the old school method:

cd /usr/share/postgresql/9.3/contrib/postgis-2.1
psql -d your_database -f postgis.sql
psql your_database -f  spatial_ref_sys.sql
psql your_database -f  sfcgal.sql


Well even if SFCGAL is for now use in conjunction with PostGIS,
we could imagine to use it without PostGIS…
(as others softwares than PostGIS use GEOS too)


So this documentation installation step is more relevant in PostGIS doc…
And your right i was supposed to write SFCGAL Install Part in 8.10,
and still not done it... 

I will so do it soon !


Right now the more recent documentation related to installation/usage
is the FOSS4G Workshop about PostGIS 3D:


HTH,


O.

_______________________________________________
postgis-devel mailing list
[hidden email]
http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-devel


_______________________________________________
postgis-devel mailing list
[hidden email]
http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-devel