| Ticket UUID: | c789692418553e02c2c6de57f3b0ef9b793380b8 | |||
| Title: | tk build on Mac OS X 10.6 fails with "assignment of read-only variable" | |||
| Type: | Bug | Version: | 8.6.16 | |
| Submitter: | sevanj | Created on: | 2025-07-24 18:49:05 | |
| Subsystem: | 83. Mac OS X Build | Assigned To: | marc_culler | |
| Priority: | 5 Medium | Severity: | Minor | |
| Status: | Pending | Last Modified: | 2025-08-02 11:49:44 | |
| Resolution: | Wont Fix | Closed By: | nobody | |
| Closed on: | ||||
| Description: |
Tried to build version 8.6.16 with GCC 4.2 & llvm-gcc from Xcode, same error with both compilers, though the number of the variable changes. tk8.6.16/unix/../macosx/tkMacOSXWindowEvent.c: In function ‘-[TKContentView(TKWindowEvent) initWithFrame:]’: tk8.6.16/unix/../macosx/tkMacOSXWindowEvent.c:981: error: assignment of read-only variable ‘prop.238’ make: *** [tkMacOSXWindowEvent.o] Error 1 | |||
| User Comments: |
sevanj added on 2025-08-02 11:49:44:
With the patch it is sufficient to complete the build on OS X 10.6 with GCC 4.2, however to run the test target there needs a patch which I'll raise a bug report for later, in order to build the test runner by invoking make test. The test suite completes on OS X 10.6 but there are some failing tests on a 64-bit build. I haven't tried on a 32-bit build. This bug tracker is strange, I don't seem to have a direct way of replying to the ticket, so hopefully this is the right method. chrstphrchvz added on 2025-08-02 10:54:15: I believe the reporter’s error has been encountered before at https://trac.macports.org/ticket/71659#comment:12 (warning: heated discussion). I am curious whether the reporter’s patch is sufficient to be able to finish building Tk Aqua on 10.6. I know that MacPorts successfully builds Tk Aqua 8.6.16 on macOS 10.6, but only after additional patching for 32-bit and by using compilers much newer than the ones in Xcode. marc_culler (claiming to be Marc Culler) added on 2025-07-27 02:58:23: Thank you for the patch! I will take a look at it. marc_culler (claiming to be Marc Culler) added on 2025-07-25 03:48:44: I am sorry to have to tell you that macOS 10.6 is no longer supported by Tk. TIP #715 lists 10.13 as the oldest supported version. Differences between the clang and gcc Objective C compilers make supporting 10.6 even harder than 10.7-10.12. We do need to make Tk compile on current OS versions, after all. | |||
Attachments:
- patch-tk86-gcc42-macosx-fix.txt [download] added by sevanj on 2025-07-26 15:17:54. [details]
