#31167: clang 3.0 bug compiles a flawed xgettext, complains of gettext:1:pass-c-format --------------------------------+------------------------------------------- Reporter: dossy@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.0.3 Keywords: clang bug | Port: gettext --------------------------------+------------------------------------------- Using MacPorts 2.0.3 on OS X Lion 10.7.1 and Xcode 4.2 (Developer Preview), building gettext-0.18.1.1 using Portfile r81158. If your xgettext does this: {{{ $ xgettext xgettext: A --flag argument doesn't have the <keyword>:<argnum>:[pass-]<flag> syntax: gettext:1:pass-c-format }}} which I noticed when trying to install gnome-doc-utils which failed because of this, then you may be seeing a bug in clang. Specifically: {{{ $ clang --version Apple clang version 3.0 (tags/Apple/clang-209.9.2) (based on LLVM 3.0svn) Target: x86_64-apple-darwin11.1.0 Thread model: posix }}} The clang bug is documented here: http://lists.cs.uiuc.edu/pipermail/llvmbugs/2011-May/018101.html I confirmed that this is what's biting me in the ass by building gettext using the same configure args that MacPorts does, but setting CC=gcc and CXX=g++, removing clang from the picture. It now builds an xgettext binary that does this, as expected: {{{ $ xgettext xgettext: no input file given Try `xgettext --help' for more information. }}} Simple patch to do the override attached, but the bigger question is: why is MacPorts using clang?! What was wrong with gcc -O2 ... :-( -- Ticket URL: <https://trac.macports.org/ticket/31167> MacPorts <http://www.macports.org/> Ports system for Mac OS