I'm trying to install the [GDAL python package][1] on a Mac (OSX Yosemite) with python 2.7.9 and GDAL 1.11.3. When I try $ sudo easy_install GDAL I get a number of errors ending with:
error: Setup script exited with error: command 'gcc' failed with exit status 1
The full error log is below. I was wondering if anyone could point out what the issue(s) may be and how to fix them.
FULL ERROR MESSAGE:
Searching for GDAL
Reading https://pypi.python.org/simple/GDAL/
Best match: GDAL 2.0.1
Downloading https://pypi.python.org/packages/source/G/GDAL/GDAL-2.0.1.tar.gz#md5=df013c4417a3820b6d59c9b01d2c68c9
Processing GDAL-2.0.1.tar.gz
Writing /tmp/easy_install-tKnmjc/GDAL-2.0.1/setup.cfg
Running GDAL-2.0.1/setup.py -q bdist_egg --dist-dir /tmp/easy_install-tKnmjc/GDAL-2.0.1/egg-dist-tmp-SGCc8W
warning: unknown warning option '-Werror=unused-command-line-argument-hard-error-in-future';
did you mean '-Werror=unused-command-line-argument'? [-Wunknown-warning-option]
warning: unknown warning option '-Werror=unused-command-line-argument-hard-error-in-future';
did you mean '-Werror=unused-command-line-argument'? [-Wunknown-warning-option]
extensions/gdal_wrap.cpp:4265:47: error: use of undeclared identifier
'GDALDatasetCreateLayer'; did you mean 'GDALDatasetShadow_CreateLayer'?
OGRLayerShadow* layer = (OGRLayerShadow*) GDALDatasetCreateLayer( self,
^~~~~~~~~~~~~~~~~~~~~~
GDALDatasetShadow_CreateLayer
extensions/gdal_wrap.cpp:4264:28: note: 'GDALDatasetShadow_CreateLayer' declared here
SWIGINTERN OGRLayerShadow *GDALDatasetShadow_CreateLayer(GDALDatasetShadow *self,cha...
^
extensions/gdal_wrap.cpp:4273:47: error: use of undeclared identifier 'GDALDatasetCopyLayer'
OGRLayerShadow* layer = (OGRLayerShadow*) GDALDatasetCopyLayer( self,
^
extensions/gdal_wrap.cpp:4280:12: error: use of undeclared identifier
'GDALDatasetDeleteLayer'; did you mean 'GDALDatasetShadow_DeleteLayer'?
return GDALDatasetDeleteLayer(self, index);
^~~~~~~~~~~~~~~~~~~~~~
GDALDatasetShadow_DeleteLayer
extensions/gdal_wrap.cpp:4279:19: note: 'GDALDatasetShadow_DeleteLayer' declared here
SWIGINTERN OGRErr GDALDatasetShadow_DeleteLayer(GDALDatasetShadow *self,int index){
^
extensions/gdal_wrap.cpp:4306:8: error: use of undeclared identifier
'OGRERR_NON_EXISTING_FEATURE'
case OGRERR_NON_EXISTING_FEATURE:
^
extensions/gdal_wrap.cpp:4314:12: error: use of undeclared identifier
'GDALDatasetGetLayerCount'; did you mean 'GDALDatasetShadow_GetLayerCount'?
return GDALDatasetGetLayerCount(self);
^~~~~~~~~~~~~~~~~~~~~~~~
GDALDatasetShadow_GetLayerCount
extensions/gdal_wrap.cpp:4313:16: note: 'GDALDatasetShadow_GetLayerCount' declared here
SWIGINTERN int GDALDatasetShadow_GetLayerCount(GDALDatasetShadow *self){
^
extensions/gdal_wrap.cpp:4318:47: error: use of undeclared identifier 'GDALDatasetGetLayer'
OGRLayerShadow* layer = (OGRLayerShadow*) GDALDatasetGetLayer(self, index);
^
extensions/gdal_wrap.cpp:4322:47: error: use of undeclared identifier
'GDALDatasetGetLayerByName'; did you mean 'GDALDatasetShadow_GetLayerByName'?
OGRLayerShadow* layer = (OGRLayerShadow*) GDALDatasetGetLayerByName(self, layer_name);
^~~~~~~~~~~~~~~~~~~~~~~~~
GDALDatasetShadow_GetLayerByName
extensions/gdal_wrap.cpp:4321:28: note: 'GDALDatasetShadow_GetLayerByName' declared here
SWIGINTERN OGRLayerShadow *GDALDatasetShadow_GetLayerByName(GDALDatasetShadow *self,c...
^
extensions/gdal_wrap.cpp:4326:13: error: use of undeclared identifier
'GDALDatasetTestCapability'; did you mean 'GDALDatasetShadow_TestCapability'?
return (GDALDatasetTestCapability(self, cap) > 0);
^~~~~~~~~~~~~~~~~~~~~~~~~
GDALDatasetShadow_TestCapability
extensions/gdal_wrap.cpp:4325:17: note: 'GDALDatasetShadow_TestCapability' declared here
SWIGINTERN bool GDALDatasetShadow_TestCapability(GDALDatasetShadow *self,char const *cap){
^
extensions/gdal_wrap.cpp:4336:47: error: use of undeclared identifier
'GDALDatasetExecuteSQL'; did you mean 'GDALDatasetShadow_ExecuteSQL'?
OGRLayerShadow* layer = (OGRLayerShadow*) GDALDatasetExecuteSQL(self,
^~~~~~~~~~~~~~~~~~~~~
GDALDatasetShadow_ExecuteSQL
extensions/gdal_wrap.cpp:4335:28: note: 'GDALDatasetShadow_ExecuteSQL' declared here
SWIGINTERN OGRLayerShadow *GDALDatasetShadow_ExecuteSQL(GDALDatasetShadow *self,char ...
^
extensions/gdal_wrap.cpp:4343:5: error: use of undeclared identifier
'GDALDatasetReleaseResultSet'; did you mean 'GDALDatasetShadow_ReleaseResultSet'?
GDALDatasetReleaseResultSet(self, layer);
^~~~~~~~~~~~~~~~~~~~~~~~~~~
GDALDatasetShadow_ReleaseResultSet
extensions/gdal_wrap.cpp:4342:17: note: 'GDALDatasetShadow_ReleaseResultSet' declared here
SWIGINTERN void GDALDatasetShadow_ReleaseResultSet(GDALDatasetShadow *self,OGRLayerSh...
^
extensions/gdal_wrap.cpp:4346:35: error: use of undeclared identifier
'GDALDatasetGetStyleTable'; did you mean 'GDALDatasetShadow_GetStyleTable'?
return (OGRStyleTableShadow*) GDALDatasetGetStyleTable(self);
^~~~~~~~~~~~~~~~~~~~~~~~
GDALDatasetShadow_GetStyleTable
extensions/gdal_wrap.cpp:4345:33: note: 'GDALDatasetShadow_GetStyleTable' declared here
SWIGINTERN OGRStyleTableShadow *GDALDatasetShadow_GetStyleTable(GDALDatasetShadow *self){
^
extensions/gdal_wrap.cpp:4350:9: error: use of undeclared identifier
'GDALDatasetSetStyleTable'; did you mean 'GDALDatasetShadow_SetStyleTable'?
GDALDatasetSetStyleTable(self, (OGRStyleTableH) table);
^~~~~~~~~~~~~~~~~~~~~~~~
GDALDatasetShadow_SetStyleTable
extensions/gdal_wrap.cpp:4348:17: note: 'GDALDatasetShadow_SetStyleTable' declared here
SWIGINTERN void GDALDatasetShadow_SetStyleTable(GDALDatasetShadow *self,OGRStyleTable...
^
extensions/gdal_wrap.cpp:4350:40: error: cannot initialize a parameter of type
'OGRStyleTableShadow *' (aka 'OGRStyleTableHS *') with an rvalue of type
'OGRStyleTableH' (aka 'void *')
GDALDatasetSetStyleTable(self, (OGRStyleTableH) table);
^~~~~~~~~~~~~~~~~~~~~~
extensions/gdal_wrap.cpp:4348:94: note: passing argument to parameter 'table' here
...GDALDatasetShadow_SetStyleTable(GDALDatasetShadow *self,OGRStyleTableShadow *table){
^
extensions/gdal_wrap.cpp:4353:12: error: use of undeclared identifier
'GDALDatasetStartTransaction'; did you mean 'GDALDatasetShadow_StartTransaction'?
return GDALDatasetStartTransaction(self, force);
^~~~~~~~~~~~~~~~~~~~~~~~~~~
GDALDatasetShadow_StartTransaction
extensions/gdal_wrap.cpp:4352:19: note: 'GDALDatasetShadow_StartTransaction' declared here
SWIGINTERN OGRErr GDALDatasetShadow_StartTransaction(GDALDatasetShadow *self,int forc...
^
extensions/gdal_wrap.cpp:4356:12: error: use of undeclared identifier
'GDALDatasetCommitTransaction'; did you mean 'GDALDatasetShadow_CommitTransaction'?
return GDALDatasetCommitTransaction(self);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
GDALDatasetShadow_CommitTransaction
extensions/gdal_wrap.cpp:4355:19: note: 'GDALDatasetShadow_CommitTransaction' declared here
SWIGINTERN OGRErr GDALDatasetShadow_CommitTransaction(GDALDatasetShadow *self){
^
extensions/gdal_wrap.cpp:4359:12: error: use of undeclared identifier
'GDALDatasetRollbackTransaction'; did you mean 'GDALDatasetShadow_RollbackTransaction'?
return GDALDatasetRollbackTransaction(self);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
GDALDatasetShadow_RollbackTransaction
extensions/gdal_wrap.cpp:4358:19: note: 'GDALDatasetShadow_RollbackTransaction' declared here
SWIGINTERN OGRErr GDALDatasetShadow_RollbackTransaction(GDALDatasetShadow *self){
^
extensions/gdal_wrap.cpp:4361:294: error: unknown type name 'GDALRIOResampleAlg'; did you
mean 'GDALResampleAlg'?
...*buf_line_space=0,GIntBig *buf_band_space=0,GDALRIOResampleAlg resample_alg=GRIORA_Ne...
^~~~~~~~~~~~~~~~~~
GDALResampleAlg
/usr/local/Cellar/gdal/1.11.3/include/gdalwarper.h:56:3: note: 'GDALResampleAlg' declared
here
} GDALResampleAlg;
^
extensions/gdal_wrap.cpp:4361:326: error: use of undeclared identifier
'GRIORA_NearestNeighbour'; did you mean 'GRA_NearestNeighbour'?
...*buf_band_space=0,GDALRIOResampleAlg resample_alg=GRIORA_NearestNeighbour,GDALProgres...
^~~~~~~~~~~~~~~~~~~~~~~
GRA_NearestNeighbour
/usr/local/Cellar/gdal/1.11.3/include/gdalwarper.h:49:56: note: 'GRA_NearestNeighbour'
declared here
/*! Nearest neighbour (select on one input pixel) */ GRA_NearestNeighbour=0,
^
extensions/gdal_wrap.cpp:4425:5: error: unknown type name 'GDALRasterIOExtraArg'
GDALRasterIOExtraArg sExtraArg;
^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
2 warnings and 20 errors generated.
error: Setup script exited with error: command 'gcc' failed with exit status 1
[1]: https://pypi.python.org/pypi/GDAL/
No comments:
Post a Comment