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"

2 comments:

  1. that is not the fix. you just didn't have Xcode installed. you need a C++ compiler in order for ports to actually COMPILE things. you can't avoid compilation of ports unless you download them in binary form.

    ReplyDelete
  2. Thanks for the comment and tip. I hope it helps others too should my suggestions fail. ;-)

    ReplyDelete

Note: Only a member of this blog may post a comment.