Problems building Firefox 1.5.0.2 on Solaris 9 with Forte 6 Update 2

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Problems building Firefox 1.5.0.2 on Solaris 9 with Forte 6 Update 2

Greg Earle-3
(Before anyone says "So use Leon's contrib builds!" - hey, I like to roll
my own with my own switches, what can I say.)

While trying to compile Firefox 1.5.0.2 on Solaris 9 with Sun's Forte 6
Update 2
compiler suite, I hit thisproblem:

nsInputStreamChannel.cpp
CC -o nsInputStreamChannel.o -c  -DMOZILLA_INTERNAL_API
-DOSTYPE=\"SunOS5\" [...]
nsInputStreamChannel.cpp

"nsInputStreamChannel.cpp", line 395: Error: Could not find a match for
NS_QueryNotificationCallbacks(nsCOMPtr<nsIInterfaceRequestor>,
nsCOMPtr<nsILoadGroup>, nsCOMPtr<nsIProgressEventSink>).

1 Error(s) detected.
gmake[5]: *** [nsInputStreamChannel.o] Error 1
gmake[5]: Leaving directory
`/usr/local/src/WWW/mozilla/1.8.0-Firefox/mozilla/netwerk/base/src'

For some reason, gcc 3.3.x can compile this file without errors.  (But
I have to use Forte 6, otherwise I won't be able to use the Sun Java
plug-in.  Yes, I know it's old. Compiler changes require God signing off
on them where I work :-) )

I asked my local C++ guru and, after cursing Templates under his breath,
he offered me this patch to mozilla/netwerk/base/public/nsNetUtil.h:

# diff -rC 0 mozilla/netwerk/base/public/nsNetUtil.h.dist
mozilla/netwerk/base/public/nsNetUtil.h
*** mozilla/netwerk/base/public/nsNetUtil.h.dist    Mon Jul 25 13:27:02 2005
--- mozilla/netwerk/base/public/nsNetUtil.h Wed Apr 19 12:07:17 2006
***************
*** 979 ****
--- 980,988 ----
+ /* template helper */
+ template <class T> inline void
+ NS_QueryNotificationCallbacks(nsCOMPtr<nsIInterfaceRequestor> aCallbacks,
+                               nsCOMPtr<nsILoadGroup>          aLoadGroup,
+                               nsCOMPtr<T>           &aResult)
+ {
+     NS_QueryNotificationCallbacks((nsIInterfaceRequestor *)&aCallbacks,
+       (nsILoadGroup *)&aLoadGroup, aResult);
+ }

(I copy/paste'd this, so it should probably be applied by hand.)

What baffles me is that Leon Sha from Sun has been building the
"contrib" Solaris builds using (apparently) Sun Workshop 8 - I don't
understand how he couldn't have run smack into this same problem.

Anyway - does this patch look reasonable?  If so, how does one
submit it?  (I've never tried to submit a bug report for Mozilla before)

Thanks,

        - Greg

_______________________________________________
dev-builds mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-builds
Reply | Threaded
Open this post in threaded view
|

Re: Problems building Firefox 1.5.0.2 on Solaris 9 with Forte 6 Update 2

Boris Zbarsky
Greg Earle wrote:
> + template <class T> inline void
> + NS_QueryNotificationCallbacks(nsCOMPtr<nsIInterfaceRequestor> aCallbacks,
> +                               nsCOMPtr<nsILoadGroup>          aLoadGroup,
> +                               nsCOMPtr<T>           &aResult)
> + {
> +     NS_QueryNotificationCallbacks((nsIInterfaceRequestor *)&aCallbacks,
> +       (nsILoadGroup *)&aLoadGroup, aResult);

Make that

   NS_QueryNotificationCallbacks(aCallbacks.get(), aLoagroup.get(), aResult)

and I'll buy it.  The other is depending on internals of nsCOMPtr that it's
better not to depend on.

> Anyway - does this patch look reasonable?  If so, how does one
> submit it?  (I've never tried to submit a bug report for Mozilla before)

File a bug at https://bugzilla.mozilla.org/enter_bug.cgi -- You want the "More
products" thing, then the product is "Core" and the component is "Networking".
cc "darin@meer" on the bug.

Once you file the bug (with just a problem description), you can go to the bug
page and attach attachments (like patches).  Do that, and when filing request
review from "darin@meer".

Feel free to mail me if you run into any trouble!

-Boris
_______________________________________________
dev-builds mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-builds
Reply | Threaded
Open this post in threaded view
|

Re: Problems building Firefox 1.5.0.2 on Solaris 9 with Forte 6 Update 2

Greg Earle-3
On 2006-04-19 19:08:09 -0700, Boris Zbarsky <[hidden email]> said:

> Greg Earle wrote:
>> + template <class T> inline void
>> + NS_QueryNotificationCallbacks(nsCOMPtr<nsIInterfaceRequestor> aCallbacks,
>> +                               nsCOMPtr<nsILoadGroup>          aLoadGroup,
>> +                               nsCOMPtr<T>           &aResult)
>> + {
>> +     NS_QueryNotificationCallbacks((nsIInterfaceRequestor *)&aCallbacks,
>> +       (nsILoadGroup *)&aLoadGroup, aResult);
>
> Make that
>
>    NS_QueryNotificationCallbacks(aCallbacks.get(), aLoadGroup.get(), aResult);
>
> and I'll buy it.  The other is depending on internals of nsCOMPtr that
> it's better not to depend on.
>
>> Anyway - does this patch look reasonable?  If so, how does one
>> submit it?  (I've never tried to submit a bug report for Mozilla before)
>
> File a bug at https://bugzilla.mozilla.org/enter_bug.cgi -- You want
> the "More products" thing, then the product is "Core" and the component
> is "Networking". cc "darin@meer" on the bug.
>
> Once you file the bug (with just a problem description), you can go to
> the bug page and attach attachments (like patches).  Do that, and when
> filing request review from "darin@meer".

Thanks Boris.  I finally got it to work, thanks to your patch - and I needed
another one in the same file (for the 2-argument case):

*** netwerk/base/public/nsNetUtil.h.dist        Mon Jul 25 13:27:02 2005
--- netwerk/base/public/nsNetUtil.h     Thu Apr 20 03:14:58 2006
***************
*** 979 ****
--- 980,996 ----
+ /* template helper */
+ template <class T> inline void
+ NS_QueryNotificationCallbacks(nsCOMPtr<nsIInterfaceRequestor> aCallbacks,
+                               nsCOMPtr<nsILoadGroup>          aLoadGroup,
+                               nsCOMPtr<T>           &aResult)
+ {
+     NS_QueryNotificationCallbacks(aCallbacks.get(), aLoadGroup.get(),
aResult);
+ }
+
+ /* template helper */
+ template <class T> inline void
+ NS_QueryNotificationCallbacks(nsCOMPtr<nsIChannel> aChannel,
+                               nsCOMPtr<T>           &aResult)
+ {
+     NS_QueryNotificationCallbacks(aChannel.get(), aResult);
+ }
+

I'll submit this now - with this patch, not only does 1.5.0.2 build,
but it runs as well.

Thanks again!

        - Greg

_______________________________________________
dev-builds mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-builds
Reply | Threaded
Open this post in threaded view
|

Re: Problems building Firefox 1.5.0.2 on Solaris 9 with Forte 6 Update 2

Christian Biesinger
In reply to this post by Greg Earle-3
Greg Earle wrote:
> What baffles me is that Leon Sha from Sun has been building the
> "contrib" Solaris builds using (apparently) Sun Workshop 8 - I don't
> understand how he couldn't have run smack into this same problem.

Probably because that compiler version doesn't have this bug :)
_______________________________________________
dev-builds mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-builds