Opened 13 years ago

Closed 12 years ago

#32628 closed defect (fixed)

py27-geoip @1.2.5 can not find GeoIP.h with clang

Reported by: max-arnold (Max Arnold) Owned by: miwi@…
Priority: Normal Milestone:
Component: ports Version: 2.0.3
Keywords: clang Cc:
Port: py27-geoip

Description

Build fails due to missing include path. Relevant part of the build log:

:debug:build Executing org.macports.build (py27-geoip)
:debug:build Environment: CFLAGS='-arch x86_64' CXXFLAGS='-arch x86_64' CPATH='/opt/local/include' MACOSX_DEPLOYMENT_TARGET='10.7' LIBRARY_PATH='/opt/local/lib' F90FLAGS='-m64' CC_PRINT_OPTIONS_FILE='/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_python_py27-geoip/py27-geoip/work/.CC_PRINT_OPTIONS' LDFLAGS='-arch x86_64' FCFLAGS='-m64' OBJCFLAGS='-arch x86_64' FFLAGS='-m64' CC_PRINT_OPTIONS='YES'
:debug:build Assembled command: 'cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_python_py27-geoip/py27-geoip/work/GeoIP-Python-1.2.5" && /opt/local/Library/Frameworks/Python.framework/Versions/2.7/bin/python2.7 setup.py --no-user-cfg build'
:debug:build Executing command line:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_python_py27-geoip/py27-geoip/work/GeoIP-Python-1.2.5" && /opt/local/Library/Frameworks/Python.framework/Versions/2.7/bin/python2.7 setup.py --no-user-cfg build 
:info:build running build
:info:build running build_ext
:info:build building 'GeoIP' extension
:info:build creating build
:info:build creating build/temp.macosx-10.7-x86_64-2.7
:info:build /Developer/usr/bin/clang -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -arch x86_64 -I/usr/local/include -I/opt/local/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c py_GeoIP.c -o build/temp.macosx-10.7-x86_64-2.7/py_GeoIP.o
:info:build py_GeoIP.c:22:10: fatal error: 'GeoIP.h' file not found
:info:build #include "GeoIP.h"
:info:build          ^
:info:build 1 error generated.
:info:build error: command '/Developer/usr/bin/clang' failed with exit status 1
:info:build shell command " cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_python_py27-geoip/py27-geoip/work/GeoIP-Python-1.2.5" && /opt/local/Library/Frameworks/Python.framework/Versions/2.7/bin/python2.7 setup.py --no-user-cfg build " returned error 1

Change History (3)

comment:1 Changed 13 years ago by ryandesign (Ryan Carsten Schmidt)

Keywords: clang added
Owner: changed from macports-tickets@… to miwi@…
Summary: py27-geoip @1.2.5 can not find GeoIP.hpy27-geoip @1.2.5 can not find GeoIP.h with clang

comment:2 Changed 13 years ago by max-arnold (Max Arnold)

I tried to add different configure.compiler options with no effect (probably clang is selected somewhere inside distutils.core). I was able to find workaround by looking for similar python ports - for example py-apsw uses additional setup.cfg to set proper include and library paths:

post-extract    {
        file copy ${filespath}/setup.cfg ${worksrcpath}/setup.cfg
        reinplace "s|@@PREFIX@@|${prefix}|g" ${worksrcpath}/setup.cfg
}
[build_ext]
include_dirs=@@PREFIX@@/include
library_dirs=@@PREFIX@@/lib

comment:3 Changed 12 years ago by jmroot (Joshua Root)

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