Patch for bug 396680 breaks 64-bit builds on SnowLeopard

RESOLVED FIXED

Status

()

Core
Widget: Cocoa
--
critical
RESOLVED FIXED
9 years ago
9 years ago

People

(Reporter: smichaud, Assigned: smichaud)

Tracking

Trunk
All
Mac OS X
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

My patch for bug 396680 breaks 64-bit builds.  They die with the
following link errors:

Undefined symbols:
  "_OBJC_CLASS_$_PDEPluginCallback", referenced from:
      l_OBJC_$_CATEGORY_PDEPluginCallback_$_MethodSwizzling
        in libwidget_mac.a(nsAppShell.o)
      __objc_classrefs__DATA@0 in libwidget_mac.a(nsAppShell.o)
  "_OBJC_IVAR_$_PDEPluginCallback._printWindowController", referenced from:
      -[PDEPluginCallback(MethodSwizzling)
        nsAppShell_PDEPluginCallback_dealloc]
        in libwidget_mac.a(nsAppShell.o)
ld: symbol(s) not found

These are caused by a change in the behavior of gcc:  The errors don't
happen when using gcc 4.2 to compile a 32-bit build on OS X 10.5.8.  I
haven't yet tried a 32-bit build (with gcc 4.2) on SnowLeopard.

The solution is to use a lower-level method to access the
PDEPluginCallback class's _printWindowController variable.

I'll post a patch in my next comment.

Thanks to Joel Reymont for pointing this out to me via email.
(Assignee)

Updated

9 years ago
Assignee: nobody → smichaud
Blocks: 396680
(Assignee)

Comment 1

9 years ago
Created attachment 418457 [details] [diff] [review]
Fix/workaround
Attachment #418457 - Flags: review?(joshmoz)
(Assignee)

Updated

9 years ago
Status: NEW → ASSIGNED
(Assignee)

Comment 2

9 years ago
I've tested this patch in a 32-bit build on OS X 10.5.8.  It has
exactly the same functionality as the previous code -- it still fixes
bug 396680, without introducing any new problems.
(Assignee)

Updated

9 years ago
Summary: Patch for bug 396680 breaks 64-bit builds → Patch for bug 396680 breaks 64-bit builds on SnowLeopard
(Assignee)

Comment 3

9 years ago
The link errors don't happen doing a 32-bit build on SnowLeopard.  So they only happen doing 64-bit builds.
(Assignee)

Comment 4

9 years ago
Joel, please test my patch and let us know your results.

Updated

9 years ago
Attachment #418457 - Flags: review?(joshmoz) → review+
(Assignee)

Comment 5

9 years ago
Landed on trunk:
http://hg.mozilla.org/mozilla-central/rev/4ad1dfc25ea7
Status: ASSIGNED → RESOLVED
Last Resolved: 9 years ago
Resolution: --- → FIXED
Builds fine on x86-64.
You need to log in before you can comment on or make changes to this bug.