Opened 20 years ago

Closed 14 years ago

#498 closed defect (fixed)

GDAL 1.2.0a - Build problem w/ libtiff on AIX 4.3.3

Reported by: Daniel Morissette Owned by: warmerdam
Priority: high Milestone:
Component: default Version: unspecified
Severity: normal Keywords:
Cc: zak-ms@…, Mateusz Łoskot

Description (last modified by Mateusz Łoskot)

Starting a new build og GDAL 1.2.0a on AIX 4.3.3 w/ GCC 3.3.2

I ran into the following error with the internal libtiff:

make[3]: Entering directory `/home/src/gdal-1.2.0a/frmts/gtiff/libgeotiff'
/bin/sh ../../../libtool --mode=compile gcc -c -I../../../port -I../libtiff
-Wall  -O2     xtiff.c -o ../../o/xtiff.o
 gcc -c -I../../../port -I../libtiff -Wall -O2 xtiff.c  -DPIC -o
../../o/.libs/xtiff.o
In file included from ../libtiff/tiffio.h:33,
                 from xtiffio.h:11,
                 from xtiff.c:17:
../libtiff/tiff.h:75: warning: redefinition of `int8'
/usr/include/sys/inttypes.h:622: warning: `int8' previously declared here
../libtiff/tiff.h:80: warning: redefinition of `int16'
/usr/include/sys/inttypes.h:623: warning: `int16' previously declared here
../libtiff/tiff.h:86: error: conflicting types for `int32'
/usr/include/sys/inttypes.h:624: error: previous declaration of `int32'
make[3]: *** [../../o/xtiff.o] Error 1
make[3]: Leaving directory `/home/src/gdal-1.2.0a/frmts/gtiff/libgeotiff'
make[2]: *** [lib-geotiff] Error 2
make[2]: Leaving directory `/home/src/gdal-1.2.0a/frmts/gtiff'
make[1]: *** [gtiff-install-obj] Error 2
make[1]: Leaving directory `/home/src/gdal-1.2.0a/frmts'
make: *** [frmts-target] Error 2

Change History (9)

comment:1 by Daniel Morissette, 20 years ago

OK, I see in tiff.h that this is a known issue: #39

Frank, would you like access to our AIX box to test this?

comment:2 by warmerdam, 20 years ago

In the short term, the work around is to edit gdal/frmts/gtiff/libtiff/tiff.h
and remove the check for USING_VISUALAGE.

Change this:

#if defined(_H_INTTYPES) && defined(_ALL_SOURCE) && defined(USING_VISUALAGE)

To this:
#if defined(_H_INTTYPES) && defined(_ALL_SOURCE)


comment:3 by warmerdam, 20 years ago

I take that last comment back .. still investigating. 

comment:4 by warmerdam, 20 years ago

After a small adjustment to gtiff/tif_ovrcache.cpp, and the above mentioned
modification, things seems to compile fine on AIX. 
The change to tif_ovrcache.cpp has been committed.  The other change has not,
since it presumably would break things in other circumstances. 

comment:5 by warmerdam, 20 years ago

Note, a 1.2.0a5 release has been prepared that should work out of the box 
for --without-libtool builds on AIX ... with the exception of still needing
to manually patch gdal/frmts/gtiff/libtiff/tiff.h.


ftp://ftp.remotesensing.org/gdal/libgdal-1.2.0a5.tar.gz

I was going to try building MapServer to verify it works but I gave up 
when I realized I would need to build GD too. 

The following line does build a proper gdalinfo executable though:

g++ `gdal-config --cflags` gdalinfo.c `gdal-config --libs` -o gdalinfo
 


comment:6 by Daniel Morissette, 20 years ago

Thanks Frank.  I'll give this a try this afternoon... and once GDAL is built
then my next target is MapServer, so we'll know soon enough if MapServer does build.

BTW, a static build is fine for me.  That's what most libraries seem to do
anyway on this platform.

comment:7 by Daniel Morissette, 20 years ago

I just wanted to confirm that the static build (--without-libtool) worked fine
*after patching tiff.h* and I was also able to produce maps using MapServer
reading a TIFF layer through GDAL. 
My config options were:
./configure --without-libtool --prefix=/opt/mapserver --with-png=/opt/mapserver
--with-libz=/opt/mapserver --with-jpeg=/opt/mapserver --with-odbc=/opt/mapserver

comment:8 by Mateusz Łoskot, 17 years ago

Cc: Mateusz Łoskot added
Description: modified (diff)

comment:9 by Even Rouault, 14 years ago

Resolution: fixed
Status: assignedclosed
Note: See TracTickets for help on using tickets.