Opened 7 years ago
Closed 7 years ago
#54673 closed defect (fixed)
tk @8.6.7: quartz build broken on 10.7
Reported by: | mojca (Mojca Miklavec) | Owned by: | mojca (Mojca Miklavec) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | |
Keywords: | Cc: | kw@… | |
Port: | tk |
Description
An upgrade of Tk apparently broke the build on 10.7. The error being thrown:
/tk/work/tk8.6.7/unix/../macosx/tkMacOSXDialog.c:273:36: error: expected method to read array element not found on object of type 'NSMutableArray *' NSMutableArray *allowedtypes = filterInfo.fileTypeExtensions[filterInfo.fileTypeIndex]; ^
I didn't test any other platform, but version 8.6.6 build successfully and judging from http://packages.macports.org/tk/ the X11 version works as well.
A likely candidate for the failure could be this commit: https://core.tcl.tk/tk/info/8d7d752e4fe1714a
Log attached.
Attachments (2)
Change History (4)
Changed 7 years ago by mojca (Mojca Miklavec)
Attachment: | tk-main.log added |
---|
comment:1 Changed 7 years ago by mojca (Mojca Miklavec)
Citing the author (Christian Gollwitzer) of the patch that broke compilation:
Googling the error message leads to this:
I think I know what is the problem; there are
NSMutableArrays
which are indexed likearray[index]and accoridng to StackOverflow this "modern" syntax came with XCode 4.5 + newer SDKs. The older way was
[array objectAtIndex:index]It seems that you need Xcode 4.5 to compile it, or downgrade to clunky syntax for array access. Not sure that the rest will work, though.
Changed 7 years ago by mojca (Mojca Miklavec)
Attachment: | tkMacOSXDialog.c.diff added |
---|
patch for tkMacOSXDialog.c to make it work on older systems
comment:2 Changed 7 years ago by mojca (Mojca Miklavec)
Owner: | set to mojca |
---|---|
Resolution: | → fixed |
Status: | new → closed |
Build log for Tk +quartz on Lion