Building GeoTIFF with CMake

I’ve just submitted ticket to GeoTIFF Trac system with patch providing CMake build configuration for GeoTIFF library and utility programs.

#17CMake build configuration for GeoTIFF

It also includes FindGeoTIFF module for CMake users that need to determine availability of libgeotiff in their projects. Tests and improvements are welcome.

libgeotiff lesson for today

Doing final tests of libLAS on Linux (Ubuntu 7.04), before Hobu will release 1.0.0, I attempted to build it with latest libgeotiff 1.2.5. I moved my fingers on keyboard and did ./configure && make, shortly then I saw strange looking error message:

/usr/bin/ld: makegeo: hidden symbol `__stack_chk_fail_local' in /usr/lib/libc_nonshared.a(stack_chk_fail_local.oS) is referenced by DSO
/usr/bin/ld: final link failed: Nonrepresentable section on output
collect2: ld returned 1 exit status

Google is your friend, so in a few seconds I knew what’s going wrong. ./configure sets Makefile to call ld -shared. However, it does not work with GCC 4, because ld linker does not include all required references to other shared libraries. Simply, GCC linker driver seems to handle shared references better, than bare ld.

The conclusion is, that if you use GCC 4.x and you want to build libgeotiff, configure it this way:

./configure --with-ld-shared="gcc -shared"

Update July 31, 2008: Another solution is to add -fno-stack-protector option to CFLAGS and CXXFLAGS. Regarding Ubuntu Linux, this issue seems to be related to enabled SSP support (see also Ubuntu Wiki) available in GCC 4.1.

libgeotiff 1.2.5

libgeotiff 1.2.5 has been released.

Libgeotiff is an open source library normally hosted on top of libtiff for reading, and writing GeoTIFF information tags.

As officially announced, the new version includes a few bug fixes and improvements, coordinate systems dictionaries have been updated to EPSG 6.17 dataset.

There is also a new feature called Simple Tags Interface to make it easier to use libgeotiff to process geotiff tags in other file format. This new interface is used in libLAS to support LAS files georeferencing.

Packages of libgeotiff 1.2.5 are hosted on OSGeo Download server:
http://download.osgeo.org/geotiff/libgeotiff/

A week ago, Frank Warmerdam proposed to make GeoTIFF a subproject of OSGeo MetaCRS project, because of a few reasons:

  • libgeotiff is primary about CRS management
  • it is too small project to join OSGeo on it’s own
  • EPSG handling provided by libgeotiff is foundational number of FOSS4G projects (GDAL, QGIS, PROJ.4 and PostGIS, libLAS)

Motion: Libgeotiff as a MetaCRS sub-project was not waiting long and eventually has gained full acceptance from Project Steering Committee of MetaCRS, means passed.

Since July 28, 2008 GeoTIFF project is now a part of MetaCRS initiative lead by OSGeo community.