[Gdal-dev] Error building gdal/ogr: undefined reference to
`_gfortran_ ...
Hernán De Angelis
dhdeangelis.listas at gmail.com
Mon Apr 23 08:16:08 EDT 2007
Hi Mateusz,
Thanks for your fast answer. Below you will find the configure command
and the output. I am afraid I do not undesrtand the epimetheus thing.
Thanks!
My configure command is:
./configure --with-pg=/usr/local/pgsql/bin/pg_config
--with-netcdf=/usr/local --with-png=/usr/lib --with-libtiff=internal
--with-geotiff=/usr/local --with-jpeg=/usr/lib
--with-geos=/usr/local/bin/geos-config --with-perl --with-python
--with-sqlite --with-odbc
and the output is:
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking target system type... i686-pc-linux-gnu
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ANSI C... none needed
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking for a sed that does not truncate output... /usr/bin/sed
checking for egrep... grep -E
checking for ld used by gcc... /usr/i586-suse-linux/bin/ld
checking if the linker (/usr/i586-suse-linux/bin/ld) is GNU ld... yes
checking for /usr/i586-suse-linux/bin/ld option to reload object files... -r
checking for BSD-compatible nm... /usr/bin/nm -B
checking whether ln -s works... yes
checking how to recognise dependent libraries... pass_all
checking how to run the C preprocessor... gcc -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking dlfcn.h usability... yes
checking dlfcn.h presence... yes
checking for dlfcn.h... yes
checking how to run the C++ preprocessor... g++ -E
checking for g77... g77
checking whether we are using the GNU Fortran 77 compiler... yes
checking whether g77 accepts -g... yes
checking the maximum length of command line arguments... 32768
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for objdir... .libs
checking for ar... ar
checking for ranlib... ranlib
checking for strip... strip
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC
checking if gcc PIC flag -fPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking whether the gcc linker (/usr/i586-suse-linux/bin/ld) supports
shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
configure: creating libtool
appending configuration tag "CXX" to libtool
checking for ld used by g++... /usr/i586-suse-linux/bin/ld
checking if the linker (/usr/i586-suse-linux/bin/ld) is GNU ld... yes
checking whether the g++ linker (/usr/i586-suse-linux/bin/ld) supports
shared libraries... yes
checking for g++ option to produce PIC... -fPIC
checking if g++ PIC flag -fPIC works... yes
checking if g++ static flag -static works... yes
checking if g++ supports -c -o file.o... yes
checking whether the g++ linker (/usr/i586-suse-linux/bin/ld) supports
shared libraries... yes
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
appending configuration tag "F77" to libtool
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking for g77 option to produce PIC... -fPIC
checking if g77 PIC flag -fPIC works... yes
checking if g77 static flag -static works... yes
checking if g77 supports -c -o file.o... yes
checking whether the g77 linker (/usr/i586-suse-linux/bin/ld) supports
shared libraries... yes
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking for dlopen in -ldl... yes
checking for nanosleep in -lrt... yes
checking for sin in -lm... yes
checking for ANSI C header files... (cached) yes
checking assert.h usability... yes
checking assert.h presence... yes
checking for assert.h... yes
checking fcntl.h usability... yes
checking fcntl.h presence... yes
checking for fcntl.h... yes
checking for unistd.h... (cached) yes
checking dbmalloc.h usability... no
checking dbmalloc.h presence... no
checking for dbmalloc.h... no
checking for dlfcn.h... (cached) yes
checking for stdint.h... (cached) yes
checking limits.h usability... yes
checking limits.h presence... yes
checking for limits.h... yes
checking locale.h usability... yes
checking locale.h presence... yes
checking for locale.h... yes
checking values.h usability... yes
checking values.h presence... yes
checking for values.h... yes
checking float.h usability... yes
checking float.h presence... yes
checking for float.h... yes
checking errno.h usability... yes
checking errno.h presence... yes
checking for errno.h... yes
checking direct.h usability... no
checking direct.h presence... no
checking for direct.h... no
checking whether byte ordering is bigendian... no
checking for 64bit integer type... long long
checking for 64bit file io... yes
checking for stat64... yes
checking for fopen64... yes
checking for int... yes
checking size of int... 4
checking for long... yes
checking size of long... 4
checking for int8... no
checking for int16... no
checking for int32... no
checking native cpu bit order... lsb2msb
checking for vprintf... yes
checking for _doprnt... no
checking for snprintf... yes
checking for vsnprintf... yes
checking for atoll... yes
checking for copysign... yes
checking for copysignf... yes
checking for strtof... yes
checking for nan... yes
checking for nanf... yes
checking for getcwd... yes
checking whether nan is declared... no
checking whether nanf is declared... no
checking for gmtime_r... yes
checking for localtime_r... yes
checking for setlocale... yes
checking for local include/lib path... none
configure: checking whether we should include thread/mutex support......
thread safe support disabled.
checking for deflateInit_ in -lz... yes
using pre-installed libz
checking for PostgreSQL... yes
checking for PQconnectdb in -lpq... yes
checking for PQputCopyData in -lpq... yes
checking for G_gisinit_2 in -lgrass5... no
checking for ffopen in -lcfitsio... no
libcfitsio not found - FITS support disabled
checking for Mopen in -lcsf... no
checking csf.h usability... no
checking csf.h presence... no
checking for csf.h... no
using internal csf code.
using libnetcdf from /usr/local.
using libpng from /usr/lib.
using internal TIFF code.
checking for XTIFFClientOpen in -lgeotiff... yes
using libgeotiff from /usr/local.
using libjpeg from /usr/lib.
checking for DGifOpenFileName in -lgif... no
using internal gif code.
checking for cln_GetLayerCapabilities in -logdi31... no
checking for FMEObjects... no
checking for SDreaddata in -lmfhdf... no
checking for H5Fopen in -lhdf5... no
checking for jpc_decode in -ljasper... yes
checking for jp2_decode in -ljasper... yes
checking for pgx_decode in -ljasper... yes
checking for jp2_encode_uuid in -ljasper... no
configure: hacked JasPer version not found, GeoJP2 disabled.
checking for NCScbmOpenFileView in -lNCSEcw... no
checking for NCScbmOpenFileView in -lecwj2... no
checking for Kakadu JPEG2000 support... not requested.
configure: MrSID support disabled.
checking for BSB ... enabled
checking for OGR ... enabled
checking for MySQL... no
checking for Xerces C++... disabled
checking for SQLConnect in -lodbc... yes
checking for SQLInstallDriverEx in -lodbcinst... yes
checking if Oracle support is enabled... no
checking Checking for DODS... disabled
checking for curl-config... no
checking Checking for SQLite... enabled
checking Checking for DWGdirect... disabled
configure: IBM Informix DataBlade not supported.
configure: checking whether we should include ESRI SDE support...
ESRI SDE support not requested.
checking for geos-config... /usr/local/bin/geos-config
checking for GEOS version >= 2.2.0... yes
checking for GEOSversion in -lgeos_c... yes
configure: using GEOS 2.2.x+ C API
checking how to link PROJ.4 library... link dynamically.
checking GDAL version information from gdal_version.h: 1.4.1
checking for SWIG perl bindings... enabled
checking for SWIG php bindings... disabled
checking for SWIG ruby bindings... disabled
checking for NG SWIG python bindings... disabled
checking for python... python
checking where python Makefiles are... found
checking Python makefile... found
checking where .py files should go... /usr/lib/python2.5/site-packages
checking for python headers... found
checking definitions from Python makefile... done
checking for special pymod link hacks... default
checking for NumPy include files... found
checking if local/include already standard... no, everything is ok
configure: creating ./config.status
config.status: creating GDALmake.opt
config.status: creating port/cpl_config.h
GDAL is now configured for i686-pc-linux-gnu
Installation directory: /usr/local
C compiler: gcc -O2
C++ compiler: g++ -O2
LIBTOOL support: yes
LIBZ support: external
GRASS support: no
CFITSIO support: no
PCRaster support: internal
NETCDF support: yes
LIBPNG support: external
LIBTIFF support: internal
LIBGEOTIFF support: external
LIBJPEG support: external
LIBGIF support: internal
OGDI support: no
HDF4 support: no
HDF5 support: no
KAKADU support: no
JASPER support: yes (GeoJP2=no)
ECW support: no
MrSID support: no
CURL support (wcs): no
POSTGRESQL support: yes
MySQL support: no
XERCES support: no
ODBC support: yes
PGEO support: yes
OCI support: no
SDE support: no
DODS support: no
SQLite support: yes
DWGdirect support no
PANORAMA GIS support: no
INFORMIX DataBlade support:no
GEOS support: yes
Statically link PROJ.4: no
Traditional Python: yes
NG SWIG Bindings: perl
enable OGR building: yes
----------------------------------------------------------
2007/4/23, Mateusz Loskot <mateusz at loskot.net>:
> Hernán De Angelis wrote:
> > Hi all,
> >
> > I am trying to build gdal/ogr. I did many times before without
> > problems but this time I continuously get this error:
> >
> > g++ ogrinfo.o -o .libs/ogrinfo /usr/local/src/gdal/.libs/libgdal.so
> > -L/usr/local/lib -L/usr/lib -L/usr/lib/lib -ljpeg -lgeotiff
> > -L/usr/local -L/usr/local/pgsql/lib -lpq -lz -lrt -ldl -lpthread
> >
> > /usr/local/src/gdal/.libs/libgdal.so: undefined reference to
> > `_gfortran_shape_4'
> > /usr/local/src/gdal/.libs/libgdal.so: undefined reference to
> > `_gfortran_internal_malloc'
> > /usr/local/src/gdal/.libs/libgdal.so: undefined reference to
> > `_gfortran_size0'
> > /usr/local/src/gdal/.libs/libgdal.so: undefined reference to
> > `_gfortran_reshape_4'
> > /usr/local/src/gdal/.libs/libgdal.so: undefined reference to
> > `_gfortran_internal_unpack'
> > /usr/local/src/gdal/.libs/libgdal.so: undefined reference to
> > `_gfortran_internal_pack'
> > /usr/local/src/gdal/.libs/libgdal.so: undefined reference to
> > `_gfortran_string_trim'
> > /usr/local/src/gdal/.libs/libgdal.so: undefined reference to
> > `_gfortran_string_len_trim'
> > /usr/local/src/gdal/.libs/libgdal.so: undefined reference to
> > `_gfortran_copy_string'
> > /usr/local/src/gdal/.libs/libgdal.so: undefined reference to
> > `_gfortran_internal_free'
> > collect2: ld returned 1 exit status
> > make[1]: *** [ogrinfo] Error 1
> > make[1]: Leaving directory `/usr/local/src/gdal/ogr'
> > make: *** [ogr-apps] Error 2
> >
> > This happens almost at the end of the make process, when building ogr.
> > I am using openSUSE 10.2, gfortran-4.1 and gcc-4.1. The error is the
> > same in both gdal-1.4.1 and svn checkout, so it is likely an issue in
> > my machine. I have no clue about the reason, so any hint will be
> > appreciated.
>
> I tested GDAL SVN building it with libtool support and it works for me.
> Also, as you can see the buildbot slave called epimetheus builds with
> libtool support too:
>
> http://buildbot.osgeo.org:8500/epimetheus-full/builds/187
>
> I'm not sure what is the fortran used for in your case.
>
> Could you include full command of ./configure you use
> and output of the configure summary?
>
> Cheers
> --
> Mateusz Loskot
> http://mateusz.loskot.net
>
--
Hernán De Angelis
Linux user # 397217
More information about the Gdal-dev
mailing list