Opened 16 years ago
Closed 10 years ago
#2375 closed defect (wontfix)
Error Compiling GDAL-1.5.1 on AIX 5.3
Reported by: | tconrad | Owned by: | warmerdam |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | default | Version: | 1.5.1 |
Severity: | normal | Keywords: | |
Cc: |
Description
Hello:
I'm not sure what is causing this error, but here it is:
exec: /usr/vac/exe/xlcentry(/usr/vac/exe/xlcentry,-qlanglvl=extc99,-qcpluscmt,-qkeyword=inline,-qalias=ansi,-D_AIX,-D_AIX32,-D_AIX41,-D_AIX43,-D_AIX50,-D_AIX51,-D_AIX52,-D_AIX53,-D_IBMR2,-D_POWER,-I../../port,-I../libtiff,-DOGR_ENABLED,-I/opt/apps/ots/include,-I/opt/apps/ots/hdf/v4/include,-I/opt/apps/ots/gdal/port,-I/opt/apps/ots/jpeg/jpeg2000,-I/opt/apps/ots/jpeg/jpeg2000/include,-I/opt/apps/ots/netCDF/v3.6.2,-I/opt/apps/ots/netCDF/v3.6.2/include,-D_LARGE_FILES,-DDEBUG,-DPIC,-qosvar=aix.5.3,-qalias=ansi,-q64,-qlargetype,-q64,-qlargetype,-qmaxmem=-1,-qarch=pwr5x,-g,-qasm_as=/bin/as,-qc_stdinc=/usr/vac/include:/usr/include,-qvac_include_path=/usr/vac/include,-o../../o/.libs/xtiff.o,xtiff.c,/tmp/xlcW0KlMgqa,/tmp/xlcW1KoMgqb,/dev/null,/tmp/xlcLKpMgqeF.lst,/dev/null,/tmp/xlcW2KoMgqc,NULL) "../libtiff/tiff.h", line 77.23: 1506-334 (S) Identifier int64 has already been defined on line 622 of "/usr/include/sys/inttypes.h".
I'm compiling gdal-1.5.1 on AIX 5.3 PowerPC_POWER5 architecture. I will attach some log files.
Any help is much appreciated.
---Thanx
---TConrad
Attachments (6)
Change History (20)
by , 16 years ago
comment:1 by , 16 years ago
It looks like on your system int64 type is defined in /usr/include/sys/inttypes.h.
As a workaround, you can probably try to comment the following line in $(GDAL_ROOT)/frmts/gtiff/libtiff/tiff.h:
typedef TIFF_INT64_T int64;
But a better fix should be found. I see that in standalone libtiff, there is a configure test for int8, int16, int32. Maybe that's somehow related to that ?
comment:2 by , 16 years ago
Okay, I commented out the int64 line in $(GDAL_ROOT)/frmts/gtiff/libtiff/tiff.h and re-compiled gdal. Received a different error message (see attached log file gmake.out2):
exec: /usr/vacpp/exe/xlCentry(/usr/vacpp/exe/xlCentry,-D_AIX,-D_AIX32,-D_AIX41,-D_AIX43,-D_AIX50,-D_AIX51,-D_AIX52,-D_AIX53,-D_IBMR2,-D_POWER,-DDEBUG,-I../gtiff/libtiff,-I../vrt,-I/opt/apps/ots/gdal/port,-I/opt/apps/ots/gdal/gcore,-I/opt/apps/ots/gdal/alg,-I/opt/apps/ots/gdal/ogr,-I/opt/apps/ots/gdal/ogr/ogrsf_frmts,-DOGR_ENABLED,-I/opt/apps/ots/include,-I/opt/apps/ots/hdf/v4/include,-I/opt/apps/ots/hdf/v5-1.6.7/include,-I/opt/apps/ots/gdal/port,-I/opt/apps/ots/jpeg/jpeg2000,-I/opt/apps/ots/jpeg/jpeg2000/include,-I/opt/apps/ots/netCDF/v3.6.2,-I/opt/apps/ots/netCDF/v3.6.2/include,-DJPEG_SUPPORTED,-I../jpeg/libjpeg,-DPIC,-qosvar=aix.5.3,-qalias=ansi,-q64,-qlargetype,-q64,-qlargetype,-qmaxmem=-1,-qarch=pwr5x,-g,-qasm_as=/bin/as,-qcpp_stdinc=/usr/vacpp/include:/usr/include,-qc_stdinc=/usr/vac/include:/usr/include,-o../o/.libs/nitfdataset.o,nitfdataset.cpp,/tmp/xlcW0ECmj7a,/tmp/xlcW1ECmj7b,/dev/null,/tmp/xlcLEDmj7eF.lst,/dev/null,/tmp/xlcW2EDmj7c,NULL) "/opt/apps/ots/include/jconfig.h", line 12.9: 1540-0848 (S) The macro name "HAVE_STDLIB_H" is already defined with a different definition. "/opt/apps/ots/gdal/port/cpl_config.h", line 118.9: 1540-0425 (I) "HAVE_STDLIB_H" is defined on line 118 of "/opt/apps/ots/gdal/port/cpl_config.h".
So I commented out the HAVE_STDLIB_H line in cpl_config.h and re-compiled gdal. Received the following error message (see attached log file gmake.out3):
exec: /usr/vacpp/exe/xlCentry(/usr/vacpp/exe/xlCentry,-D_AIX,-D_AIX32,-D_AIX41,-D_AIX43,-D_AIX50,-D_AIX51,-D_AIX52,-D_AIX53,-D_IBMR2,-D_POWER,-DDEBUG,-I/opt/apps/ots/gdal/port,-I/opt/apps/ots/gdal/gcore,-I/opt/apps/ots/gdal/alg,-I/opt/apps/ots/gdal/ogr,-I/opt/apps/ots/gdal/ogr/ogrsf_frmts,-I/opt/apps/ots/gdal/ogr,-Ihdf-eos,-DOGR_ENABLED,-I/opt/apps/ots/include,-I/opt/apps/ots/hdf/v4/include,-I/opt/apps/ots/hdf/v5-1.6.7/include,-I/opt/apps/ots/gdal/port,-I/opt/apps/ots/jpeg/jpeg2000,-I/opt/apps/ots/jpeg/jpeg2000/include,-I/opt/apps/ots/netCDF/v3.6.2,-I/opt/apps/ots/netCDF/v3.6.2/include,-DPIC,-qosvar=aix.5.3,-qalias=ansi,-q64,-qlargetype,-q64,-qlargetype,-qmaxmem=-1,-qarch=pwr5x,-g,-qasm_as=/bin/as,-qcpp_stdinc=/usr/vacpp/include:/usr/include,-qc_stdinc=/usr/vac/include:/usr/include,-o../o/.libs/hdf4dataset.o,hdf4dataset.cpp,/tmp/xlcW0cW3Kaa,/tmp/xlcW1cW3Kab,/dev/null,/tmp/xlcLc_3KaeF.lst,/dev/null,/tmp/xlcW2cX3Kac,NULL) "hdf4dataset.h", line 54.5: 1540-0403 (S) "UNKNOWN" is already defined. "/opt/apps/ots/hdf/v4/include/mfhdfi.h", line 25.5: 1540-0425 (I) "UNKNOWN" is defined on line 25 of "/opt/apps/ots/hdf/v4/include/mfhdfi.h". "hdf4dataset.h", line 80.24: 1540-0040 (S) The text "iSubdatasetType" is unexpected. "HDF4SubdatasetType" may be undeclared or ambiguous.
I then commented out the UNKNOWN line in file hdf4dataset.h and re-compiled. Got the following error (see attached log file gmake.out4):
exec: /usr/vacpp/exe/xlCentry(/usr/vacpp/exe/xlCentry,-D_AIX,-D_AIX32,-D_AIX41,-D_AIX43,-D_AIX50,-D_AIX51,-D_AIX52,-D_AIX53,-D_IBMR2,-D_POWER,-DDEBUG,-I/opt/apps/ots/gdal/port,-I/opt/apps/ots/gdal/gcore,-I/opt/apps/ots/gdal/alg,-I/opt/apps/ots/gdal/ogr,-I/opt/apps/ots/gdal/ogr/ogrsf_frmts,-I/opt/apps/ots/gdal/ogr,-Ihdf-eos,-DOGR_ENABLED,-I/opt/apps/ots/include,-I/opt/apps/ots/hdf/v4/include,-I/opt/apps/ots/hdf/v5-1.6.7/include,-I/opt/apps/ots/gdal/port,-I/opt/apps/ots/jpeg/jpeg2000,-I/opt/apps/ots/jpeg/jpeg2000/include,-I/opt/apps/ots/netCDF/v3.6.2,-I/opt/apps/ots/netCDF/v3.6.2/include,-DPIC,-qosvar=aix.5.3,-qalias=ansi,-q64,-qlargetype,-q64,-qlargetype,-qmaxmem=-1,-qarch=pwr5x,-g,-qasm_as=/bin/as,-qcpp_stdinc=/usr/vacpp/include:/usr/include,-qc_stdinc=/usr/vac/include:/usr/include,-o../o/.libs/hdf4dataset.o,hdf4dataset.cpp,/tmp/xlcW0ix7lMa,/tmp/xlcW1i17lMb,/dev/null,/tmp/xlcLi17lMeF.lst,/dev/null,/tmp/xlcW2i17lMc,NULL) "hdf4dataset.cpp", line 743.33: 1540-0216 (S) An expression of type "hdf_vartype_t" cannot be converted to type "HDF4SubdatasetType".
Clearly I'm going down the wrong path. Any suggestions?
comment:3 by , 16 years ago
The tiff.h fix is to wrap lines 68-78 with
#ifdef _AIX /* lines 68-78 go here */ #endif
The HAVE_STDLIB_H is issue with jconfig.h sucked from external libjpeg located in /opt/apps/ots/include/jconfig.h. Unfortunately, GDAL internal copy of libjpeg has the same issue and the duplicates are incorrect here, should be managed in more centralized way but not per internal library. Anyway, the fix is to wrap lines 11-12 in jconfig.h with:
#ifndef HAVE_STDDEF_H #define HAVE_STDDEF_H 1 #endif #ifndef HAVE_STDLIB_H #define HAVE_STDLIB_H 1 #endif
The undefined UNKNOWN is a bug in older versions of GDAL. It has been fixed recently (#2296). So, SVN version is recommended to use to get that fix. Then the last problem with
An expression of type "hdf_vartype_t" cannot be converted to type "HDF4SubdatasetType".
should be solved as well.
Hope it helps.
comment:4 by , 16 years ago
Type: | task → defect |
---|
comment:5 by , 16 years ago
Thanks for the help you have given me so far.
I tried several things. Tried the tiff.h fix but it failed. Could not get it to work. So I commented out the line containing int64. Implemented the HAVE_STDDEF_H/HAVE_STDLIB_H fix and the UNKNOWN fix. These seemed to work. Re-compiling gave me the following error:
"gstTypes.h", line 43.41: 1540-0400 (S) "int64" has a conflicting declaration. "/usr/include/sys/inttypes.h", line 622.33: 1540-0425 (I) "int64" is defined on line 622 of "/usr/include/sys/inttypes.h".
I edited gstTypes.h, commenting out the line containing int64. Re-compiling gave me:
"netcdfdataset.h", line 150.32: 1540-0274 (S) The name lookup for "NC_MAX_NAME" did not find a declaration.
"netcdfdataset.cpp", line 143.24: 1540-0274 (S) The name lookup for "NC_MAX_NAME" did not find a declaration.
"netcdfdataset.cpp", line 417.14: 1540-0274 (S) The name lookup for "NC_INT" did not find a declaration.
"netcdfdataset.cpp", line 491.5: 1540-0274 (S) The name lookup for "nc_inq_varndims" did not find a declaration.
"netcdfdataset.cpp", line 536.16: 1540-0274 (S) The name lookup for "nc_get_vara_uchar" did not find a declaration.
"netcdfdataset.cpp", line 539.16: 1540-0274 (S) The name lookup for "nc_get_vara_short" did not find a declaration.
"netcdfdataset.cpp", line 544.20: 1540-0274 (S) The name lookup for "nc_get_vara_long" did not find a declaration.
"netcdfdataset.cpp", line 547.20: 1540-0274 (S) The name lookup for "nc_get_vara_int" did not find a declaration.
"netcdfdataset.cpp", line 551.16: 1540-0274 (S) The name lookup for "nc_get_vara_float" did not find a declaration.
"netcdfdataset.cpp", line 559.16: 1540-0274 (S) The name lookup for "nc_get_vara_double" did not find a declaration.
"netcdfdataset.cpp", line 572.19: 1540-0274 (S) The name lookup for "nc_strerror" did not find a declaration.
"netcdfdataset.cpp", line 1662.9: 1540-0274 (S) The name lookup for "nc_put_att_text" did not find a declaration.
"netcdfdataset.cpp", line 1720.22: 1540-0274 (S) The name lookup for "NC_MAX_DIMS" did not find a declaration.
I have other questions, but for now: Any suggestions?
comment:6 by , 16 years ago
Actually, I made a mistake in the #ifdef _AIX fix, it should be #ifndef so these lines are compiled on all but AIX:
#ifndef _AIX /* lines 68-78 go here */ #endif
Also, GDAL/OGR sources (and sources of internal versions of dependencies, like libtiff) should be scanned for all places where int16, int32, int64 typdefes are defined and such lines have to be wrapped with #ifndef _AIX.
The errors about missing declarations in NetCDF driver seem to be related to Incompatibility with NetCDF Libraries issue. Check also the netcdf option build error thread.
comment:7 by , 16 years ago
Adding the "ifndef _AIX" wrappers was a big help. Thanks!
The netCDF errors did not go away. The tips (such as "-DHAVE_NETCDF") given in the references you gave did not help. Anything else I can try?
comment:8 by , 16 years ago
Hum, if you do not need netcdf support, try building with --with-netcdf=no
follow-up: 10 comment:9 by , 16 years ago
Okay---after trying many, many, many, many things, I finally got what I think is a clean build.
Maybe I should quit while I'm ahead, but I have another question. It's about Xerces. I have tried and tried to get gdal to build with Xerces. I've done this by, among many other things, specifying --with-xerces=/opt/apps/ots/xerces, which is where xerces is installed on my system. Nothing so far has worked. Any suggestions?
follow-up: 11 comment:10 by , 14 years ago
Replying to tconrad:
Okay---after trying many, many, many, many things, I finally got what I think is a clean build.
Do you mind posting the list of your many, many things? After two years, this is still an outstanding bug and I can't have gdal-1.7.2 installed on AIX 5.3
follow-up: 12 comment:11 by , 14 years ago
Replying to davide:
Replying to tconrad:
Okay---after trying many, many, many, many things, I finally got what I think is a clean build.
Do you mind posting the list of your many, many things? After two years, this is still an outstanding bug and I can't have gdal-1.7.2 installed on AIX 5.3
We have since abandoned GDAL. I have some notes from the version 1.5.2 build which I think was a clean build---but I never tested it. See attachment "INSTALL.tc".
comment:12 by , 14 years ago
We have since abandoned GDAL. I have some notes from the version 1.5.2 build which I think was a clean build---but I never tested it. See attachment "INSTALL.tc".
Thank you very much for posting your notes, despite not being interested in GDAL anymore. I really appreciate it!! Unfortunately, they are not enough for the current version. I'll probably try the old 1.5.2, hopefully it will be enough for our purposes. Thanks and Regards, Davide
comment:13 by , 10 years ago
Perhaps ticket about problem with compiling GDAL 1.5.x four years ago can be closed now.
comment:14 by , 10 years ago
Resolution: | → wontfix |
---|---|
Status: | new → closed |
Yes, closing it. If someone wants to support AIX, then they will have to contribute a (hopefully not too intrusive) patch...
gmake log