Opened 13 years ago

Closed 13 years ago

#28872 closed defect (invalid)

gnome-mime-data fails to find msgfmt

Reported by: tony.li@… Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: ports Version: 1.9.2
Keywords: Cc: ryandesign (Ryan Carsten Schmidt)
Port: gnome-mime-data

Description

Dies looking for gmsgfmt

Attachments (2)

main.log (22.3 KB) - added by tony.li@… 13 years ago.
Build log
config.log (681.6 KB) - added by tony.li@… 13 years ago.
Config log for gettext

Download all attachments as: .zip

Change History (16)

comment:1 Changed 13 years ago by jmroot (Joshua Root)

Port: gnome-mime-data added

Please remember to fill in the Port field.

This builds fine for me. Have you followed the steps in the FAQ? If so, or if it still fails after doing so, please attach the log.

Changed 13 years ago by tony.li@…

Attachment: main.log added

Build log

comment:2 Changed 13 years ago by tony.li@…

Environment: 10.6.6, latest Xcode

Workaround:

ln -s /opt/local/bin/msgfmt /opt/local/bin/gmsgfmt

Apply this patch to the Portfile:

*** Portfile	2010-09-20 10:00:55.000000000 -0700
--- /Users/tli/temp/Portfile.new	2011-03-22 18:50:15.000000000 -0700
***************
*** 29,35 ****
  depends_build   path:bin/perl:perl5 \
                  port:intltool
  
! configure.env-append INTLTOOL_PERL=${prefix}/bin/perl
  
  depends_lib     port:libiconv \
                  port:gettext
--- 29,36 ----
  depends_build   path:bin/perl:perl5 \
                  port:intltool
  
! configure.env-append INTLTOOL_PERL=${prefix}/bin/perl \
! 	MSGFMT=${prefix}/bin/msgfmt GMSGFMT=${prefix}/bin/gmsgfmt
  
  depends_lib     port:libiconv \
                  port:gettext

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

Cc: ryandesign@… added
Summary: defect: gnome-mime-data fails to buildgnome-mime-data fails to find msgfmt

Those changes should not be necessary. The port builds fine for me as-is.

Comparing your log to mine, the material difference seems to be that yours says:

:info:configure checking for bindtextdomain in -lintl... no
:info:configure checking if -liconv is needed to use gettext... 
:info:configure checking for ngettext in -lintl... no

while mine says:

:info:configure checking for bindtextdomain in -lintl... yes
:info:configure checking for ngettext in -lintl... yes
:info:configure checking for dgettext in -lintl... yes
:info:configure checking for bind_textdomain_codeset... yes
:info:configure checking for msgfmt... /opt/local/bin/msgfmt
:info:configure checking for dcgettext... yes
:info:configure checking for gmsgfmt... /opt/local/bin/msgfmt
:info:configure checking for xgettext... /opt/local/bin/xgettext
:info:configure checking for catalogs to be installed...  af am ar az be bg bn bs ca cs cy da de el en_CA en_GB eo es et eu fa fi fr ga gl gu he hi hr hu id is it ja ko li lt lv mk ml mn ms nb ne nl nn nso pa pl pt pt_BR ro ru rw sk sl sq sr sr@ije sr@Latn sv ta th tk tr uk vi wa xh yi zh_CN zh_TW zu

In other words, your gettext -- libintl -- isn't working right. Try rebuilding gettext:

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

Did you recently upgrade to Snow Leopard from an earlier OS? If so, you may have many more ports you need to rebuild; see Migration.

Alternately, perhaps you have a broken libintl in /usr/local/lib; having things in /usr/local frequently derails MacPorts and is therefore not supported.

comment:4 in reply to:  3 Changed 13 years ago by tony.li@…

Alternately, perhaps you have a broken libintl in /usr/local/lib; having things in /usr/local frequently derails MacPorts and is therefore not supported.

There was indeed a libintl in /usr/local/lib, but I moved that away and still can't build. config.log now shows:

configure:4992: checking for bindtextdomain in -lintl
configure:5027: /usr/bin/gcc-4.2 -o conftest -O2 -I/opt/local/include -L/opt/local/lib -L/opt/local/lib conftest.c -lintl   >&5
ld: warning: in /opt/local/lib/libintl.dylib, file was built for i386 which is not the architecture being linked (x86_64)
Undefined symbols:
  "_bindtextdomain", referenced from:
      _main in ccK6HrMK.o
ld: symbol(s) not found
collect2: ld returned 1 exit status

Are you running in 32 or 64 bit? I'm always in 64...

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

That error message indicates you are trying to build gnome-mime-data for x86_64 (which is expected) but that libintl is built for i386 (which is not expected). One common reason for this is if you installed gettext, then upgraded to Snow Leopard, then tried to install additional ports. If you have not rebuilt all ports since upgrading to Snow Leopard, you need to read the Migration page.

comment:6 Changed 13 years ago by tony.li@…

Thanks, but this system has always been on SL.

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

Well, for whatever reason, gettext is built for i386, but since you're on a 64-bit-capable Snow Leopard machine, it should be built for x86_64. Rebuild gettext using the commands shown above.

comment:8 Changed 13 years ago by tony.li@…

Did that already. No changes:

[sjc-vpn6-1500:gnome-mime-data/work/gnome-mime-data-2.18.0] root# port clean gettext
--->  Cleaning gettext
[sjc-vpn6-1500:gnome-mime-data/work/gnome-mime-data-2.18.0] root# port -n upgrade --force gettext
--->  Computing dependencies for gettext
--->  Fetching gettext
--->  Verifying checksum(s) for gettext
--->  Extracting gettext
--->  Applying patches to gettext
--->  Configuring gettext
--->  Building gettext
--->  Staging gettext into destroot
--->  Unable to uninstall gettext 0.18.1.1_2, the following ports depend on it:
--->      gawk
--->      xz
--->      texinfo
--->      aspell
Warning: Uninstall forced.  Proceeding despite dependencies.
--->  Deactivating gettext @0.18.1.1_2
--->  Uninstalling gettext @0.18.1.1_2
--->  Computing dependencies for gettext
--->  Installing gettext @0.18.1.1_2
--->  Activating gettext @0.18.1.1_2
--->  Cleaning gettext
[sjc-vpn6-1500:gnome-mime-data/work/gnome-mime-data-2.18.0] root# ls -l /opt/local/lib/libintl.8.dylib
-rw-r--r--  2 root  admin  49620 Mar 26 14:04 /opt/local/lib/libintl.8.dylib
[sjc-vpn6-1500:gnome-mime-data/work/gnome-mime-data-2.18.0] root# date
Sat Mar 26 14:05:33 PDT 2011
[sjc-vpn6-1500:gnome-mime-data/work/gnome-mime-data-2.18.0] root# file /opt/local/lib/libintl.8.dylib
/opt/local/lib/libintl.8.dylib: Mach-O dynamically linked shared library i386

I'm attaching the configuration log for gettext

Changed 13 years ago by tony.li@…

Attachment: config.log added

Config log for gettext

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

I see "-arch i386" all over that config.log. So we need to figure out why that's there; you should be seeing lots of "-arch x86_64" in there instead. What is build_arch set to in /opt/local/etc/macports/macports.conf? It should be set to "x86_64". What is universal_archs set to? It should be set to "x86_64 i386".

comment:10 Changed 13 years ago by tony.li@…

build_arch is not set. Universal archs is set to "x86_64 i386".

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

If build_arch is not set, MacPorts should default to the correct value. Are we sure your computer is in fact 64-bit capable? What is the output of:

sysctl hw.cpu64bit_capable

comment:12 Changed 13 years ago by tony.li@…

Oh yeah. This is a MacBookPro5,3.

root# sysctl hw.cpu64bit_capable
hw.cpu64bit_capable: 1

comment:13 Changed 13 years ago by tony.li@…

Found it. I had i386 set in ~/.macports/macports.conf. Oops. Sorry to waste your time. Please close the ticket.

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

Resolution: invalid
Status: newclosed

Aha! Glad you found it; I always forget we have a separate per-user configuration file.

Now that you've set build_arch to x86_64, you should rebuild all ports you installed while build_arch was set to i386. "port -v installed | grep i386" might list them for you. For each one, you can "sudo port clean" and "sudo port -n upgrade --force" it.

Note: See TracTickets for help on using tickets.