Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#60465 closed defect (fixed)

textmate2: Portfile does not parse properly on older systems

Reported by: kencu (Ken) Owned by: neverpanic (Clemens Lang)
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc:
Port: textmate2

Description

This is on 10.6.8, have not surveyed all systems for cutoff for error.

Error: Unable to determine location of a macOS SDK.
Error: Unable to determine location of a macOS SDK.
Error: Unable to determine location of a macOS SDK.
Failed to parse file editors/textmate2/Portfile: can't read "configure.compiler": can't read "compiler.fallback": can't read "configure.sdkroot": Unable to determine location of a macOS SDK.

Change History (6)

comment:1 Changed 4 years ago by neverpanic (Clemens Lang)

Resolution: fixed
Status: assignedclosed

I think this has been fixed a while ago. All uses of configure.sdkroot are now in a catch block.

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

Resolution: fixed
Status: closedreopened

Nope, still broken.

% port -d info textmate2
DEBUG: Changing to port directory: /opt/local/var/macports/sources/rsync.macports.org/release/tarballs/ports/editors/textmate2
DEBUG: OS darwin/10.8.0 (macOS 10.6) arch i386
DEBUG: Sourcing PortGroup compiler_blacklist_versions 1.0 from /opt/local/var/macports/sources/rsync.macports.org/release/tarballs/ports/_resources/port1.0/group/compiler_blacklist_versions-1.0.tcl
DEBUG: Sourcing PortGroup github 1.0 from /opt/local/var/macports/sources/rsync.macports.org/release/tarballs/ports/_resources/port1.0/group/github-1.0.tcl
DEBUG: Re-registering default for livecheck.regex
DEBUG: compiler clang 77 blacklisted because it matches {clang < 602}
Error: Unable to determine location of a macOS SDK.
Error: Unable to determine location of a macOS SDK.
DEBUG: only one arch supported, so not adding the default universal variant
DEBUG: Running callback portconfigure::add_automatic_compiler_dependencies
Error: Unable to determine location of a macOS SDK.
DEBUG: Unable to determine location of a macOS SDK.
    while executing
"portconfigure::configure_get_sdkroot ${configure.sdk_version}"
    invoked from within
"subst {[portconfigure::configure_get_sdkroot ${configure.sdk_version}]}"
    invoked from within
"set configure.sdkroot [subst {[portconfigure::configure_get_sdkroot ${configure.sdk_version}]}]"
    ("uplevel" body line 1)
    invoked from within
"uplevel #0 [list set $optionName] [subst -nocommands {[subst {$option_defaults($optionName)}]}]"
    (procedure "default_check" line 10)
    invoked from within
"default_check configure.sdkroot {} read"
    (read trace on "configure.sdkroot")
    invoked from within
"set $option"
    (procedure "option" line 10)
    invoked from within
"option configure.sdkroot"
    (procedure "portconfigure::get_apple_compilers_xcode_version" line 29)
    invoked from within
"portconfigure::get_apple_compilers_xcode_version"
    (procedure "portconfigure::get_compiler_fallback" line 13)
    invoked from within
"portconfigure::get_compiler_fallback"
    invoked from within
"subst {[portconfigure::get_compiler_fallback]}"
    invoked from within
"set compiler.fallback [subst {[portconfigure::get_compiler_fallback]}]"
    ("uplevel" body line 1)
    invoked from within
"uplevel #0 [list set $optionName] [subst -nocommands {[subst {$option_defaults($optionName)}]}]"
    (procedure "default_check" line 10)
    invoked from within
"default_check compiler.fallback {} read"
    (read trace on "compiler.fallback")
    invoked from within
"set $option"
    (procedure "option" line 10)
    invoked from within
"option compiler.fallback"
    (procedure "portconfigure::configure_get_default_compiler" line 10)
    invoked from within
"portconfigure::configure_get_default_compiler"
    invoked from within
"subst {[portconfigure::configure_get_default_compiler]}"
    invoked from within
"set configure.compiler [subst {[portconfigure::configure_get_default_compiler]}]"
    ("uplevel" body line 1)
    invoked from within
"uplevel #0 [list set $optionName] [subst -nocommands {[subst {$option_defaults($optionName)}]}]"
    (procedure "default_check" line 10)
    invoked from within
"default_check configure.compiler {} read"
    (read trace on "configure.compiler")
    invoked from within
"compiler_is_port ${configure.compiler}"
    (procedure "portconfigure::add_automatic_compiler_dependencies" line 8)
    invoked from within
"${callback}"
    (procedure "port::run_callbacks" line 5)
    invoked from within
"port::run_callbacks"
    invoked from within
"$workername eval {port::run_callbacks}"
    (procedure "mportopen" line 62)
    invoked from within
"mportopen $porturl [array get options] [array get merged_variations]"
Error: Unable to open port: can't read "configure.compiler": can't read "compiler.fallback": can't read "configure.sdkroot": Unable to determine location of a macOS SDK.

comment:3 Changed 4 years ago by neverpanic (Clemens Lang)

That backtrace makes it seem like that's more a problem with base than with the port though… it seems this happens when reading configure.compiler in portconfigure::add_automatic_compiler_dependencies. Doesn't seem like there's anything I could do in the port to avoid this.

comment:4 Changed 4 years ago by kencu (Ken)

here's an observation.

It only happens on 10.6.8 with Xcode 3.2.6.

If I select Xcode 4.2, the Portfile parses normally.

Although - I have Xcode 4.2 in /Developer and Xcode 3.2.6 elsewhere, so that may or may not be relevant too.

Last edited 4 years ago by kencu (Ken) (previous) (diff)

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

Resolution: fixed
Status: reopenedclosed

In 4bec4bc4af2e9e4dfb1ae39aad1c5bf194766fcb/macports-ports (master):

textmate2: avoid erroring out too soon on older platforms

Closes: #60465

comment:6 Changed 4 years ago by jmroot (Joshua Root)

In 5764fd926501f1cc620c3acf6e88ebda99f58fb9/macports-base (master):

Never raise an error in configure_get_sdkroot

There may be times when it's appropriate to error out when the
requested SDK isn't present, but this isn't the right place for it,
since it can make Portfiles fail to parse entirely.

See: #60465

Note: See TracTickets for help on using tickets.