[Gdal-dev] GDAL 1.2.0 Solaris build

Frédéric Trastour support at geoimage.fr
Mon Mar 8 06:35:54 EST 2004


Hello,
I have tested with the new configure script (from cvs) :

./configure --prefix=`pwd`/RELEASE \
--with-libtiff=$PORTAGE/LIBRAIRIES/libTIFF/src/SOLARIS2_6 \
--with-geotiff=$PORTAGE/LIBRAIRIES/libGEOTIFF/src/SOLARIS2_6 \
--with-local=$PORTAGE/LIBRAIRIES/libHDF/src/SOLARIS \
--with-threads="-lposix4 -lnsl" \
--with-hdf4=$PORTAGE/LIBRAIRIES/libHDF/src/SOLARIS \
--without-jasper --with-jpeg=internal --with-libz=internal \
--with-png=internal --without-libtool --without-ld-shared \
--with-static-proj4=/home/lisbonne/1/GEOIMAGE_SRC/LIBRAIRIES/libPROJ/src/SOLARIS2_6

Where /home/lisbonne/1/GEOIMAGE_SRC/LIBRAIRIES/libPROJ/src/SOLARIS2_6 is the installation
directory of Proj4 created by 'make install'.

The content of this directory :
  bin:     cs2cs geod invgeod invproj nad2bin nad2nad proj
  include:    nad_list.h proj_api.h projects.h
  lib: libproj.a libproj.la
  man:man1 man3
  share:proj

But configure returns :

   Statically link PROJ.4: no

In the file GDAL.make.opt :
--------------------------------------------------------------------------------
#
# PROJ.4 stuff
#
PROJ_STATIC = no
ifeq ($(PROJ_STATIC),yes)
PROJ_FLAGS = -DPROJ_STATIC
endif
PROJ_INCLUDE = -I/home/lisbonne/1/GEOIMAGE_SRC/LIBRAIRIES/libPROJ/src/SOLARIS2_6/include
GDAL_LIBS = $(GDAL_LIB)
ifeq ($(OGR_ENABLED),yes)
GDAL_LIBS := $(GDAL_LIB) $(PG_LIB) $(OCI_LIB) $(GDAL_LIBS)
endif
--------------------------------------------------------------------------------

It seems that find the include but not the library...
In the file "config.log", the "src" sub-directory is tested :

--------------------------------------------------------------------------------
configure:23474: checking how to link PROJ.4 library
configure:23493: result: link statically.
configure:23573: checking for pj_init in -lproj
configure:23603: gcc -o
conftest -g -O2 -I/home/lisbonne/1/GEOIMAGE_SRC/LIBRAIRIES/libHDF/src/SOLARIS/include -DCPL_MULTIPROC_PTHREAD -I/home/l
isbonne/1/GEOIMAGE_SRC/LIBRAIRIES/libHDF/src/SOLARIS/include
conftest.c -lproj -L/home/lisbonne/1/GEOIMAGE_SRC/LIBRAIRIES/libPROJ/src/SOLARIS2
_6/src -lproj -L/home/lisbonne/1/GEOIMAGE_SRC/LIBRAIRIES/libHDF/src/SOLARIS/lib -lmfhdf -ldf -L/home/lisbonne/1/GEOIMAGE
_SRC/LIBRAIRIES/libGEOTI
FF/src/SOLARIS2_6 -lgeotiff -L/home/lisbonne/1/GEOIMAGE_SRC/LIBRAIRIES/libTIFF/src/SOLARIS2_6 -ltiff -lposix4 -lnsl -lm 
-ldl -L/home/lisbonne/1
/GEOIMAGE_SRC/LIBRAIRIES/libHDF/src/SOLARIS/lib >&5
ld: fatal: library -lproj: not found
ld: fatal: library -lproj: not found
ld: fatal: File processing errors. No output written to conftest
collect2: ld returned 1 exit status
configure:23609: $? = 1
configure: failed program was:
| /* confdefs.h. */
|
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| #define STDC_HEADERS 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_UNISTD_H 1
| #define HAVE_DLFCN_H 1
| #define HAVE_LIBDL 1
| #define HAVE_LIBM 1
| #define STDC_HEADERS 1
| #define HAVE_FCNTL_H 1
| #define HAVE_UNISTD_H 1
| #define HAVE_DLFCN_H 1
| #define HAVE_LIMITS_H 1
| #define HAVE_LOCALE_H 1
| #define WORDS_BIGENDIAN 1
| #define HAVE_VPRINTF 1
| #define HAVE_DOPRNT 1
| #define HAVE_VSNPRINTF 1
| #define HAVE_SNPRINTF 1
| #define HAVE_LONG_LONG 1
| #define UNIX_STDIO_64 1
| #define VSI_LARGE_API_SUPPORTED 1
| #define VSI_FTELL64 ftello64
| #define VSI_FSEEK64 fseeko64
| /* end confdefs.h. */
|
| /* Override any gcc2 internal prototype to avoid an error. */
| #ifdef __cplusplus
| extern "C"
| #endif
| /* We use char because int might match the return type of a gcc2
| builtin and then its argument prototype would still apply. */
| char pj_init ();
| int
| main ()
| {
| pj_init ();
| ;
| return 0;
| }
configure:23634: result: no
configure:23955: checking GDAL version
configure:23975: result: 1.2.0

--------------------------------------------------------------------------------

But it seems that the others candidate directories are not tested...
Oh, I just see something in configure.in :

--------------------------------------------------------------------------------
if test "PROJ_STATIC" = "no"; then
LIBS="-L$with_static_proj4/lib $PROJ_LIB $ORIG_LIBS"
AC_CHECK_LIB(proj,pj_init,PROJ_STATIC=yes,PROJ_STATIC=no,)
fi
--------------------------------------------------------------------------------

It seems that the $ is missing before PROJ_STATIC...and so the test is always
false and the other directories are never tested...
What does i need to recreate configure from configure.in ?
Thanks in advance,
Frederic.

----- Original Message ----- 
From: "Andrey Kiselev" <dron at ak4719.spb.edu>
To: <gdal-dev at remotesensing.org>
Sent: Wednesday, March 03, 2004 12:54 PM
Subject: Re: [Gdal-dev] GDAL 1.2.0 Solaris build


> On Tue, Mar 02, 2004 at 05:22:44PM +0100, Fr?d?ric Trastour wrote:
> > The problem is that "/src" is automatically appended to the specified
> > directory. The "make install" command in the PROJ4 build tree doesn't
> > create a src dir in the install tree ( only include, lib, bin and
> > share - and it's ok). So I have to create an 'src' in the PROJ
> > installation tree and link the libproj.a library from lib to src.
>
> I have commited a few tweaks for --with-static-proj4 test, could you
> test this again?
>
> -- 
> Andrey V. Kiselev
> Home phone:  +7 812 5274898  ICQ# 26871517
> _______________________________________________
> Gdal-dev mailing list
> Gdal-dev at remotesensing.org
> http://remotesensing.org/mailman/listinfo/gdal-dev





More information about the Gdal-dev mailing list