Opened 14 years ago

Closed 10 years ago

#25873 closed defect (fixed)

gtk2 +universal fails because sysctl hw.cpu64bit_capable doesn't work on Tiger

Reported by: ryandesign (Ryan Carsten Schmidt) Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: ports Version: 1.9.1
Keywords: tiger Cc: cooljeanius (Eric Gallager)
Port: gtk2

Description

It appears gtk2 uses "sysctl hw.cpu64bit_capable" in its universal variant, but this doesn't exist on Tiger so the port fails with this peculiar error message:

$ sudo port -du upgrade --enforce-variants gtk2 +universal 
DEBUG: epoch: in tree: 0 installed: 0
DEBUG: gtk2 2.20.1_0 exists in the ports tree
DEBUG: gtk2 2.20.1_0 +darwin_8+x11 is the latest installed
DEBUG: gtk2 2.20.1_0 +darwin_8+x11 is active
DEBUG: Merging existing variants '+darwin_8+x11' into variants
DEBUG: new fully merged portvariants: darwin_8 + universal + x11 +
DEBUG: Changing to port directory: /Users/rschmidt/macports/dports/x11/gtk2
DEBUG: OS darwin/8.11.1 (Mac OS X 10.4) arch i386
DEBUG: org.macports.load registered provides 'load', a pre-existing procedure. Target override will not be provided
DEBUG: org.macports.distfiles registered provides 'distfiles', a pre-existing procedure. Target override will not be provided
DEBUG: Using group file /Users/rschmidt/macports/dports/_resources/port1.0/group/archcheck-1.0.tcl
DEBUG: Using group file /Users/rschmidt/macports/dports/_resources/port1.0/group/muniversal-1.0.tcl
DEBUG: Reading variant descriptions from /Users/rschmidt/macports/dports/_resources/port1.0/variant_descriptions.conf
DEBUG: Using group file /Users/rschmidt/macports/dports/_resources/port1.0/group/xcodeversion-1.0.tcl
DEBUG: sysctl failed: No such file or directory
    invoked from within
"sysctl hw.cpu64bit_capable"
    invoked from within
"if {[variant_isset universal]} {
    set cups /usr/bin/cups-config
    if {[info exists universal_sysroot]} {
        set cups ${universal_sysroot}${c..."
    (file "Portfile" line 116)
    invoked from within
"source Portfile"
    invoked from within
"$workername eval source Portfile"
    (procedure "mportopen" line 49)
    invoked from within
"mportopen $porturl [array get interp_options] [array get variations]"
Error: Unable to open port: sysctl failed: No such file or directory

Here's what it says if I run it manually:

$ sysctl hw.cpu64bit_capable
second level name cpu64bit_capable in hw.cpu64bit_capable is invalid

Here's all the properties that are available on my 64-bit capable MacBook Pro:

$ sysctl hw
hw.ncpu: 2
hw.byteorder: 1234
hw.memsize: 2147483648
hw.activecpu: 2
hw.physicalcpu: 2
hw.physicalcpu_max: 2
hw.logicalcpu: 2
hw.logicalcpu_max: 2
hw.cputype: 7
hw.cpusubtype: 4
hw.cpufamily: 1114597871
hw.cacheconfig: 2 1 2 0 0 0 0 0 0 0
hw.pagesize: 4096
hw.busfrequency: 664000000
hw.busfrequency_min: 664000000
hw.busfrequency_max: 664000000
hw.cpufrequency: 2160000000
hw.cpufrequency_min: 2160000000
hw.cpufrequency_max: 2160000000
hw.cachelinesize: 64
hw.l1icachesize: 32768
hw.l1dcachesize: 32768
hw.l2cachesize: 4194304
hw.tbfrequency: 1000000000
hw.optional.floatingpoint: 1
hw.optional.mmx: 1
hw.optional.sse: 1
hw.optional.sse2: 1
hw.optional.sse3: 1
hw.optional.x86_64: 1
hw.optional.supplementalsse3: 1
hw.machine = i386
hw.model = MacBookPro2,2
hw.ncpu = 2
hw.byteorder = 1234
hw.physmem = 2147483648
hw.usermem = 1898987520
hw.pagesize = 4096
hw.epoch = 0
hw.vectorunit = 1
hw.busfrequency = 664000000
hw.cpufrequency = 2160000000
hw.cachelinesize = 64
hw.l1icachesize = 32768
hw.l1dcachesize = 32768
hw.l2settings = 1
hw.l2cachesize = 4194304
hw.tbfrequency = 1000000000
hw.memsize = 2147483648
hw.availcpu = 2

Perhaps we could check "hw.optional.x86_64" instead? That sounds promising, and appears to still exist on Snow Leopard. Or we could use hw.cpu64bit_capable on Leopard and up and just special-case Tiger. I don't know what the PowerPC equivalent of hw.optional.x86_64 is though because I don't have a Mac with a G5 processor to check on.

Change History (5)

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

Owner: changed from nox@… to macports-tickets@…

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

hw.optional.64bitops

for ppc64 BTW.

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

Keywords: tiger added

comment:4 Changed 11 years ago by cooljeanius (Eric Gallager)

Cc: egall@… added

Cc Me!

comment:5 Changed 10 years ago by jmroot (Joshua Root)

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