Closed Bug 351695 Opened 18 years ago Closed 18 years ago

seamonkey debug build fails (missing #include)

Categories

(Core :: DOM: Core & HTML, defect)

PowerPC
macOS
defect
Not set
critical

Tracking

()

RESOLVED FIXED

People

(Reporter: stefanh, Assigned: peterv)

References

Details

Attachments

(1 file)

Mac OS 10.3.9, gcc3.3

My ppc seamonkey debug build fails. Without the patch in bug 347524 it works fine. I was told by biesi that the cause of the errors looks like an '#include "nsIDOMNode.h"' is missing from nsNodeUtils.h. This also seems to be the case. I don't know if that is the right fix, though.

------------------------------------------------------
-DMOZILLA_CLIENT -include ../../../mozilla-config.h -Wp,-MD,.deps/nsNodeUtils.pp /Users/Stefan/debug-test/mozilla/content/base/src/nsNodeUtils.cpp
In file included from ../../../dist/include/js/jspubtd.h:46,
                 from ../../../dist/include/content/nsContentUtils.h:45,
                 from /Users/Stefan/debug-test/mozilla/content/base/src/nsNodeUtils.cpp:39:
../../../dist/include/xpcom/nsCOMPtr.h: In destructor `nsCOMPtr<T>::~nsCOMPtr() 
   [with T = nsIDOMNode]':
/Users/Stefan/debug-test/mozilla/content/base/src/nsNodeUtils.h:163:   instantiated from here
../../../dist/include/xpcom/nsCOMPtr.h:581: error: invalid static_cast from 
   type `nsIDOMNode*' to type `nsISupports*'
../../../dist/include/xpcom/nsCOMPtr.h:583: error: `Release' undeclared (first 
   use this function)
../../../dist/include/xpcom/nsCOMPtr.h:583: error: (Each undeclared identifier 
   is reported only once for each function it appears in.)
../../../dist/include/xpcom/nsCOMPtr.h: At global scope:
../../../dist/include/xpcom/nsCOMPtr.h: In instantiation of `nsDerivedSafe<nsIDOMNode>':
../../../dist/include/xpcom/nsCOMPtr.h:1370:   instantiated from `nsGetterAddRefs<T>::~nsGetterAddRefs() [with T = nsIDOMNode]'
/Users/Stefan/debug-test/mozilla/content/base/src/nsNodeUtils.h:166:   instantiated from here
../../../dist/include/xpcom/nsCOMPtr.h:1370: error: base class `nsIDOMNode' has 
   incomplete type
../../../dist/include/xpcom/nsCOMPtr.h: In destructor `
   nsGetterAddRefs<T>::~nsGetterAddRefs() [with T = nsIDOMNode]':
/Users/Stefan/debug-test/mozilla/content/base/src/nsNodeUtils.h:166:   instantiated from here
../../../dist/include/xpcom/nsCOMPtr.h:1370: error: invalid static_cast from 
   type `nsDerivedSafe<nsIDOMNode>*' to type `nsISupports*'
../../../dist/include/xpcom/nsCOMPtr.h: In member function `void 
   nsCOMPtr<T>::Assert_NoQueryNeeded() [with T = nsIDOMNode]':
../../../dist/include/xpcom/nsCOMPtr.h:1374:   instantiated from `nsGetterAddRefs<T>::~nsGetterAddRefs() [with T = nsIDOMNode]'
/Users/Stefan/debug-test/mozilla/content/base/src/nsNodeUtils.h:166:   instantiated from here
../../../dist/include/xpcom/nsCOMPtr.h:593: error: no matching function for 
   call to `do_QueryInterface(nsIDOMNode*&)'
../../../dist/include/xpcom/nsCOMPtr.h:380: error: candidates are: 
   nsQueryInterface do_QueryInterface(nsISupports*)
../../../dist/include/xpcom/nsCOMPtr.h:387: error:                 
   nsQueryInterfaceWithError do_QueryInterface(nsISupports*, nsresult*)
../../../dist/include/xpcom/nsCOMPtr.h:594: warning: comparison between 
   distinct pointer types `nsDerivedSafe<nsIDOMNode>*' and `nsIDOMNode*' lacks 
   a cast
../../../dist/include/xpcom/nsCOMPtr.h: In member function `void 
   nsCOMPtr<T>::assign_assuming_AddRef(T*) [with T = nsIDOMNode]':
../../../dist/include/xpcom/nsCOMPtr.h:1301:   instantiated from `void** nsCOMPtr<T>::begin_assignment() [with T = nsIDOMNode]'
../../../dist/include/xpcom/nsCOMPtr.h:901:   instantiated from `T** nsCOMPtr<T>::StartAssignment() [with T = nsIDOMNode]'
../../../dist/include/xpcom/nsCOMPtr.h:1391:   instantiated from `nsGetterAddRefs<T>::operator T**() [with T = nsIDOMNode]'
/Users/Stefan/debug-test/mozilla/content/base/src/nsNodeUtils.h:166:   instantiated from here
../../../dist/include/xpcom/nsCOMPtr.h:565: error: invalid static_cast from 
   type `nsIDOMNode*' to type `nsISupports*'
../../../dist/include/xpcom/nsCOMPtr.h:566: error: invalid static_cast from 
   type `nsIDOMNode*' to type `nsISupports*'
../../../dist/include/xpcom/nsCOMPtr.h:568: error: `Release' undeclared (first 
   use this function)
/Users/Stefan/debug-test/mozilla/content/base/src/nsNodeUtils.cpp: In static 
   member function `static nsresult 
   nsNodeUtils::CallUserDataHandlers(nsCOMArray<nsINode>&, nsIDocument*, short 
   unsigned int, int)':
/Users/Stefan/debug-test/mozilla/content/base/src/nsNodeUtils.cpp:250: error: no
   matching function for call to `nsContentUtils::CallUserDataHandler(
   nsIDocument*&, PRUint16&, nsINode*&, nsCOMPtr<nsIDOMNode>&, 
   nsCOMPtr<nsIDOMNode>&)'
../../../dist/include/content/nsContentUtils.h:892: error: candidates are: 
   static void nsContentUtils::CallUserDataHandler(nsIDocument*, short unsigned 
   int, const nsINode*, nsIDOMNode*, nsIDOMNode*)
/Users/Stefan/debug-test/mozilla/content/base/src/nsNodeUtils.cpp: In function 
   `PLDHashOperator AdoptFunc(const nsAttrKey&, nsIDOMNode*, void*)':
/Users/Stefan/debug-test/mozilla/content/base/src/nsNodeUtils.cpp:322: error: no
   matching function for call to `do_QueryInterface(nsCOMPtr<nsIDOMNode>&, 
   nsresult*)'
../../../dist/include/xpcom/nsCOMPtr.h:380: error: candidates are: 
   nsQueryInterface do_QueryInterface(nsISupports*)
../../../dist/include/xpcom/nsCOMPtr.h:387: error:                 
   nsQueryInterfaceWithError do_QueryInterface(nsISupports*, nsresult*)
make[7]: *** [nsNodeUtils.o] Error 1
make[6]: *** [libs] Error 2
make[5]: *** [libs] Error 2
make[4]: *** [libs_tier_gecko] Error 2
make[3]: *** [tier_gecko] Error 2
make[2]: *** [default] Error 2
make[1]: *** [build] Error 2
make: *** [build] Error 2
------------------------------------------------------

My configure options (those are slightly different from binus which seems ok):

mk_add_options MOZ_CO_PROJECT=suite
ac_add_options --with-macos-sdk=/Developer/SDKs/MacOSX10.2.8.sdk
ac_add_options --enable-application=suite
ac_add_options --enable-debug
ac_add_options --disable-optimize
ac_add_options --enable-extensions=default,tasks
ac_add_options --enable-svg
ac_add_options --enable-canvas
ac_add_options --enable-crypto
Blocks: 347524
No longer depends on: 347524
I'm seeing something like this on BeOS as well (gcc2.95.3). Adding 
#include "nsIDOMNode.h"
to nsNodeUtils.h
makes content/base build succeed. Hoping someone will fix this fast.
Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.9a1) Gecko/20061023 Minefield/3.0a1

I have been seeing this exact problem since 2006-09-25, and I have not come 
across your report before today despite querying bugzilla.

I enclose a patch which provides the same fix (see comment 1 also).

I have no real idea what the problem is or whether this is the right fix!
Attachment #243196 - Flags: review?
Comment on attachment 243196 [details] [diff] [review]
Patch to include nsIDOMNode.h per various comments here

>+#ifndef __gen_nsIDOMNode_h__
>+#include "nsIDOMNode.h"
>+#endif

You won't need the ifndef, endif lines here.  Those come from the generated nsIDOMNode.h file to indicate whether nsIDOMNode.h's contents have been applied or not yet.  Just the include line would be necessary.
Assignee: general → peterv
Attachment #243196 - Flags: review? → review?(peterv)
Ben probably wants to read comment #3 ...
Attachment #243196 - Flags: review?(peterv) → review-
This may have busted at least a couple of Camino tboxes.
(In reply to comment #6)
> This may have busted at least a couple of Camino tboxes.

No it didn't, and iirc there's a bug on file about those tboxes having build issues.
(In reply to comment #4)
> Ben probably wants to read comment #3 ...

I'm still learning the ropes. I was observing
http://lxr.mozilla.org/seamonkey/source/xpcom/glue/nsCOMPtr.h#57 .
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: