[MacPorts] #52537: hatari - fix for build on Snow Leopard without Xcode 4.2
#52537: hatari - fix for build on Snow Leopard without Xcode 4.2 -------------------------------------+-------------------------------- Reporter: ken.cunningham.webuse@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.4 Keywords: haspatch maintainer | Port: hatari -------------------------------------+-------------------------------- building the hatari GUI on Snow Leopard requires Xcode 4.2. Add logic to select proper build depending on Xcode version installed and selected. -- Ticket URL: <https://trac.macports.org/ticket/52537> MacPorts <https://www.macports.org/> Ports system for the Mac operating system
#52537: hatari - fix for build on Snow Leopard without Xcode 4.2 --------------------------------------+--------------------------------- Reporter: ken.cunningham.webuse@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.4 Resolution: | Keywords: haspatch maintainer Port: hatari | --------------------------------------+--------------------------------- Comment (by ken.cunningham.webuse@…): I wasn't completely sure about the revision bump. I suspect it is actually _not_ needed, as no installed hatari ports need to be touched. This only fixes the failed build on 10.6 with stock Xcode 3.2.6. -- Ticket URL: <https://trac.macports.org/ticket/52537#comment:1> MacPorts <https://www.macports.org/> Ports system for the Mac operating system
#52537: hatari - fix for build on Snow Leopard without Xcode 4.2 --------------------------------------+--------------------------------- Reporter: ken.cunningham.webuse@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.4 Resolution: | Keywords: haspatch maintainer Port: hatari | --------------------------------------+--------------------------------- Comment (by ryandesign@…): Correct, there's no reason to increase the revision. Requiring Xcode 4.2 to build the GUI on Snow Leopard is not great, since Xcode 4.x for Snow Leopard cannot be obtained by anyone who has not paid Apple for a developer program membership. -- Ticket URL: <https://trac.macports.org/ticket/52537#comment:2> MacPorts <https://www.macports.org/> Ports system for the Mac operating system
#52537: hatari - fix for build on Snow Leopard without Xcode 4.2 --------------------------------------+--------------------------------- Reporter: ken.cunningham.webuse@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.4 Resolution: | Keywords: haspatch maintainer Port: hatari | --------------------------------------+--------------------------------- Comment (by ken.cunningham.webuse@…): By default, stock Snow Leopard will go ahead and build the command line version, like 10.4 and 10.5 But optionally, if you have installed Xcode 4.2, you can have the GUI - why not, I thought? Seems a more egalitarian choice. (and perhaps influenced by the fact that that's what I have, myself :> ). -- Ticket URL: <https://trac.macports.org/ticket/52537#comment:3> MacPorts <https://www.macports.org/> Ports system for the Mac operating system
#52537: hatari - fix for build on Snow Leopard without Xcode 4.2 --------------------------------------+--------------------------------- Reporter: ken.cunningham.webuse@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.4 Resolution: | Keywords: haspatch maintainer Port: hatari | --------------------------------------+--------------------------------- Comment (by ken.cunningham.webuse@…): New diff file, deleting the rev bump. Otherwise I think it's good to go. -- Ticket URL: <https://trac.macports.org/ticket/52537#comment:4> MacPorts <https://www.macports.org/> Ports system for the Mac operating system
#52537: hatari - fix for build on Snow Leopard without Xcode 4.2 --------------------------------------+--------------------------------- Reporter: ken.cunningham.webuse@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.4 Resolution: | Keywords: haspatch maintainer Port: hatari | --------------------------------------+--------------------------------- Comment (by ryandesign@…): Do you know which part of Xcode 4.2 is required? I'm guessing it's not something we have an alternative implementation of in MacPorts? -- Ticket URL: <https://trac.macports.org/ticket/52537#comment:5> MacPorts <https://www.macports.org/> Ports system for the Mac operating system
#52537: hatari - fix for build on Snow Leopard without Xcode 4.2 --------------------------------------+--------------------------------- Reporter: ken.cunningham.webuse@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.4 Resolution: | Keywords: haspatch maintainer Port: hatari | --------------------------------------+--------------------------------- Comment (by ken.cunningham.webuse@…): The GUI uses a feature of ObjectiveC (ARC) that wasn't added until 4.x. And there was one other ObjC feature that wouldn't build without 4.2 as well that I can't recall. I'm happy to try rebuilding it with Xcode 3.2.6 and put the log up for you, if you have time to dig into it that far. Have you been trying hatari out? I haven't seen StarGlider running since 1987! What a blast. -- Ticket URL: <https://trac.macports.org/ticket/52537#comment:6> MacPorts <https://www.macports.org/> Ports system for the Mac operating system
#52537: hatari - fix for build on Snow Leopard without Xcode 4.2 --------------------------------------+--------------------------------- Reporter: ken.cunningham.webuse@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.4 Resolution: | Keywords: haspatch maintainer Port: hatari | --------------------------------------+--------------------------------- Comment (by ken.cunningham.webuse@…): Here you are - relevant part of the Xcode 3.2.6 GUI build failure log is here, full log attached above. Xcode 4.2 builds it without trouble. I'd be delighted to learn there is some kind of alternative macports fix for this. --Best, K {{{ :info:build In file included from /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_emulators_hatari/hatari/work/hatari-1.9.0/src /gui-osx/PrefsController.m:18: :info:build /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_emulators_hatari/hatari/work/hatari-1.9.0/src /gui-osx/PrefsController.h:78:5: error: :info:build unknown type name '__unsafe_unretained' :info:build __unsafe_unretained IBOutlet NSStepper *TTRAMSizeStepper; :info:build ^ :info:build /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_emulators_hatari/hatari/work/hatari-1.9.0/src /gui-osx/PrefsController.h:78:44: error: :info:build expected ';' at end of declaration list :info:build __unsafe_unretained IBOutlet NSStepper *TTRAMSizeStepper; :info:build ^ :info:build /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_emulators_hatari/hatari/work/hatari-1.9.0/src /gui-osx/PrefsController.h:79:5: error: :info:build unknown type name '__unsafe_unretained' :info:build __unsafe_unretained IBOutlet NSTextField *TTRAMSizeValue; :info:build ^ :info:build /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_emulators_hatari/hatari/work/hatari-1.9.0/src /gui-osx/PrefsController.h:79:46: error: :info:build expected ';' at end of declaration list :info:build __unsafe_unretained IBOutlet NSTextField *TTRAMSizeValue; :info:build ^ :info:build /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_emulators_hatari/hatari/work/hatari-1.9.0/src /gui-osx/PrefsController.h:83:5: error: :info:build unknown type name '__unsafe_unretained' :info:build __unsafe_unretained IBOutlet NSButtonCell *bCell68060; :info:build ^ :info:build /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_emulators_hatari/hatari/work/hatari-1.9.0/src /gui-osx/PrefsController.h:83:47: error: :info:build expected ';' at end of declaration list :info:build __unsafe_unretained IBOutlet NSButtonCell *bCell68060; :info:build ^ :info:build /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_emulators_hatari/hatari/work/hatari-1.9.0/src /gui-osx/PrefsController.m:1042:6: error: :info:build use of undeclared identifier 'TTRAMSizeValue' :info:build [TTRAMSizeValue setIntValue: [sender intValue]]; :info:build ^ :info:build 7 diagnostics generated. :info:build make[2]: *** [src/CMakeFiles/hatari.dir/gui- osx/PrefsController.m.o] Error 1 :info:build make[2]: *** Waiting for unfinished jobs.... :info:build make[2]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_emulators_hatari/hatari/work/build' :info:build make[1]: *** [src/CMakeFiles/hatari.dir/all] Error 2 :info:build make[1]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_emulators_hatari/hatari/work/build' :info:build make: *** [all] Error 2 }}} -- Ticket URL: <https://trac.macports.org/ticket/52537#comment:7> MacPorts <https://www.macports.org/> Ports system for the Mac operating system
#52537: hatari - fix for build on Snow Leopard without Xcode 4.2 --------------------------------------+--------------------------------- Reporter: ken.cunningham.webuse@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.4 Resolution: | Keywords: haspatch maintainer Port: hatari | --------------------------------------+--------------------------------- Comment (by mojca@…): My suggestion would be to commit that change and try to figure out a solution for older Xcode versions afterwards, if possible at all. The changes seem totally reasonable to me. Minor "typo": {{{ so blacklist it on 10.6+ }}} this is probably on 10.7+ now :) -- Ticket URL: <https://trac.macports.org/ticket/52537#comment:8> MacPorts <https://www.macports.org/> Ports system for the Mac operating system
#52537: hatari - fix for build on Snow Leopard without Xcode 4.2 --------------------------------------+--------------------------------- Reporter: ken.cunningham.webuse@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.4 Resolution: | Keywords: haspatch maintainer Port: hatari | --------------------------------------+--------------------------------- Comment (by larryv@…): Replying to [comment:7 ken.cunningham.webuse@…]:
{{{ :info:build In file included from /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_emulators_hatari/hatari/work/hatari-1.9.0/src /gui-osx/PrefsController.m:18: :info:build /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_emulators_hatari/hatari/work/hatari-1.9.0/src /gui-osx/PrefsController.h:78:5: error: :info:build unknown type name '__unsafe_unretained' :info:build __unsafe_unretained IBOutlet NSStepper *TTRAMSizeStepper; :info:build ^ }}}
`__unsafe_unretained` is an ARC variable lifetime qualifier, which requires Xcode 4.2. https://developer.apple.com/library/prerelease/content/releasenotes/Objectiv... You could try blacklisting `{ clang < 211 }` so that one of our compilers is used. I think Snow Leopard’s Objective-C runtime is new enough to handle it. -- Ticket URL: <https://trac.macports.org/ticket/52537#comment:10> MacPorts <https://www.macports.org/> Ports system for the Mac operating system
#52537: hatari - fix for build on Snow Leopard without Xcode 4.2 --------------------------------------+--------------------------------- Reporter: ken.cunningham.webuse@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.4 Resolution: | Keywords: haspatch maintainer Port: hatari | --------------------------------------+--------------------------------- Comment (by ken.cunningham.webuse@…): Larry & Ryan, you were right. SnowLeopard will build the MacOS GUI with xcode 3.2.6 installed, but with a newer version of clang. In the end I forced it to macports-clang-3.7 or newer, as most people would / should likely have that clang version on Snow Leopard. (3.8 doesn't work correctly, and 3.9 won't compile on SL unless you have installed my as-yet-not-published libSnowLeopardFixes port. I must admit, the blacklisting / fallbacking took a while to figure out right, and I'm not certain even now I have it fully correct. Even when I blacklisted { clang < 211 } the system kept choosing xcode's clang. I tried bumping the number up to 500, and it '''still''' chose xcode's clang, even though i have macports-clang-3.7 installed. Only when I blacklisted all clang did it ignore xcode's clang, and then it started installed macports-clang-3.4 (even though macports-clang-3.7 was there). I understand in a rudimentary way how the logic for this goes, but if you're going to force a clang install on SL, it might as well be 3.7. Ultimately I blacklisted everything up to macports-clang-3.6, and then added a fallback for 3.7. I suppose I might just have whitelisted macports-clang-3.7 and achieved the same effect. New portfile fix coming shortly. Let me know if I got it right this time. --K -- Ticket URL: <https://trac.macports.org/ticket/52537#comment:11> MacPorts <https://www.macports.org/> Ports system for the Mac operating system
#52537: hatari - fix for build on Snow Leopard without Xcode 4.2 --------------------------------------+--------------------------------- Reporter: ken.cunningham.webuse@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.4 Resolution: | Keywords: haspatch maintainer Port: hatari | --------------------------------------+--------------------------------- Comment (by larryv@…): Replying to [comment:11 ken.cunningham.webuse@…]:
In the end I forced it to macports-clang-3.7 or newer, as most people would / should likely have that clang version on Snow Leopard.
This is not a safe assumption to make. Given that 3.7 is (a) not in the default fallback list for Xcode 3.2 and (b) requires manual bootstrapping, 3.4 is almost certainly more likely to be present.
Even when I blacklisted { clang < 211 } the system kept choosing xcode's clang. I tried bumping the number up to 500, and it '''still''' chose xcode's clang, even though i have macports-clang-3.7 installed. Only when I blacklisted all clang did it ignore xcode's clang
This doesn’t sound right. Did you add the compiler_blacklist_versions-1.0 portgroup? Base doesn’t support version blacklisting on its own.
and then it started installed macports-clang-3.4 (even though macports-clang-3.7 was there).
MacPorts does not just use whatever compiler happens to be there. It follows the combination of blacklist/whitelist/fallback list, which is deterministic.
I understand in a rudimentary way how the logic for this goes, but if you're going to force a clang install on SL, it might as well be 3.7.
This isn’t the place for this conversation, but I disagree because 3.7 requires manual bootstrapping. I suspect you just didn’t use compiler_blacklist_versions-1.0. If you add that, blacklisting `{clang < 211}` should work fine. -- Ticket URL: <https://trac.macports.org/ticket/52537#comment:12> MacPorts <https://www.macports.org/> Ports system for the Mac operating system
#52537: hatari - fix for build on Snow Leopard without Xcode 4.2 --------------------------------------+--------------------------------- Reporter: ken.cunningham.webuse@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.4 Resolution: | Keywords: haspatch maintainer Port: hatari | --------------------------------------+--------------------------------- Comment (by ken.cunningham.webuse@…):
did you compiler_blacklist_versions-1.0 portgroup?
Ah -- of course -- the 'ol '''compiler_blacklist_versions-1.0 portgroup''' -- man, I really gotta find / write / discover / google a manual for these guys. I feel like I'm fumbling around in the dark sometimes. I will add that, and no doubt all my ports that have tried this trick (and failed) will now succeed. I tried adding the '''compilers''' portgroup. I think I'll just go read through all the portgroups and see what's in there, as clearly I better know. by the way, clang-3.7 installed (using the default libstdc++ of course) without any fanfare on a stock SnowLeopard installation. I think you only need to fuss with it if you want libc++. new - new - new patch coming after I write it :> -- K -- Ticket URL: <https://trac.macports.org/ticket/52537#comment:13> MacPorts <https://www.macports.org/> Ports system for the Mac operating system
#52537: hatari - fix for build on Snow Leopard without Xcode 4.2 --------------------------------------+--------------------------------- Reporter: ken.cunningham.webuse@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.4 Resolution: | Keywords: haspatch maintainer Port: hatari | --------------------------------------+--------------------------------- Comment (by ken.cunningham.webuse@…): I believe this should do it. In addition to fixing the clang version requirement, I found a tos.img in the downloaded files and added that to the app bundle as a default tos.img (real tos images work better for certain things), and I included a dependency on portaudio that enables certain other features. Thanks to all for the time you have spent teaching me the nuances. I had thought this would be an easy port to start off with -- little did I know ... -- K New patch uploaded. -- Ticket URL: <https://trac.macports.org/ticket/52537#comment:14> MacPorts <https://www.macports.org/> Ports system for the Mac operating system
#52537: hatari - fix for build on Snow Leopard without Xcode 4.2 --------------------------------------+--------------------------------- Reporter: ken.cunningham.webuse@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.4 Resolution: | Keywords: haspatch maintainer Port: hatari | --------------------------------------+--------------------------------- Comment (by ken.cunningham.webuse@…): At any rate, I don't see that I'm going to improve this patch any further than this -- not worth more effort. So this patch can suffice for those on Snow Leopard who go looking for it to work, and we can close this ticket off as a 'won't fix'. Upstream indicates the next release of Hatari is coming out quite soon, and the macos GUI won't build on it anyway due to 10.7-specific SDK usage. -- Ticket URL: <https://trac.macports.org/ticket/52537#comment:15> MacPorts <https://www.macports.org/> Ports system for the Mac operating system
participants (1)
-
MacPorts