Opened 15 years ago

Closed 15 years ago

Last modified 15 years ago

#20506 closed defect (fixed)

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@…, tobypeterson
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 (10)

comment:1 Changed 15 years ago by ryanwalklin@…

Cc: ryanwalklin@… added

Cc Me!

comment:2 Changed 15 years ago by nerdling (Jeremy Lavergne)

Keywords: snowleopard added
Milestone: MacPorts 1.8.0
Port: ncursesw added
Version: 1.7.11.8.0

comment:3 Changed 15 years ago by nerdling (Jeremy Lavergne)

Cc: imajes@… added; ryanwalklin@… removed
Priority: NormalLow

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

comment:4 Changed 15 years ago by tobypeterson

Cc: toby@… added
Version: 1.8.0

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

comment:5 Changed 15 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.

comment:6 Changed 15 years ago by tobypeterson

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?

comment:7 Changed 15 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

comment:8 Changed 15 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.

comment:9 Changed 15 years ago by tobypeterson

Resolution: fixed
Status: newclosed

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

comment:10 Changed 15 years ago by ryanwalklin@…

Nice, thanks very much.

Note: See TracTickets for help on using tickets.