Opened 12 years ago

Closed 12 years ago

#38299 closed defect (invalid)

gettext does not build for me on Leopard

Reported by: cdev9@… Owned by: ryandesign (Ryan Carsten Schmidt)
Priority: Normal Milestone:
Component: ports Version: 2.1.3
Keywords: leopard Cc:
Port: gettext

Description

OS is Leopard 10.5.8 on Intel (x86_64)

Attachments (1)

gettext_debug_log.txt (1.6 MB) - added by cdev9@… 12 years ago.

Download all attachments as: .zip

Change History (16)

Changed 12 years ago by cdev9@…

Attachment: gettext_debug_log.txt added

comment:1 Changed 12 years ago by cdev9@…

Cc: cdev9@… added
Last edited 12 years ago by cdev9@… (previous) (diff)

comment:2 Changed 12 years ago by neverpanic (Clemens Lang)

Cc: cdev9@… removed
Keywords: leopard added; 10.5.8 removed
Owner: changed from macports-tickets@… to ryandesign@…

You don't need to Cc yourself.

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

Relevant part of log:

Undefined symbols:
  "_libiconv_close", referenced from:
      _xmlCharEncCloseFunc in libxml_rpl_la-encoding.o
      _xmlCharEncCloseFunc in libxml_rpl_la-encoding.o
      _xmlFindCharEncodingHandler in libxml_rpl_la-encoding.o
      _xmlFindCharEncodingHandler in libxml_rpl_la-encoding.o
  "_libiconv", referenced from:
      _xmlIconvWrapper in libxml_rpl_la-encoding.o
  "_libiconv_open", referenced from:
      _xmlFindCharEncodingHandler in libxml_rpl_la-encoding.o
      _xmlFindCharEncodingHandler in libxml_rpl_la-encoding.o
      _xmlFindCharEncodingHandler in libxml_rpl_la-encoding.o
      _xmlFindCharEncodingHandler in libxml_rpl_la-encoding.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
make[4]: *** [libgettextlib.la] Error 1
make[4]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_devel_gettext/gettext/work/gettext-0.18.2-x86_64/gettext-tools/gnulib-lib'
make[3]: *** [all] Error 2
make[3]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_devel_gettext/gettext/work/gettext-0.18.2-x86_64/gettext-tools/gnulib-lib'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_devel_gettext/gettext/work/gettext-0.18.2-x86_64/gettext-tools'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_devel_gettext/gettext/work/gettext-0.18.2-x86_64/gettext-tools'
make: *** [all-recursive] Error 1
make: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_devel_gettext/gettext/work/gettext-0.18.2-x86_64'
Command failed:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_devel_gettext/gettext/work/gettext-0.18.2-x86_64" && /usr/bin/make -j2 -w all 
Exit code: 2
Error: org.macports.build for port gettext returned: command execution failed

What does "port -v installed libiconv" say for you? How about "port -v installed libxml*"?

comment:4 Changed 12 years ago by cdev9@…

sudo port -v installed libxml*
The following ports are currently installed:
  libxml2 @2.7.8_0+universal platform='darwin 9' archs='i386 ppc'
  libxml2 @2.8.0_0+universal (active) platform='darwin 9' archs='i386 ppc'
cdev$ sudo port -v installed libiconv
The following ports are currently installed:
  libiconv @1.14_0 platform='darwin 9' archs='i386'
  libiconv @1.14_0+universal (active) platform='darwin 9' archs='i386 ppc'
Last edited 12 years ago by ryandesign (Ryan Carsten Schmidt) (previous) (diff)

comment:5 in reply to:  3 Changed 12 years ago by cdev9@…

Trying to upgrade libxml2 or virtually anything else, I am running into the the same loop- it tries to upgrade gettext and fails.

sudo port -v installed libxml*
The following ports are currently installed:
    libxml2 @2.7.8_0+universal platform='darwin 9' archs='i386 ppc'
    libxml2 @2.8.0_0+universal (active) platform='darwin 9' archs='i386 ppc'
cdev$ sudo port -v installed libiconv
The following ports are currently installed:
    libiconv @1.14_0 platform='darwin 9' archs='i386'
    libiconv @1.14_0+universal (active) platform='darwin 9' archs='i386 ppc'

Replying to egall@…:

Relevant part of log:

Undefined symbols:
  "_libiconv_close", referenced from:
      _xmlCharEncCloseFunc in libxml_rpl_la-encoding.o
      _xmlCharEncCloseFunc in libxml_rpl_la-encoding.o
      _xmlFindCharEncodingHandler in libxml_rpl_la-encoding.o
      _xmlFindCharEncodingHandler in libxml_rpl_la-encoding.o
  "_libiconv", referenced from:
      _xmlIconvWrapper in libxml_rpl_la-encoding.o
  "_libiconv_open", referenced from:
      _xmlFindCharEncodingHandler in libxml_rpl_la-encoding.o
      _xmlFindCharEncodingHandler in libxml_rpl_la-encoding.o
      _xmlFindCharEncodingHandler in libxml_rpl_la-encoding.o
      _xmlFindCharEncodingHandler in libxml_rpl_la-encoding.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
make[4]: *** [libgettextlib.la] Error 1
make[4]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_devel_gettext/gettext/work/gettext-0.18.2-x86_64/gettext-tools/gnulib-lib'
make[3]: *** [all] Error 2
make[3]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_devel_gettext/gettext/work/gettext-0.18.2-x86_64/gettext-tools/gnulib-lib'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_devel_gettext/gettext/work/gettext-0.18.2-x86_64/gettext-tools'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_devel_gettext/gettext/work/gettext-0.18.2-x86_64/gettext-tools'
make: *** [all-recursive] Error 1
make: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_devel_gettext/gettext/work/gettext-0.18.2-x86_64'
Command failed:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_devel_gettext/gettext/work/gettext-0.18.2-x86_64" && /usr/bin/make -j2 -w all 
Exit code: 2
Error: org.macports.build for port gettext returned: command execution failed

What does "port -v installed libiconv" say for you? How about "port -v installed libxml*"?

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

comment:6 in reply to:  4 ; Changed 12 years ago by cooljeanius (Eric Gallager)

Looking back at the log, it looks like MacPorts is trying to build gettext for x86_64 while libiconv is only built for i386 and ppc. Try adding x86_64 to your universal_variants in your macports.conf, then rebuilding libiconv, and then rebuilding gettext, and then seeing if that does anything.

Last edited 12 years ago by cooljeanius (Eric Gallager) (previous) (diff)

comment:7 in reply to:  6 Changed 12 years ago by ryandesign (Ryan Carsten Schmidt)

Replying to egall@…:

Looking back at the log, it looks like MacPorts is trying to build gettext for x86_64 while libiconv is only built for i386 and ppc.

Agreed.

Try adding x86_64 to your universal_variants in your macports.conf,

You mean universal_archs. It's already there. Look at the first line of the log:

--->  Attempting to fetch gettext-0.18.2_2+universal.darwin_9.i386-x86_64.tbz2 from http://packages.macports.org/gettext

then rebuilding libiconv, and then rebuilding gettext, and then seeing if that does anything.

Yes, you can't go switching universal_archs (or build_arch) after you've already installed ports. To make this work, uninstall all ports that were installed i386 ppc universal, then reinstall them for the new i386 x86_64 universal.

comment:8 Changed 12 years ago by cdev9@…

Thank you. Did the default behavior ever change?

The machine has always been x86_64 capable but it seems as if macports only recently started allowing x86_64 architecture to be supported. Or more likely I didn't notice the "universal archs" line before fairly recently. Maybe my mistake was adding x86_64 when I should have added ppc. Its confusing but then again, considering that Apple switched architectures what can one expect, in that context, I guess confusion is understandable.

At some point I noticed that x86_64 ports started showing up, I had thought that Leopard was not capable of building for x86_64. For now, i would be happy to just have it work. However, I have no use (on this machine) for ppc "universal".

Last edited 12 years ago by cdev9@… (previous) (diff)

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

The defaults haven't changed. For Leopard on an Intel Mac, the default build_arch is i386, and the default universal_archs are i386 ppc. Leopard is a 64-bit OS and you can change universal_archs to i386 x86_64 if you want; evidence suggests you have already done this, and that's why things are a problem now. Either switch universal_archs back to i386 ppc, or simply refrain from building things universal if you don't need the ppc part, or else leave universal_archs at i386 x86_64 and rebuild all ports you've already installed universal.

comment:10 in reply to:  9 Changed 12 years ago by cdev9@…

*Thank you* for your help! What I think I had done was for a long time I had -universal selected in variants.conf and so, no universal libraries were built and the situation was simple. I may have removed it as a workaround to get something to build and forgot to re-insert it. I think there are only a few currently built with x86_64, however, if it was not that difficult I would love to transition to x86_64 if macports runs faster without having to upgrade the entire OS. If it isn't faster, then I'll just leave it as it was before, assuming that I haven't done too much damage. [Edit: There were only five x86_64 binaries, so, no, I didn't]

What exactly changed with macports? It seems as if there is a relatively new option to build with x86_64 on Leopard. Or maybe I am just noticing something that was there all along?

Replying to ryandesign@…:

The defaults haven't changed. For Leopard on an Intel Mac, the default build_arch is i386, and the default universal_archs are i386 ppc. Leopard is a 64-bit OS and you can change universal_archs to i386 x86_64 if you want; evidence suggests you have already done this, and that's why things are a problem now. Either switch universal_archs back to i386 ppc, or simply refrain from building things universal if you don't need the ppc part, or else leave universal_archs at i386 x86_64 and rebuild all ports you've already installed universal.

Last edited 12 years ago by cdev9@… (previous) (diff)

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

From our side, nothing has changed that would have caused this problem.

To see for what architectures your ports are installed, use:

port -v installed

So to see which are installed for x86_64 you could use:

port -v installed | grep x86_64

x86_64 might be imperceptibly faster than i386. The x86_64 architecture has more registers available than i386, so some programs might benefit from that.

You don't need to build universal if all you want is to build x86_64. You could change build_arch to x86_64. But again you'd have to first uninstall all ports that were already built with the old i386 build_arch.

comment:12 in reply to:  11 Changed 12 years ago by larryv (Lawrence Velázquez)

Replying to ryandesign@…:

You don't need to build universal if all you want is to build x86_64.

What would happen in this case if cdev9 wanted to install an i386-only port, but its dependencies were already installed x86_64 and universal_archs was left at i386 ppc? Would its dependencies be rebuilt i386/PPC? That seems undesirable.

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

Yes, that would be undesirable. If you want x86_64, you'd probably set build_arch to x86_64 and set universal_archs to i386 x86_64. Which is of course the default on Snow Leopard and later.

comment:14 Changed 12 years ago by cdev9@…

This ticket should be tagged as solved. It was my own mistake, and not a bug.

Last edited 12 years ago by cdev9@… (previous) (diff)

comment:15 Changed 12 years ago by larryv (Lawrence Velázquez)

Resolution: invalid
Status: newclosed
Note: See TracTickets for help on using tickets.