Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#37405 closed defect (duplicate)

gconf installation fails due to configure script failure with xgettext

Reported by: clw2@… Owned by: ryandesign (Ryan Carsten Schmidt)
Priority: Normal Milestone:
Component: ports Version: 2.1.2
Keywords: Cc:
Port: gettext gconf

Description (last modified by jmroot (Joshua Root))

Installation of gcomf 2.28.1 on Lion 10.7 fails when executing the configure script. The configure script tests if the gettext tools are installed and this test fails despite that they have been installed.

It appears that the actual test that fails is the test if msgfmt works when it calls xgettext

sudo port install gconf clean
--->  Computing dependencies for gconf
--->  Configuring gconf
Error: org.macports.configure for port gconf returned: configure failure: command execution failed
Please see the log file for port gconf for details:
    /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_gnome_gconf/gconf/main.log
To report a bug, follow the instructions in the guide:
    http://guide.macports.org/#project.tickets
Error: Processing of port gconf failed

When I run configure this is what comes:

.
info:configure checking for intltool >= 0.35.0... 0.50.2 found
:info:configure checking for intltool-update... /opt/local/bin/intltool-update
:info:configure checking for intltool-merge... /opt/local/bin/intltool-merge
:info:configure checking for intltool-extract... /opt/local/bin/intltool-extract
:info:configure checking for xgettext... /opt/local/bin/xgettext
:info:configure checking for msgmerge... /opt/local/bin/msgmerge
:info:configure checking for msgfmt... /opt/local/bin/msgfmt
:info:configure checking for gmsgfmt... /opt/local/bin/msgfmt
:info:configure /opt/local/bin/xgettext: A --flag argument doesn't have the <keyword>:<argnum>:[pass-]<flag> syntax: gettext:1:pass-c-format
:info:configure configure: error: GNU gettext tools not found; required for intltool
:info:configure Command failed:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_gnome_gconf/gconf/work/GConf-2.28.1" && ./configure --prefix=/opt/local --without-openldap 
:info:configure Exit code: 1
:error:configure org.macports.configure for port gconf returned: configure failure: command execution failed
:debug:configure Error code: NONE
:debug:configure Backtrace: configure failure: command execution failed
    while executing
"$procedure $targetname"
:info:configure Warning: targets not executed for gconf: org.macports.install org.macports.configure org.macports.build org.macports.destroot
:notice:configure Please see the log file for port gconf for details:
    /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_gnome_gconf/gconf/main.log

Attachments (1)

main.log (104.3 KB) - added by clw2@… 12 years ago.
main.log for attempt to build gconf

Download all attachments as: .zip

Change History (12)

Changed 12 years ago by clw2@…

Attachment: main.log added

main.log for attempt to build gconf

comment:1 Changed 12 years ago by cooljeanius (Eric Gallager)

What does port -d installed gettext show?

comment:2 Changed 12 years ago by clw2@…

$ port -d installed gettext
The following ports are currently installed:
  gettext @0.18.1.1_2 platform='darwin 11' archs='x86_64'
  gettext @0.18.1.1_2+universal platform='darwin 11' archs='i386 x86_64'
  gettext @0.18.2_0 platform='darwin 11' archs='x86_64'
  gettext @0.18.2_0+universal (active) platform='darwin 11' archs='i386 x86_64'
Last edited 12 years ago by ryandesign (Ryan Carsten Schmidt) (previous) (diff)

comment:3 Changed 12 years ago by clw2@…

I installed gconf by hacking the configure and commenting out the lines that used xgettext.

starting at line 18922, and then at line 18930

#if test -z "$XGETTEXT" -o -z "$MSGMERGE" -o -z "$MSGFMT"; then
#    { { $as_echo "$as_me:$LINENO: error: GNU gettext tools not found; required for intltool" >&5
#$as_echo "$as_me: error: GNU gettext tools not found; required for intltool" >&2;}
#   { (exit 1); exit 1; }; }
#fi

at line 18930

#if test -z "$xgversion" -o -z "$mmversion" -o -z "$mfversion"; then
#    { { $as_echo "$as_me:$LINENO: error: GNU gettext tools not found; required for intltool" >&5
#$as_echo "$as_me: error: GNU gettext tools not found; required for intltool" >&2;}
#  { (exit 1); exit 1; }; }
#fi

after that I ran as root in /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_gnome_gconf/gconf/work/GConf-2.28.1

sudo su

./configure --prefix=/opt/local --without-openldap
make 
make install

Interestingly this fails:

$ xgettext --version
xgettext: A --flag argument doesn't have the <keyword>:<argnum>:[pass-]<flag> syntax: gettext:1:pass-c-format

and it probably should not....

Last edited 12 years ago by ryandesign (Ryan Carsten Schmidt) (previous) (diff)

comment:4 Changed 12 years ago by clw2@…

I searched for errors with with xgettext, and indeed there is a problem with this program. See

Ticket #31167

I performed the rebuild using the commands

sudo port clean gettext
sudo port -n upgrade --force gettext

I am using XCode 4.4.1

and the error persists

I saw from the previous ticket that patching the port file to use gcc and g++ solves but I do not know what the correct course of action for me is here.

Last edited 12 years ago by ryandesign (Ryan Carsten Schmidt) (previous) (diff)

comment:5 Changed 12 years ago by clw2@…

The error that was found had to do with optimizations performed by the clang compiler. One of the related tickets suggested replacing clang with gcc and clang++ with g++. I did this by adding CC=gcc CXX=g++ to the configure.args variable in the Portfile for gettext and then running

sudo port clean gettext
sudo port -n upgrade --force gettext

xgettext now works correctly and everything else also builds that depends on it but I would prefer something better.

Last edited 12 years ago by ryandesign (Ryan Carsten Schmidt) (previous) (diff)

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

Description: modified (diff)
Keywords: gconf gettext msgfmt removed
Owner: changed from macports-tickets@… to ryandesign@…
Port: gettext gconf added

Please remember to fill in the Port field, Cc the maintainer, and preview and use WikiFormatting.

comment:7 Changed 12 years ago by ryandesign (Ryan Carsten Schmidt)

xgettext --version works fine for me. I'm on Xcode 4.5.2 on Mountain Lion.

What version of clang do you have? Try running clang -v

comment:8 Changed 12 years ago by clw2@…

On Lion

$ clang -v
Apple clang version 2.1 (tags/Apple/clang-163.7.1) (based on LLVM 3.0svn)
Target: x86_64-apple-darwin11.4.2
Thread model: posix
Last edited 12 years ago by ryandesign (Ryan Carsten Schmidt) (previous) (diff)

comment:9 Changed 12 years ago by ryandesign (Ryan Carsten Schmidt)

Resolution: duplicate
Status: newclosed

Great, that confirms this is a duplicate of #31167. That version of clang came with Xcode 4.1. Please update your command line tools. Open Xcode, go to Preferences, to the Downloads section, and upgrade or install the command line tools from there. I'll also fix the port so that this won't be a problem in the future.

comment:10 Changed 12 years ago by clw2@…

Much appreciated,
I am now upgrading to the current XCode 4.5.2 Thanks!

comment:11 Changed 12 years ago by clw2@…

Upgrade to XCode 4.5.2 (clang 4.0) resolved the issue with xgettext. Thanks.

To recompile the gettext package containing xgettext:

sudo port clean gettext
sudo port -n upgrade --force gettext

Now when you invoke xgettext without arguments, you get the right response:

$ xgettext 
xgettext: no input file given
Try 'xgettext --help' for more information.

Note: See TracTickets for help on using tickets.