Eric D. Schabell: Mac ports failing with configure.cppflags error

Sunday, April 22, 2007

Mac ports failing with configure.cppflags error

I was trying to install some software on the macbook I have using the macports but kept getting this error:
$ sudo port install [any-package]
Error: Unable to execute port: invalid command name "configure.cppflags"

I did some searching around and found the Portfile was setting the CPPFLAGS incorrectly. The fix was to edit this file (split the long file name):
/opt/local/var/db/dports/sources/     \
rsync.rsync.darwinports.org_dpupdate_dports/  \
devel/gettext/Portfile

# find this line.
#
configure.cppflags  
-no-cpp-precomp

# and replace it with this line.
#
configure.env CPPFLAGS="-no-cpp-precomp"