Summary: | [GTK] Undefined Symbol build error "_objc_registerThreadWithCollector" when building WebKit GTK Mac OS X on Snow Leopard | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | devchan1 | ||||||||
Component: | WebKitGTK | Assignee: | Nobody <webkit-unassigned> | ||||||||
Status: | RESOLVED FIXED | ||||||||||
Severity: | Major | CC: | benjamin, berto, cgarcia, cmarcelo, commit-queue, darin, jeremyhu | ||||||||
Priority: | P2 | ||||||||||
Version: | 528+ (Nightly build) | ||||||||||
Hardware: | Mac (Intel) | ||||||||||
OS: | OS X 10.6 | ||||||||||
URL: | N/A | ||||||||||
Bug Depends on: | |||||||||||
Bug Blocks: | 126492 | ||||||||||
Attachments: |
|
Created attachment 89936 [details]
Patch to avoid including os x specific threading code when bullding WebKit GTK
That's not the right fix. I think you actually want to change OS(MAC_OS_X) to PLATFORM(MAC). Yeah, that patch is no longer valid, but it is fixed with: sed -i "s:OS(MAC_OS_X):PLATFORM(MAC):" Source/WTF/wtf/ThreadingPthreads.cpp Is this still relevant? Yes. Please make the provided change. Created attachment 211348 [details]
Patch
Comment on attachment 211348 [details]
Patch
Are you sure this is what Qt wants on Mac too?
Comment on attachment 211348 [details]
Patch
If Qt doesn’t also want this code, then I think the original that specifically called out PLATFORM(GTK) might in fact be what we want.
(In reply to comment #8) > (From update of attachment 211348 [details]) > If Qt doesn’t also want this code, then I think the original that > specifically called out PLATFORM(GTK) might in fact be what we want. I guess this doesn't matter anymore and we can apply the patch as it is? Jeremy, can you confirm if this is still working fine? (In reply to comment #10) > Jeremy, can you confirm if this is still working fine? The issue still exists (at least in webkit-gtk 2.3.3). We're still doing the following OS/Platform fixes: # https://bugs.webkit.org/show_bug.cgi?id=99683 reinplace "s:PLATFORM(MAC):OS(DARWIN):g" \ ${worksrcpath}/Source/JavaScriptCore/heap/VTableSpectrum.cpp \ ${worksrcpath}/Source/JavaScriptCore/jit/ThunkGenerators.cpp \ ${worksrcpath}/Source/JavaScriptCore/tools/CodeProfile.cpp # https://bugs.webkit.org/show_bug.cgi?id=58737 reinplace "s:OS(MAC_OS_X):PLATFORM(MAC):" \ ${worksrcpath}/Source/WTF/wtf/ThreadingPthreads.cpp (In reply to comment #11) > # https://bugs.webkit.org/show_bug.cgi?id=58737 > reinplace "s:OS(MAC_OS_X):PLATFORM(MAC):" \ > ${worksrcpath}/Source/WTF/wtf/ThreadingPthreads.cpp Ok, this one is still fine, now it only needs to be reviewed. Comment on attachment 211348 [details]
Patch
Is this change correct for iOS too? I'd r+, but I'd prefer someone who knows the apple ports to do it.
Comment on attachment 211348 [details]
Patch
This does no harm on iOS, but our long term direction is to use PLATFORM directly as little as possible and use more specific #if statements so the platform configuration system works and is not tied to specific platforms. I guess the real issue here is that GTK is choosing not to support garbage collection, so ideally the condition would be #if USE(COCOA_GC) or something along those lines.
(In reply to comment #14) > ideally the condition would be #if USE(COCOA_GC) or something along > those lines. It looks like a good policy, but I guess it doesn't make sense to define COCOA_GC just for this case. Committed r177023: <http://trac.webkit.org/changeset/177023> (In reply to comment #15) > It looks like a good policy, but I guess it doesn't make sense to > define COCOA_GC just for this case. I believe there are a number of other places in the code that should use COCOA_GC. It's just that the other places don't simply fail to compile. One possible example is the code in the adoptNS function in RetainPtr.h. It uses "#if defined(OBJC_NO_GC)" and instead it should use "#if !USE(COCOA_GC)". This is a missed optimization opportunity. |
Created attachment 89935 [details] Patch to avoid including os x specific threading code when bullding WebKit GTK The following build error occurs when building WebKit GTK rev 84097 on Mac OS X Snow Leopard: Undefined symbols: "_objc_registerThreadWithCollector", referenced from: WTF::initializeCurrentThreadInternal(char const*)in libJavaScriptCore.a(libJavaScriptCore_la-ThreadingPthreads.o) ld: symbol(s) not found collect2: ld returned 1 exit status make[1]: *** [Programs/jsc] Error 1 make: *** [all] Error 2