<div dir="ltr">I'm trying to build latest PostGIS (2.2dev) with SFCGAL.<div>SFCGAL is installed in /usr/local/lib, and includes are in /usr/local/include/SFCGAL</div><div>I've run configure as:</div><div><br></div>
<div>./configure --with-sfcgal=/usr/local/bin</div><div><br></div><div>and it finds SFCGAL (even if it doesn't output the version, which should be 1.0.4):</div><div><br></div><div><div>-------------- Compiler Info ------------- </div>
<div>  C compiler:           gcc -g -O2</div><div>  C++ compiler:         g++ -g -O2</div><div>  SQL preprocessor:     /usr/bin/cpp -traditional-cpp -P</div><div><br></div><div> -------------- Dependencies -------------- </div>
<div>  GEOS config:          /usr/bin/geos-config</div><div>  GEOS version:         3.3.8</div><div>  GDAL config:          /usr/bin/gdal-config</div><div>  GDAL version:         1.10.0</div><div>  SFCGAL config:        /usr/local/bin</div>
<div>  SFCGAL version:       </div><div>  PostgreSQL config:    /usr/bin/pg_config</div><div>  PostgreSQL version:   PostgreSQL 9.1.13</div><div>  PROJ4 version:        48</div><div>  Libxml2 config:       /usr/bin/xml2-config</div>
<div>  Libxml2 version:      2.8.0</div><div>  JSON-C support:       yes</div><div>  PostGIS debug level:  0</div><div>  Perl:                 /usr/bin/perl</div><div><br></div><div> --------------- Extensions --------------- </div>
<div>  PostGIS Raster:       enabled</div><div>  PostGIS Topology:     enabled</div><div>  SFCGAL support:       enabled</div><div><br></div><div>Everything seems ok, but it fails during the linking of utilities (e.g. raster loader or, in case a disable raster, during shp2pgsql building):</div>
<div><br></div><div><div>/bin/bash ../libtool --mode=link \</div><div><span class="" style="white-space:pre">       </span>  gcc -I ../liblwgeom -g -O2  -fPIC -DPIC  -Wall -Wmissing-prototypes    shpopen.o dbfopen.o getopt.o shpcommon.o safileio.o shp2pgsql-core.o shp2pgsql-cli.o ../liblwgeom/<a href="http://liblwgeom.la">liblwgeom.la</a> -o shp2pgsql  -lc </div>
<div>libtool: link: gcc -I ../liblwgeom -g -O2 -fPIC -DPIC -Wall -Wmissing-prototypes shpopen.o dbfopen.o getopt.o shpcommon.o safileio.o shp2pgsql-core.o shp2pgsql-cli.o -o .libs/shp2pgsql  ../liblwgeom/.libs/liblwgeom.so -lc -Wl,-rpath -Wl,/home/giova/bin/postgis/lib</div>
<div>../liblwgeom/.libs/liblwgeom.so: undefined reference to `sfcgal_solid_num_shells'</div><div>../liblwgeom/.libs/liblwgeom.so: undefined reference to `sfcgal_point_y'</div><div>../liblwgeom/.libs/liblwgeom.so: undefined reference to `sfcgal_point_x'</div>
<div>../liblwgeom/.libs/liblwgeom.so: undefined reference to `sfcgal_geometry_collection_geometry_n'</div><div>../liblwgeom/.libs/liblwgeom.so: undefined reference to `sfcgal_linestring_point_n'</div><div>../liblwgeom/.libs/liblwgeom.so: undefined reference to `sfcgal_polyhedral_surface_polygon_n'</div>
<div>../liblwgeom/.libs/liblwgeom.so: undefined reference to `sfcgal_triangle_set_vertex_from_xyz'</div><div>../liblwgeom/.libs/liblwgeom.so: undefined reference to `sfcgal_solid_shell_n'</div><div>../liblwgeom/.libs/liblwgeom.so: undefined reference to `sfcgal_solid_create_from_exterior_shell'</div>
</div><div>(and other similar undefined references)</div><div><br></div><div>What's going wrong? Why liblwgeom linking </div><div><br></div><div>I past also the readelf output run on liblwgeom.so</div><div>Thanks for your precious help,</div>
<div>Giovann</div><div><br></div><div><div>00066048  00000107 R_386_JUMP_SLOT        00000000   sfcgal_solid_num_shells</div><div>000660d0  00000a07 R_386_JUMP_SLOT        00000000   sfcgal_linestring_add_point</div><div>
00066174  00001407 R_386_JUMP_SLOT        00000000   sfcgal_linestring_num_points</div><div>000661a4  00001707 R_386_JUMP_SLOT        00000000   sfcgal_point_y</div><div>000661c8  00001907 R_386_JUMP_SLOT        00000000   sfcgal_geometry_collection_num_geometries</div>
<div>00066260  00002207 R_386_JUMP_SLOT        00000000   sfcgal_triangle_vertex</div><div>00066380  00002f07 R_386_JUMP_SLOT        00000000   sfcgal_triangle_set_vertex_from_xy</div><div>00066390  00003007 R_386_JUMP_SLOT        00000000   sfcgal_polygon_interior_ring_n</div>
<div>000663d0  00003407 R_386_JUMP_SLOT        00000000   sfcgal_solid_create_from_exterior_shell</div><div>00066484  00003e07 R_386_JUMP_SLOT        00000000   sfcgal_triangle_set_vertex_from_xyz</div><div>00066490  00004007 R_386_JUMP_SLOT        00000000   sfcgal_version</div>
<div>000664b8  00004407 R_386_JUMP_SLOT        00000000   sfcgal_polygon_exterior_ring</div><div>000664ec  00004707 R_386_JUMP_SLOT        00000000   sfcgal_point_create_from_xy</div><div>000664f4  00004807 R_386_JUMP_SLOT        00000000   sfcgal_geometry_collection_add_geometry</div>
<div>00066540  00004e07 R_386_JUMP_SLOT        00000000   sfcgal_linestring_create</div><div>000665d8  00005807 R_386_JUMP_SLOT        00000000   sfcgal_linestring_point_n</div><div>0006663c  00005d07 R_386_JUMP_SLOT        00000000   sfcgal_geometry_is_3d</div>
<div>00066660  00006007 R_386_JUMP_SLOT        00000000   sfcgal_geometry_is_empty</div><div>000666a0  00006407 R_386_JUMP_SLOT        00000000   sfcgal_multi_linestring_create</div><div>000666b8  00006707 R_386_JUMP_SLOT        00000000   sfcgal_point_x</div>
<div>000666d0  00006907 R_386_JUMP_SLOT        00000000   sfcgal_point_z</div><div>000666ec  00006a07 R_386_JUMP_SLOT        00000000   sfcgal_geometry_collection_geometry_n</div><div>00066738  00007007 R_386_JUMP_SLOT        00000000   sfcgal_polyhedral_surface_polygon_n</div>
<div>0006673c  00007107 R_386_JUMP_SLOT        00000000   sfcgal_multi_point_create</div><div>00066744  00007207 R_386_JUMP_SLOT        00000000   sfcgal_polygon_create</div><div>0006678c  00007807 R_386_JUMP_SLOT        00000000   sfcgal_multi_polygon_create</div>
<div>00066790  00007907 R_386_JUMP_SLOT        00000000   sfcgal_geometry_type_id</div><div>000667cc  00007d07 R_386_JUMP_SLOT        00000000   sfcgal_polyhedral_surface_add_polygon</div><div>000667d4  00007e07 R_386_JUMP_SLOT        00000000   sfcgal_polygon_num_interior_rings</div>
<div>000667fc  00007f07 R_386_JUMP_SLOT        00000000   sfcgal_geometry_collection_create</div><div>00066800  00008007 R_386_JUMP_SLOT        00000000   sfcgal_polygon_add_interior_ring</div><div>0006680c  00008307 R_386_JUMP_SLOT        00000000   sfcgal_polygon_create_from_exterior_ring</div>
<div>000668b8  00008e07 R_386_JUMP_SLOT        00000000   sfcgal_point_create_from_xyz</div><div>000668d0  00008f07 R_386_JUMP_SLOT        00000000   sfcgal_polyhedral_surface_create</div><div>0006694c  00009607 R_386_JUMP_SLOT        00000000   sfcgal_triangle_create</div>
<div>0006697c  00009907 R_386_JUMP_SLOT        00000000   sfcgal_triangulated_surface_create</div><div>0006699c  00009b07 R_386_JUMP_SLOT        00000000   sfcgal_triangulated_surface_num_triangles</div><div>000669d4  00009c07 R_386_JUMP_SLOT        00000000   sfcgal_triangulated_surface_triangle_n</div>
<div>000669e0  00009d07 R_386_JUMP_SLOT        00000000   sfcgal_geometry_delete</div><div>000669ec  00009e07 R_386_JUMP_SLOT        00000000   sfcgal_polyhedral_surface_num_polygons</div><div>00066a4c  0000a507 R_386_JUMP_SLOT        00000000   sfcgal_triangulated_surface_add_triangle</div>
<div>00066a64  0000a707 R_386_JUMP_SLOT        00000000   sfcgal_point_create</div><div>00066a6c  0000a807 R_386_JUMP_SLOT        00000000   sfcgal_solid_shell_n</div><div>     1: 00000000     0 NOTYPE  GLOBAL DEFAULT  UND sfcgal_solid_num_shells</div>
<div>    10: 00000000     0 NOTYPE  GLOBAL DEFAULT  UND sfcgal_linestring_add_point</div><div>    20: 00000000     0 NOTYPE  GLOBAL DEFAULT  UND sfcgal_linestring_num_points</div><div>    23: 00000000     0 NOTYPE  GLOBAL DEFAULT  UND sfcgal_point_y</div>
<div>    25: 00000000     0 NOTYPE  GLOBAL DEFAULT  UND sfcgal_geometry_collection_num_geometries</div><div>    34: 00000000     0 NOTYPE  GLOBAL DEFAULT  UND sfcgal_triangle_vertex</div><div>    47: 00000000     0 NOTYPE  GLOBAL DEFAULT  UND sfcgal_triangle_set_vertex_from_xy</div>
<div>    48: 00000000     0 NOTYPE  GLOBAL DEFAULT  UND sfcgal_polygon_interior_ring_n</div><div>    52: 00000000     0 NOTYPE  GLOBAL DEFAULT  UND sfcgal_solid_create_from_exterior_shell</div><div>    62: 00000000     0 NOTYPE  GLOBAL DEFAULT  UND sfcgal_triangle_set_vertex_from_xyz</div>
<div>    64: 00000000     0 NOTYPE  GLOBAL DEFAULT  UND sfcgal_version</div><div>    68: 00000000     0 NOTYPE  GLOBAL DEFAULT  UND sfcgal_polygon_exterior_ring</div><div>    71: 00000000     0 NOTYPE  GLOBAL DEFAULT  UND sfcgal_point_create_from_xy</div>
<div>    72: 00000000     0 NOTYPE  GLOBAL DEFAULT  UND sfcgal_geometry_collection_add_geometry</div><div>    78: 00000000     0 NOTYPE  GLOBAL DEFAULT  UND sfcgal_linestring_create</div><div>    88: 00000000     0 NOTYPE  GLOBAL DEFAULT  UND sfcgal_linestring_point_n</div>
<div>    93: 00000000     0 NOTYPE  GLOBAL DEFAULT  UND sfcgal_geometry_is_3d</div><div>    96: 00000000     0 NOTYPE  GLOBAL DEFAULT  UND sfcgal_geometry_is_empty</div><div>   100: 00000000     0 NOTYPE  GLOBAL DEFAULT  UND sfcgal_multi_linestring_create</div>
<div>   103: 00000000     0 NOTYPE  GLOBAL DEFAULT  UND sfcgal_point_x</div><div>   105: 00000000     0 NOTYPE  GLOBAL DEFAULT  UND sfcgal_point_z</div><div>   106: 00000000     0 NOTYPE  GLOBAL DEFAULT  UND sfcgal_geometry_collection_geometry_n</div>
<div>   112: 00000000     0 NOTYPE  GLOBAL DEFAULT  UND sfcgal_polyhedral_surface_polygon_n</div><div>   113: 00000000     0 NOTYPE  GLOBAL DEFAULT  UND sfcgal_multi_point_create</div><div>   114: 00000000     0 NOTYPE  GLOBAL DEFAULT  UND sfcgal_polygon_create</div>
<div>   120: 00000000     0 NOTYPE  GLOBAL DEFAULT  UND sfcgal_multi_polygon_create</div><div>   121: 00000000     0 NOTYPE  GLOBAL DEFAULT  UND sfcgal_geometry_type_id</div><div>   125: 00000000     0 NOTYPE  GLOBAL DEFAULT  UND sfcgal_polyhedral_surface_add_polygon</div>
<div>   126: 00000000     0 NOTYPE  GLOBAL DEFAULT  UND sfcgal_polygon_num_interior_rings</div><div>   127: 00000000     0 NOTYPE  GLOBAL DEFAULT  UND sfcgal_geometry_collection_create</div><div>   128: 00000000     0 NOTYPE  GLOBAL DEFAULT  UND sfcgal_polygon_add_interior_ring</div>
<div>   131: 00000000     0 NOTYPE  GLOBAL DEFAULT  UND sfcgal_polygon_create_from_exterior_ring</div><div>   142: 00000000     0 NOTYPE  GLOBAL DEFAULT  UND sfcgal_point_create_from_xyz</div><div>   143: 00000000     0 NOTYPE  GLOBAL DEFAULT  UND sfcgal_polyhedral_surface_create</div>
<div>   150: 00000000     0 NOTYPE  GLOBAL DEFAULT  UND sfcgal_triangle_create</div><div>   153: 00000000     0 NOTYPE  GLOBAL DEFAULT  UND sfcgal_triangulated_surface_create</div><div>   155: 00000000     0 NOTYPE  GLOBAL DEFAULT  UND sfcgal_triangulated_surface_num_triangles</div>
<div>   156: 00000000     0 NOTYPE  GLOBAL DEFAULT  UND sfcgal_triangulated_surface_triangle_n</div><div>   157: 00000000     0 NOTYPE  GLOBAL DEFAULT  UND sfcgal_geometry_delete</div><div>   158: 00000000     0 NOTYPE  GLOBAL DEFAULT  UND sfcgal_polyhedral_surface_num_polygons</div>
<div>   165: 00000000     0 NOTYPE  GLOBAL DEFAULT  UND sfcgal_triangulated_surface_add_triangle</div><div>   167: 00000000     0 NOTYPE  GLOBAL DEFAULT  UND sfcgal_point_create</div><div>   168: 00000000     0 NOTYPE  GLOBAL DEFAULT  UND sfcgal_solid_shell_n</div>
<div>   543: 0004be90    25 FUNC    GLOBAL DEFAULT   11 lwgeom_sfcgal_version</div><div>   758: 0004c840   198 FUNC    GLOBAL DEFAULT   11 lwgeom_sfcgal_noop</div><div>   923: 00000000     0 FILE    LOCAL  DEFAULT  ABS lwgeom_sfcgal.c</div>
<div>   989: 00000000     0 NOTYPE  GLOBAL DEFAULT  UND sfcgal_solid_num_shells</div><div>  1030: 00000000     0 NOTYPE  GLOBAL DEFAULT  UND sfcgal_linestring_add_point</div><div>  1079: 00000000     0 NOTYPE  GLOBAL DEFAULT  UND sfcgal_linestring_num_points</div>
<div>  1095: 00000000     0 NOTYPE  GLOBAL DEFAULT  UND sfcgal_point_y</div><div>  1105: 00000000     0 NOTYPE  GLOBAL DEFAULT  UND sfcgal_geometry_collection_num_geometries</div><div>  1162: 00000000     0 NOTYPE  GLOBAL DEFAULT  UND sfcgal_triangle_vertex</div>
<div>  1255: 00000000     0 NOTYPE  GLOBAL DEFAULT  UND sfcgal_triangle_set_vertex_from_xy</div><div>  1263: 00000000     0 NOTYPE  GLOBAL DEFAULT  UND sfcgal_polygon_interior_ring_n</div><div>  1286: 00000000     0 NOTYPE  GLOBAL DEFAULT  UND sfcgal_solid_create_from_exterior_shell</div>
<div>  1312: 0004c840   198 FUNC    GLOBAL DEFAULT   11 lwgeom_sfcgal_noop</div><div>  1343: 00000000     0 NOTYPE  GLOBAL DEFAULT  UND sfcgal_triangle_set_vertex_from_xyz</div><div>  1348: 00000000     0 NOTYPE  GLOBAL DEFAULT  UND sfcgal_version</div>
<div>  1362: 00000000     0 NOTYPE  GLOBAL DEFAULT  UND sfcgal_polygon_exterior_ring</div><div>  1383: 00000000     0 NOTYPE  GLOBAL DEFAULT  UND sfcgal_point_create_from_xy</div><div>  1386: 00000000     0 NOTYPE  GLOBAL DEFAULT  UND sfcgal_geometry_collection_add_geometry</div>
<div>  1412: 00000000     0 NOTYPE  GLOBAL DEFAULT  UND sfcgal_linestring_create</div><div>  1464: 00000000     0 NOTYPE  GLOBAL DEFAULT  UND sfcgal_linestring_point_n</div><div>  1492: 00000000     0 NOTYPE  GLOBAL DEFAULT  UND sfcgal_geometry_is_3d</div>
<div>  1497: 0004be90    25 FUNC    GLOBAL DEFAULT   11 lwgeom_sfcgal_version</div><div>  1503: 00000000     0 NOTYPE  GLOBAL DEFAULT  UND sfcgal_geometry_is_empty</div><div>  1522: 00000000     0 NOTYPE  GLOBAL DEFAULT  UND sfcgal_multi_linestring_create</div>
<div>  1533: 00000000     0 NOTYPE  GLOBAL DEFAULT  UND sfcgal_point_x</div><div>  1542: 00000000     0 NOTYPE  GLOBAL DEFAULT  UND sfcgal_point_z</div><div>  1549: 00000000     0 NOTYPE  GLOBAL DEFAULT  UND sfcgal_geometry_collection_geometry_n</div>
<div>  1575: 00000000     0 NOTYPE  GLOBAL DEFAULT  UND sfcgal_polyhedral_surface_polygon_n</div><div>  1577: 00000000     0 NOTYPE  GLOBAL DEFAULT  UND sfcgal_multi_point_create</div><div>  1580: 00000000     0 NOTYPE  GLOBAL DEFAULT  UND sfcgal_polygon_create</div>
<div>  1600: 00000000     0 NOTYPE  GLOBAL DEFAULT  UND sfcgal_multi_polygon_create</div><div>  1601: 00000000     0 NOTYPE  GLOBAL DEFAULT  UND sfcgal_geometry_type_id</div><div>  1618: 00000000     0 NOTYPE  GLOBAL DEFAULT  UND sfcgal_polyhedral_surface_add_polygon</div>
<div>  1621: 00000000     0 NOTYPE  GLOBAL DEFAULT  UND sfcgal_polygon_num_interior_rings</div><div>  1635: 00000000     0 NOTYPE  GLOBAL DEFAULT  UND sfcgal_geometry_collection_create</div><div>  1636: 00000000     0 NOTYPE  GLOBAL DEFAULT  UND sfcgal_polygon_add_interior_ring</div>
<div>  1639: 00000000     0 NOTYPE  GLOBAL DEFAULT  UND sfcgal_polygon_create_from_exterior_ring</div><div>  1696: 00000000     0 NOTYPE  GLOBAL DEFAULT  UND sfcgal_point_create_from_xyz</div><div>  1703: 00000000     0 NOTYPE  GLOBAL DEFAULT  UND sfcgal_polyhedral_surface_create</div>
<div>  1743: 00000000     0 NOTYPE  GLOBAL DEFAULT  UND sfcgal_triangle_create</div><div>  1759: 00000000     0 NOTYPE  GLOBAL DEFAULT  UND sfcgal_triangulated_surface_create</div><div>  1770: 00000000     0 NOTYPE  GLOBAL DEFAULT  UND sfcgal_triangulated_surface_num_triangles</div>
<div>  1788: 00000000     0 NOTYPE  GLOBAL DEFAULT  UND sfcgal_triangulated_surface_triangle_n</div><div>  1791: 00000000     0 NOTYPE  GLOBAL DEFAULT  UND sfcgal_geometry_delete</div><div>  1794: 00000000     0 NOTYPE  GLOBAL DEFAULT  UND sfcgal_polyhedral_surface_num_polygons</div>
<div>  1825: 00000000     0 NOTYPE  GLOBAL DEFAULT  UND sfcgal_triangulated_surface_add_triangle</div><div>  1831: 00000000     0 NOTYPE  GLOBAL DEFAULT  UND sfcgal_point_create</div><div>  1833: 00000000     0 NOTYPE  GLOBAL DEFAULT  UND sfcgal_solid_shell_n</div>
</div><div><br></div>-- <br><div dir="ltr">Giovanni Allegri<br><a href="http://about.me/giovanniallegri" target="_blank">http://about.me/giovanniallegri</a><div>Twitter: <a href="https://twitter.com/_giohappy_" target="_blank">https://twitter.com/_giohappy_</a></div>
<div>blog: <a href="http://blog.spaziogis.it" target="_blank">http://blog.spaziogis.it</a><br>GEO+ geomatica in Italia <a href="http://bit.ly/GEOplus" target="_blank">http://bit.ly/GEOplus</a></div></div>
</div></div>