Opened 13 years ago

Closed 13 years ago

#32961 closed defect (fixed)

py27-gdal fatal error: 'cpl_port.h' file not found

Reported by: jeabraham Owned by: anddam (Andrea D'Amore)
Priority: Normal Milestone:
Component: ports Version: 2.0.3
Keywords: clang Cc:
Port: py27-gdal

Description

Trying to install py27-gdal.

Lion 10.7.2 Server, XCode 4.2.1

Seems to be a problem with clang, or maybe a problem with gdal-config

:info:build Could not run gdal-config!!!!
:info:build building 'osgeo._gdal' extension
:info:build /Developer/usr/bin/clang -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -arch x86_64 -I../../port -I../../gcore -I../../alg -I../../ogr/ -I/opt/local/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -I/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy/core/include -c extensions/gdal_wrap.cpp -o build/temp.macosx-10.7-x86_64-2.7/extensions/gdal_wrap.o
:info:build extensions/gdal_wrap.cpp:2228:11: warning: explicitly assigning a variable of type 'int' to itself [-Wself-assign]
:info:build                     res = SWIG_AddCast(res);
:info:build                     ~~~ ^              ~~~
:info:build extensions/gdal_wrap.cpp:2231:11: warning: explicitly assigning a variable of type 'int' to itself [-Wself-assign]
:info:build                     res = SWIG_AddCast(res);                
:info:build                     ~~~ ^              ~~~
:info:build extensions/gdal_wrap.cpp:2813:10: fatal error: 'cpl_port.h' file not found
:info:build #include "cpl_port.h"

Attachments (1)

main.log (48.1 KB) - added by jeabraham 13 years ago.
Log file.

Download all attachments as: .zip

Change History (4)

Changed 13 years ago by jeabraham

Attachment: main.log added

Log file.

comment:1 Changed 13 years ago by mf2k (Frank Schima)

Keywords: gdal cpl removed
Owner: changed from macports-tickets@… to and.damore@…

comment:2 Changed 13 years ago by jeabraham

Fixed it! I mean, I don't know how to fix it in macports, but I fixed it on my own machine.

URL for bug report for GDAL fix is here http://trac.osgeo.org/gdal/ticket/3375

so I edited /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_python_py27-gdal/py27-gdal/work/GDAL-1.7.1/setup.cfg to remove the

../../apps/gdal-config

line, and then tried sudo port install py27-gdal and it worked.

Would be nice if the package maintainer, or anybody who knows how to maintain packages, could somehow put this into the package.

comment:3 Changed 13 years ago by anddam (Andrea D'Amore)

Resolution: fixed
Status: newclosed
Summary: py27-gdal @1.8.0 fatal error: 'cpl_port.h' file not foundpy27-gdal fatal error: 'cpl_port.h' file not found

The '@1.8.0' in summary refers to gdal, not to py27-gdal.

The patch is straightforward, check the reinplace command in r89224. I've upgraded the port to 1.8.1 as well, this version correctly includes headers from gdal port but patch setup.cfg doesn't hurt.

Next time you can edit the portfile yourself using port edit or port dir to show port's directory and attach the patch to the ticket as well.

Note: See TracTickets for help on using tickets.