#55649 closed defect (fixed)
tk @8.6.8 +quartz: error: use of undeclared identifier 'NSOperatingSystemVersion'
Reported by: | tehcog (tehcog) | Owned by: | ryandesign (Ryan Carsten Schmidt) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.4.2 |
Keywords: | mavericks mountainlion | Cc: | mascguy (Christopher Nielsen) |
Port: | tk |
Description
Please see attached log file.
tk @8.6.8 (x11) Variants: quartz, universal, [+]x11 Description: This is Tk version 8.6.8, a GUI toolkit for Tcl. The best way to get started with Tcl is to read ``Tcl and the Tk Toolkit'' by John K. Ousterhout, Addison-Wesley, ISBN 0-201-63337-X. Homepage: http://www.tcl.tk/ Build Dependencies: pkgconfig Library Dependencies: fontconfig, tcl, Xft2, xorg-libXScrnSaver Platforms: darwin License: Tcl/Tk Maintainers: none Jan 06 08:45:14 :xxXXxx: === Update MacPorts Jan 06 08:45:15 :xxXXxx: ---> Updating MacPorts base sources using rsync Jan 06 08:45:22 :xxXXxx: MacPorts base version 2.4.2 installed, Jan 06 08:45:22 :xxXXxx: MacPorts base version 2.4.2 downloaded. Jan 06 08:45:22 :xxXXxx: ---> MacPorts base is already the latest version Jan 06 08:45:23 :xxXXxx: === Update Portfiles Jan 06 08:45:23 :xxXXxx: ---> Updating the ports tree Jan 06 08:45:30 :xxXXxx: Jan 06 08:45:30 :xxXXxx: === List Outdated Ports Jan 06 08:45:30 :xxXXxx: tk @8.6.7_0+quartz Jan 06 08:45:30 :xxXXxx: Jan 06 08:45:30 :xxXXxx: === Clean Outdated Ports Jan 06 08:45:31 :xxXXxx: ---> Cleaning tk Jan 06 08:45:31 :xxXXxx: Jan 06 08:45:31 :xxXXxx: === Fetch Outdated Ports Jan 06 08:45:31 :xxXXxx: ---> Fetching distfiles for tk Jan 06 08:45:31 :xxXXxx: Jan 06 08:45:31 :xxXXxx: === Upgrade Outdated Ports (port -p upgrade --enforce-variants outdated) Jan 06 08:45:33 :xxXXxx: ---> Computing dependencies for tk Jan 06 08:45:33 :xxXXxx: ---> Fetching archive for tk Jan 06 08:45:33 :xxXXxx: ---> Attempting to fetch tk-8.6.8_0+quartz.darwin_13.x86_64.tbz2 from https://packages.macports.org/tk Jan 06 08:45:34 :xxXXxx: ---> Attempting to fetch tk-8.6.8_0+quartz.darwin_13.x86_64.tbz2 from http://sea.us.packages.macports.org/macports/packages/tk Jan 06 08:45:34 :xxXXxx: ---> Attempting to fetch tk-8.6.8_0+quartz.darwin_13.x86_64.tbz2 from http://ywg.ca.packages.macports.org/mirror/macports/packages/tk Jan 06 08:45:35 :xxXXxx: ---> Verifying checksums for tk Jan 06 08:45:35 :xxXXxx: ---> Extracting tk Jan 06 08:45:36 :xxXXxx: ---> Applying patches to tk Jan 06 08:45:36 :xxXXxx: ---> Configuring tk Jan 06 08:45:40 :xxXXxx: ---> Building tk Jan 06 08:45:46 :xxXXxx: Error: Failed to build tk: command execution failed Jan 06 08:45:46 :xxXXxx: Error: See /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_x11_tk/tk/main.log for details. Jan 06 08:45:46 :xxXXxx: Error: Follow https://guide.macports.org/#project.tickets to report a bug. Jan 06 08:45:46 :xxXXxx: Jan 06 08:45:46 :xxXXxx: === List Inactive Duplicate Ports Jan 06 08:45:46 :xxXXxx: Jan 06 08:45:46 :xxXXxx: === Uninstall Inactive Duplicate Ports Jan 06 08:45:46 :xxXXxx: Error: No ports matched the given expression Jan 06 08:45:46 :xxXXxx: Jan 06 08:45:46 :xxXXxx: === Upgrade Done
Attachments (1)
Change History (8)
Changed 7 years ago by tehcog (tehcog)
comment:1 Changed 7 years ago by Schamschula (Marius Schamschula)
Keywords: | mavericks added |
---|---|
Port: | @8.6.8 removed |
This issue will affect Mavericks and all older OS versions. tk is now using
https://developer.apple.com/documentation/foundation/nsoperatingsystemversion
to determine OS info.
comment:2 Changed 7 years ago by ryandesign (Ryan Carsten Schmidt)
Keywords: | mountainlion lion snowleopard leopard tiger added |
---|---|
Summary: | tk @8.6.8 (x11) fails to build on Mavericks → tk @8.6.8: error: use of undeclared identifier 'NSOperatingSystemVersion' |
So how did it build successfully on all of our buildbot workers?
comment:3 Changed 7 years ago by ryandesign (Ryan Carsten Schmidt)
Keywords: | lion snowleopard leopard tiger removed |
---|
Maybe specific to the +quartz variant?
The tk code actually says:
#if MAC_OS_X_VERSION_MIN_REQUIRED < 1080 Gestalt(gestaltSystemVersionMajor, (SInt32*)&major); Gestalt(gestaltSystemVersionMinor, (SInt32*)&minor); Gestalt(gestaltSystemVersionBugFix, (SInt32*)&patch); #else NSOperatingSystemVersion systemVersion = [[NSProcessInfo processInfo] operatingSystemVersion]; major = systemVersion.majorVersion; minor = systemVersion.minorVersion; patch = systemVersion.patchVersion; #endif
Looks like this code was originally added checking #if MAC_OS_X_VERSION_MIN_REQUIRED < 1080
, which was wrong since according to the Apple developer link from Marius above NSOperatingSystemVersion
was introduced in 10.10.
Then it was changed to check #if MAC_OS_X_VERSION_MIN_REQUIRED < 10100
which was wrong since the correct value for OS X 10.10 according to /usr/include/AvailabilityMacros.h is 101000
not 10100
.
Then it was changed back to #if MAC_OS_X_VERSION_MIN_REQUIRED < 1080
.
So that means the condition should be changed to #if MAC_OS_X_VERSION_MIN_REQUIRED < 101000
.
It also means it currently only affects Mavericks and Mountain Lion, not older or newer.
comment:4 Changed 7 years ago by ryandesign (Ryan Carsten Schmidt)
Owner: | set to ryandesign |
---|---|
Resolution: | → fixed |
Status: | new → closed |
comment:5 Changed 7 years ago by ryandesign (Ryan Carsten Schmidt)
Reported to the developers: https://core.tcl.tk/tcl/tktview/95a8293a2936e34cc8d0658c21e5214f1ca9b435
comment:6 Changed 7 years ago by ryandesign (Ryan Carsten Schmidt)
Summary: | tk @8.6.8: error: use of undeclared identifier 'NSOperatingSystemVersion' → tk @8.6.8 +quartz: error: use of undeclared identifier 'NSOperatingSystemVersion' |
---|
comment:7 Changed 2 years ago by mascguy (Christopher Nielsen)
Cc: | mascguy added |
---|
log