Closed Bug 374362 Opened 18 years ago Closed 18 years ago

Build failure with -enable-accessibility, using OSX10.3.9SDK

Categories

(Core :: Disability Access APIs, defect)

PowerPC
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: phiw2, Assigned: surkov)

References

Details

Attachments

(1 file, 2 obsolete files)

Build environment 10.4.9 PPC, latest Xcode. Building Minefield/Camino with ac_add_options --enable-accessibility results in failure (using GCC 3.3, MacOSX10.3.9.sdk): camino-build/mozilla/accessible/src/mac/mozAccessible.mm /Users/phiw/camino-build/mozilla/accessible/src/mac/mozAccessible.mm: In function `objc_object* -[mozAccessible accessibilityAttributeValue:](mozAccessible*, objc_selector*, NSString*)': /Users/phiw/camino-build/mozilla/accessible/src/mac/mozAccessible.mm:205: error: ` NSAccessibilityRoleDescription' undeclared (first use this function) /Users/phiw/camino-build/mozilla/accessible/src/mac/mozAccessible.mm:205: error: (Each undeclared identifier is reported only once for each function it appears in.) /Users/phiw/camino-build/mozilla/accessible/src/mac/mozAccessible.mm:206: warning: invalid conversion from `const NSString*' to `NSString*' /Users/phiw/camino-build/mozilla/accessible/src/mac/mozAccessible.mm:214: warning: invalid conversion from `const NSString*' to `NSString*' /Users/phiw/camino-build/mozilla/accessible/src/mac/mozAccessible.mm: In function `NSString* -[mozAccessible role](mozAccessible*, objc_selector*)': /Users/phiw/camino-build/mozilla/accessible/src/mac/mozAccessible.mm:417: warning: invalid conversion from `const NSString*' to `NSString*' make[6]: *** [mozAccessible.o] Error 1 ... Using GCC 4.01+MacOSX10.3.9.sdk fails with the same error. Only using the MacOSX10.4u.sdk results in a successful build. Per a comment from smorgan in the forums: "NSAccessibilityRoleDescription is 10.4+, so there's no need to test gcc 3.3 or gather build logs. That function needs to be weak-linked or removed in order for the accessibility code to build for 10.3.9." http://forums.mozillazine.org/viewtopic.php?p=2801252#2801252 Expected: successful build.
(Standard Mac OS X PPC builds require the 10.3.9 SDK on the trunk, so this will cause Mac tinderboxen to go red if it's not fixed before --enable-accessibility its on by default on Mac OS X.)
Blocks: osxa11y
This is probably surkov.
Assignee: aaronleventhal → surkov.alexander
Attached patch patch (obsolete) (deleted) — Splinter Review
not sure it's my bad. I tried to fix it and if I get the bug right then it should work. Though I'm not sure what should be if the given attribute is NSAccessibilityRoleDescriptionAttribute. If mac guys know how it should be then please let me know.
Please test the patch.
Next error... /Users/phiw/camino-build/mozilla/accessible/src/mac/mozActionElements.mm: In function 'NSArray* -[mozPopupButtonAccessible accessibilityActionNames](mozPopupButtonAccessible*, objc_selector*)': /Users/phiw/camino-build/mozilla/accessible/src/mac/mozActionElements.mm:188: error: 'NSAccessibilityShowMenuAction' was not declared in this scope /Users/phiw/camino-build/mozilla/accessible/src/mac/mozActionElements.mm: In function 'NSString* -[mozPopupButtonAccessible accessibilityActionDescription:](mozPopupButtonAccessible*, objc_selector*, NSString*)': /Users/phiw/camino-build/mozilla/accessible/src/mac/mozActionElements.mm:196: error: 'NSAccessibilityShowMenuAction' was not declared in this scope make[6]: *** [mozActionElements.o] Error 1 Seeing this error, I suspect that lots of what Håkan has done need to be checked for compatibility with the OS10.3.9sdk (required to build on/for OS X PowerPC).
Comment on attachment 258955 [details] [diff] [review] patch If aaronlev is fine with the patch then I think I can continue slice mac ally support for 1.3.9 version ;)
Attachment #258955 - Flags: review?(aaronleventhal)
(In reply to comment #6) > (From update of attachment 258955 [details] [diff] [review]) > If aaronlev is fine with the patch then I think I can continue slice mac ally > support for 1.3.9 version ;) > Or it will be better if some mac guy can do it.
Comment on attachment 258955 [details] [diff] [review] patch Thanks. (I thought I'd get bugmail for being CC'd but apparently not)
Attachment #258955 - Flags: review?(aaronleventhal) → review+
(In reply to comment #8) > (From update of attachment 258955 [details] [diff] [review]) > Thanks. (I thought I'd get bugmail for being CC'd but apparently not) > Thank you, Hekan. Then the approach is right.
Attached patch patch2 (obsolete) (deleted) — Splinter Review
next portion, please test.
Attachment #258955 - Attachment is obsolete: true
philippe, feel free to take the bug because it is a long game to pass patches from me to you.
(In reply to comment #10) > Created an attachment (id=259005) [details] > patch2 Sorry about the delay, lots of work the past 2 days Unfortunately, this gives the same build error as commented above: Users/phiw/cocoafox/mozilla/accessible/src/mac/mozActionElements.mm: In function 'NSString* -[mozPopupButtonAccessible accessibilityActionDescription:](mozPopupButtonAccessible*, objc_selector*, NSString*)': /Users/phiw/cocoafox/mozilla/accessible/src/mac/mozActionElements.mm:198: error: 'NSAccessibilityShowMenuAction' was not declared in this scope make[6]: *** [mozActionElements.o] Error 1 make[5]: *** [libs] Error 2 (In reply to comment #11) > philippe, feel free to take the bug because it is a long game to pass patches > from me to you. > But, I don't understand most of that code, or any code for the matter.
Comment on attachment 259005 [details] [diff] [review] patch2 > - (NSArray *)accessibilityActionNames > { >+#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_4 > if ([self isEnabled]) { >- return [NSArray arrayWithObjects:NSAccessibilityPressAction, >- NSAccessibilityShowMenuAction, >+ return [NSArray arrayWithObjects:NSAccessibilityPressAction, >+ NSAccessibilityShowMenuAction, > nil]; > } >+#endif > return nil; > } The problem here is that apparently the ShowMenu action is new in 10.4 (see http://tinyurl.com/2xqr49). All constants or NSAccessibility features that are new as of Tiger are marked as such in apple's docs on NSAccessibility. You should only ifdef out the NSAccessibilityShowMenuAction line, and leave the line above and below as they are (otherwise you can't even invoke a click on popupmenus via accessibility any longer).
Attachment #259005 - Flags: review-
Yea, I get it. I just was totally blind :)
(In reply to comment #12) > (In reply to comment #11) > > philippe, feel free to take the bug because it is a long game to pass patches > > from me to you. > > > But, I don't understand most of that code, or any code for the matter. > In general you shoudn't deeply understand the code. To fix the bug we should if/endif all 10.4 stuff. No more. Than Hakan will look at the patch and will say what's wrong. Though if you prefer the way we are going on then it's fine with me, it's not a problem to look at your report and put additional if/endif :)
Attached patch patch3 (deleted) — Splinter Review
Attachment #259005 - Attachment is obsolete: true
(In reply to comment #16) > Created an attachment (id=259341) [details] > patch3 > Build succeeded !
Comment on attachment 259341 [details] [diff] [review] patch3 (In reply to comment #17) > (In reply to comment #16) > > Created an attachment (id=259341) [details] [details] > > patch3 > > > > Build succeeded ! > Ok. Thank you for testing. Hekan can review this?
Attachment #259341 - Flags: review?(hwaara)
Status: NEW → ASSIGNED
Comment on attachment 259341 [details] [diff] [review] patch3 One way to avoid all the ifdefs for 10.4-specific attributes is to define the constants ourselves. I've done this with a few already. But this approach is OK since the bustage needs to be fixed.
Attachment #259341 - Flags: review?(hwaara) → review+
(In reply to comment #19) > (From update of attachment 259341 [details] [diff] [review]) > One way to avoid all the ifdefs for 10.4-specific attributes is to define the > constants ourselves. I've done this with a few already. > > But this approach is OK since the bustage needs to be fixed. > checked in
Status: ASSIGNED → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
(In reply to comment #19) > (From update of attachment 259341 [details] [diff] [review]) > One way to avoid all the ifdefs for 10.4-specific attributes is to define the > constants ourselves. I've done this with a few already. > > But this approach is OK since the bustage needs to be fixed. I filed bug 375564 on doing this the right way ;) Thanks for the fixes!
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: