New Ticket     Wiki     Browse Source     Timeline     Roadmap     Ticket Reports     Search

Ticket #20506 (closed defect: fixed)

Opened 3 years ago

Last modified 3 years ago

ncursesw fails to build universal on 10.6 x86_64

Reported by: ryanwalklin@… Owned by: macports-tickets@…
Priority: Low Milestone:
Component: ports Version:
Keywords: snowleopard Cc: imajes@…, toby@…
Port: ncursesw

Description

The portfile for ncursesw checks for cross-compilation before installing, however on x86_64, does not allow installation becaus: the port is not built for ppc and ppc64.

The portfile is trivially fixed by removing the section:

		if { ${need_cross}=="yes" && ${have_run}=="no" } {
			return -code error "At least one of the universal_archs values must run on your host architecture."
		}

Change History

Changed 3 years ago by ryanwalklin@…

  • cc ryanwalklin@… added

Cc Me!

Changed 3 years ago by snc@…

  • keywords snowleopard added
  • version changed from 1.7.1 to 1.8.0
  • port set to ncursesw
  • milestone MacPorts 1.8.0 deleted

Changed 3 years ago by snc@…

  • priority changed from Normal to Low
  • cc imajes@… added; ryanwalklin@… removed

Snow Leopard tickets are to be low priority until it is launched.

Changed 3 years ago by toby@…

  • cc toby@… added
  • version 1.8.0 deleted

Uh... what is universal_archs set to in macports.conf?

Changed 3 years ago by ryanwalklin@…

universal_archs		x86_64 i386

The conditionals for cross-compiling in the portfile don't seem to take into account the fact that ppc or ppc64 may not be present.

Changed 3 years ago by toby@…

The logic in the Portfile, while rather convoluted thanks to muniversal, looks fine to me. Port builds fine for me, so we'll need more info.

What SL build are you on?
How recent is your MacPorts install?
Are your ports up to date?

Changed 3 years ago by ryanwalklin@…

10A421a, running with x86_64 kernel, SVN as of yesterday with a selfupdate.

AFAICT, the relevant logic evaluates:

if {[variant_isset universal]} {

= true

                if { ${os.arch}=="i386" } {

= false so the else branch executes

                      foreach arch ${universal_archs_to_use} {
                               if { ${arch}=="i386" || ${arch}=="x86_64" } {

evaluates true as i386 is also selected in universal_archs_to_use. Then

                                if { ${arch}=="ppc" || ${arch}=="ppc64" } {

evaluates false as only i386 and x86_64 are set. Consequently, have_run is not set, and

                if { ${need_cross}=="yes" && ${have_run}=="no" } {

evaluates to true, so the build fails with the error as above. I suspect you are unable to replicate because you're using the i386 kernel? Looks like the logic may need to be extended to allow for an x86_64 kernel.

Thanks again for your attention.

-Ryan

Changed 3 years ago by ryanwalklin@…

Is there any reason not to set have_run just on whether the host architecture is included in universal_archs_to_use, and set need_cross if more than one architecture is selected? Then the relevant build destinations etc could be set just on whether each architecture is present in universal_archs_to_use.

Changed 3 years ago by toby@…

  • status changed from new to closed
  • resolution set to fixed

Ah, I don't test on K64. Should be fixed in r54798.

Changed 3 years ago by ryanwalklin@…

Nice, thanks very much.

Note: See TracTickets for help on using tickets.