Opened 14 years ago

Closed 9 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
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 Changed 14 years ago by Daniel Morissette

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 Changed 14 years ago by warmerdam

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 Changed 14 years ago by warmerdam

I take that last comment back .. still investigating. 

comment:4 Changed 14 years ago by warmerdam

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 Changed 14 years ago by warmerdam

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.

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 Changed 14 years ago by Daniel Morissette

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 Changed 14 years ago by Daniel Morissette

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 Changed 11 years ago by Mateusz Łoskot

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

comment:9 Changed 9 years ago by Even Rouault

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