Closed Bug 557660 Opened 16 years ago Closed 16 years ago

WebGL interfaces are created even when MOZ_WEBGL unset

Categories

(Core :: Graphics: CanvasWebGL, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: niederstrasser, Assigned: peterv)

References

Details

Attachments

(1 file, 1 obsolete file)

On Darwin/X11, where I have MOZ_WEBGL turned off (bug 518173), I started getting undefined symbol errors when linking libxul.dylib (was OK 5 days ago at my last hg pull from m-c) Undefined symbols: "_kDOMClassInfo_WebGLFramebuffer_interfaces", referenced from: _kDOMClassInfo_WebGLFramebuffer_interfaces$non_lazy_ptr in nsDOMClassInfo.o "_kDOMClassInfo_CanvasRenderingContextWebGL_interfaces", referenced from: _kDOMClassInfo_CanvasRenderingContextWebGL_interfaces$non_lazy_ptr in nsDOMClassInfo.o "_kDOMClassInfo_WebGLBuffer_interfaces", referenced from: _kDOMClassInfo_WebGLBuffer_interfaces$non_lazy_ptr in nsDOMClassInfo.o "_kDOMClassInfo_WebGLTexture_interfaces", referenced from: _kDOMClassInfo_WebGLTexture_interfaces$non_lazy_ptr in nsDOMClassInfo.o "_kDOMClassInfo_WebGLProgram_interfaces", referenced from: _kDOMClassInfo_WebGLProgram_interfaces$non_lazy_ptr in nsDOMClassInfo.o "_kDOMClassInfo_WebGLRenderbuffer_interfaces", referenced from: _kDOMClassInfo_WebGLRenderbuffer_interfaces$non_lazy_ptr in nsDOMClassInfo.o "_kDOMClassInfo_WebGLShader_interfaces", referenced from: _kDOMClassInfo_WebGLShader_interfaces$non_lazy_ptr in nsDOMClassInfo.o ld: symbol(s) not found collect2: ld returned 1 exit status make[4]: *** [libxul.dylib] Error 1 make[4]: Leaving directory `/src/mozilla-central/obj-i386-apple-darwin9.8.0-browser/toolkit/library' bz pointed me to dom/base/nsDOMClassInfoClasses.h#452 . Placing that section inside an #ifdef allowed the linking to finish. Patch coming up. Interestingly, neither dom/base/nsDOMClassInfoClasses.h nor dom/base/nsDOMClassInfo.cpp show any activity in hg log since January.
Puts the webgl sections in nsDOMClassInfo behind an #ifdef
Assignee: nobody → niederstrasser
Status: NEW → ASSIGNED
Attachment #437418 - Flags: review?(jst)
Attachment #437418 - Flags: review?(jst) → review+
Comment on attachment 437418 [details] [diff] [review] puts webgl behind #ifdef MOZ_WEBGL This breaks a webgl-enabled build (MOZ_WEBGL isn't defined).
Attachment #437418 - Flags: review+ → review-
Attached patch v2Splinter Review
Assignee: niederstrasser → peterv
Attachment #437418 - Attachment is obsolete: true
Attachment #437844 - Flags: review?(jst)
(In reply to comment #4) > Created an attachment (id=437844) [details] > v2 This patch fixes the buildcrash described in comment 0 in my webgl-disabled tree.
While this patch worked fine for building trunk SeaMonkey, I tried Thunderbird against 1.9.3 with --disable-ogg --disable-wave and get these errors. I:\comm-central\obj-tbird\mozilla\dom\base\jsdombase_s.lib(nsDOMClassInfo.o) : error LNK2029: "_kDOMClassInfo_HTMLVideoElement_interfaces" : unresolved external I:\comm-central\obj-tbird\mozilla\dom\base\jsdombase_s.lib(nsDOMClassInfo.o) : error LNK2029: "_kDOMClassInfo_HTMLAudioElement_interfaces" : unresolved external I:\comm-central\obj-tbird\mozilla\dom\base\jsdombase_s.lib(nsDOMClassInfo.o) : error LNK2029: "_kDOMClassInfo_HTMLSourceElement_interfaces" : unresolved external I:\comm-central\obj-tbird\mozilla\dom\base\jsdombase_s.lib(nsDOMClassInfo.o) : error LNK2029: "_kDOMClassInfo_HTMLMediaError_interfaces" : unresolved external enabling ogg and wave allows the build to finish.
Those errors seem unrelated to this patch, no?
Attachment #437844 - Flags: review?(jst) → review+
(In reply to comment #7) > Those errors [involving moz_media] seem unrelated to this patch, no? They identify a problem with this fix. Adding some dummy DOMCI_DATA() statements may work in this case because there's a dummy source file to put them in. In the case of MOZ_MEDIA, there isn't. #ifdef MOZ_XXX works for SVG, MathML, etc, so it should work for WebGL and all the other optional features. If some platform lost WebGL because MOZ_WEBGL isn't defined, then that platform's configure.in entries should be updated to #define it by default. Instead of a special-case fix for WebGL, the original patch along with one for configure.in provides a more generic (i.e. appropriate) solution.
http://hg.mozilla.org/mozilla-central/rev/797e4ee41b51 (ended up using the wrong checkin name :-/). I'll open a new bug for MOZ_MEDIA.
Status: ASSIGNED → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: