Closed
Bug 532091
Opened 16 years ago
Closed 14 years ago
IRIX/MIPSPro & Firefox 3.5.5 compile failure in gfx/thebes: ambiguous conversion of nsReturnRef<class> to nsReturningRef<class>
Categories
(Core :: Graphics, defect)
Tracking
()
RESOLVED
INCOMPLETE
People
(Reporter: f.p.x.everdij, Unassigned)
Details
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.15) Gecko/2009102815 Ubuntu/9.04 (jaunty) Firefox/3.0.15
Build Identifier: http://releases.mozilla.org/pub/mozilla.org/firefox/releases/3.5.5/source/firefox-3.5.5.source.tar.bz2
While building Firefox 3.5.5 and Seamonkey 2.0 on my Origin 200 running IRIX 6.5.30 and using MIPSPro compiler version 7.4.4 i encountered a failure to compile gfx/thebes/src/gfxFontconfigUtils.c and gfx/thebes/src/gfxPangoFonts.cpp
This has to do with the template classes nsReturnRef and NsReturningRef in xpcom/nsAutoRef.h
Reproducible: Always
Steps to Reproduce:
1. set up and download necessary dependencies for IRIX.
2. untar source and patch it
3. gmake -f client.mk build (gmake is an alias for GNU make)
Actual Results:
Here is the specific compiler output:
cc-1322 CC: ERROR File = ../../../dist/include/xpcom/nsAutoRef.h, Line = 376
More than one user-defined conversion from "nsReturnRef<FcPattern>" to
"nsReturningRef<FcPattern>" applies.
Function symbol function "nsReturnRef<FcPattern>::operator
nsReturningRef<FcPattern>()" is ambiguous by inheritance.
Function symbol function
"nsReturningRef<FcPattern>::nsReturningRef(nsReturnRef<Fc
Pattern> &)" is ambiguous by inheritance.
return nsReturningRef<T>(*this);
^
detected during instantiation of "nsReturnRef<FcPattern>::operator
nsReturningRef<FcPattern>()" at line 249 of
"/usr/people/everdij/firefox35/mozilla-1.9.1/gfx/thebes/src
/gfxFontconfigUtils.cpp"
1 error detected in the compilation of "/usr/people/everdij/firefox35/mozilla-1.9.1/gfx/thebes/src/gfxFontconfigUtils.cpp".
gmake[6]: *** [gfxFontconfigUtils.o] Error 2
gmake[6]: *** Waiting for unfinished jobs....
cc-1322 CC: ERROR File = ../../../dist/include/xpcom/nsAutoRef.h, Line = 376
More than one user-defined conversion from "nsReturnRef<PangoFont>" to
"nsReturningRef<PangoFont>" applies.
Function symbol function "nsReturnRef<PangoFont>::operator
nsReturningRef<PangoFont>()" is ambiguous by inheritance.
Function symbol function
"nsReturningRef<PangoFont>::nsReturningRef(nsReturnRef<Pa
ngoFont> &)" is ambiguous by inheritance.
return nsReturningRef<T>(*this);
^
detected during instantiation of "nsReturnRef<PangoFont>::operator
nsReturningRef<PangoFont>()" at line 651 of
"/usr/people/everdij/firefox35/mozilla-1.9.1/gfx/thebes/src
/gfxPangoFonts.cpp"
cc-1322 CC: ERROR File = ../../../dist/include/xpcom/nsAutoRef.h, Line = 376
More than one user-defined conversion from "nsReturnRef<FcFontSet>" to
"nsReturningRef<FcFontSet>" applies.
Function symbol function "nsReturnRef<FcFontSet>::operator
nsReturningRef<FcFontSet>()" is ambiguous by inheritance.
Function symbol function
"nsReturningRef<FcFontSet>::nsReturningRef(nsReturnRef<Fc
FontSet> &)" is ambiguous by inheritance.
return nsReturningRef<T>(*this);
^
detected during instantiation of "nsReturnRef<FcFontSet>::operator
nsReturningRef<FcFontSet>()" at line 973 of
"/usr/people/everdij/firefox35/mozilla-1.9.1/gfx/thebes/src
/gfxPangoFonts.cpp"
cc-1322 CC: ERROR File = ../../../dist/include/xpcom/nsAutoRef.h, Line = 376
More than one user-defined conversion from "nsReturnRef<FcPattern>" to
"nsReturningRef<FcPattern>" applies.
Function symbol function "nsReturnRef<FcPattern>::operator
nsReturningRef<FcPattern>()" is ambiguous by inheritance.
Function symbol function
"nsReturningRef<FcPattern>::nsReturningRef(nsReturnRef<Fc
Pattern> &)" is ambiguous by inheritance.
return nsReturningRef<T>(*this);
^
detected during instantiation of "nsReturnRef<FcPattern>::operator
nsReturningRef<FcPattern>()" at line 2037 of
"/usr/people/everdij/firefox35/mozilla-1.9.1/gfx/thebes/src
/gfxPangoFonts.cpp"
3 errors detected in the compilation of "/usr/people/everdij/firefox35/mozilla-1.9.1/gfx/thebes/src/gfxPangoFonts.cpp".
gmake[6]: *** [gfxPangoFonts.o] Error 2
.mozconfig file used:
CC=c99
CXX=CC
CFLAGS='-n32 -INLINE -woff 1174'
CPPFLAGS='-I/usr/local/include -I/usr/nekoware/include'
LDFLAGS='-L/usr/local/lib -L/usr/nekoware/lib'
LIBS='-lm'
CXXFLAGS='-Zf,_245 -n32 -INLINE -woff 1110,1171,1201,1355,1460,3201,3303,3625,36
49'
PERL=/usr/nekoware/bin/perl
PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:/usr/nekoware/lib/pkgconfig
mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/ff-dbg-static-cc
ac_add_options --enable-application=browser
ac_add_options --enable-official-branding
mk_add_options MOZ_CO_PROJECT=browser
mk_add_options MOZ_MAKE_FLAGS="-j5"
ac_add_options --enable-debug
ac_add_options --disable-optimize
#ac_add_options --enable-optimize=-O2
ac_add_options --disable-shared
ac_add_options --enable-libxul
ac_add_options --enable-system-cairo
#ac_add_options --with-system-nspr
ac_add_options --disable-dbus
ac_add_options --disable-tests
ac_add_options --disable-ogg
ac_add_options --disable-wave
patch file used:
--- media/liboggplay/src/liboggplay/std_semaphore.h.save Wed Nov 18 01:34:15 2009
+++ media/liboggplay/src/liboggplay/std_semaphore.h Wed Nov 18 01:35:54 2009
@@ -74,7 +74,7 @@
* @retval non-zero on error
*/
-#if defined(linux) || defined(SOLARIS) || defined(AIX) || defined(__FreeBSD__)
+#if defined(linux) || defined(SOLARIS) || defined(AIX) || defined(__sgi) || defined(__FreeBSD__)
#include <semaphore.h>
#if defined(__FreeBSD__)
#define SEM_CREATE(p,s) sem_init(&(p), 0, s)
--- media/liboggplay/src/liboggplay/oggplay_yuv2rgb.c.save Wed Nov 18 01:53:22 2009
+++ media/liboggplay/src/liboggplay/oggplay_yuv2rgb.c Wed Nov 18 01:53:41 2009
@@ -45,7 +45,7 @@
#include "oggplay_private.h"
#include "oggplay_yuv2rgb_template.h"
-#ifdef __SUNPRO_C
+#if defined(__SUNPRO_C) || defined(__sgi)
#define DISABLE_CPU_FEATURES
/* gcc inline asm and intristics have problems with Sun Studio.
* We need to fix it.
--- media/liboggplay/src/liboggplay/oggplay_yuv2rgb_template.h.save Wed Nov 18 02:03:19 2009
+++ media/liboggplay/src/liboggplay/oggplay_yuv2rgb_template.h Wed Nov 18 02:48:17 2009
@@ -4,8 +4,12 @@
#if defined(WIN32)
#define restrict
#else
+#if defined(__sgi)
+#define restrict __restrict
+#else
#ifndef restrict
#define restrict __restrict__
+#endif
#endif
#endif
--- media/libvorbis/lib/os.h.save Wed Nov 18 19:23:36 2009
+++ media/libvorbis/lib/os.h Wed Nov 18 19:28:35 2009
@@ -67,9 +67,9 @@
#endif
-#ifdef HAVE_ALLOCA_H
+/*#ifdef HAVE_ALLOCA_H*/
# include <alloca.h>
-#endif
+/*#endif*/
#ifdef USE_MEMORY_H
# include <memory.h>
--- media/libsydneyaudio/include/sydney_audio.h.save Wed Nov 18 23:40:23 2009
+++ media/libsydneyaudio/include/sydney_audio.h Wed Nov 18 23:42:01 2009
@@ -48,7 +48,7 @@
#if !defined (WIN32)
#include <sys/param.h>
#include <inttypes.h>
-#if defined(__FreeBSD__)
+#if defined(__FreeBSD__) || defined(__sgi)
#include <sys/endian.h>
#endif
#else
--- media/libsydneyaudio/src/Makefile.in.save Wed Nov 18 23:15:42 2009
+++ media/libsydneyaudio/src/Makefile.in Wed Nov 18 23:16:43 2009
@@ -77,6 +77,12 @@
$(NULL)
endif
+ifeq ($(OS_ARCH),IRIX)
+CSRCS = \
+ sydney_audio_irix.c \
+ $(NULL)
+endif
+
ifeq ($(OS_ARCH),WINNT)
OS_LIBS += winmm.lib
endif
--- media/libfishsound/src/libfishsound/debug.h.save Tue Nov 17 20:24:43 2009
+++ media/libfishsound/src/libfishsound/debug.h Tue Nov 17 20:26:12 2009
@@ -79,12 +79,12 @@
*
* Print a formatted debugging message of level 'level' to stderr
*/
-#define debug_printf(x,y...) {if (x <= DEBUG_LEVEL) debug_print_err (__func__, __LINE__, y);}
+#define debug_printf(x,...) {if (x <= DEBUG_LEVEL) debug_print_err (__func__, __LINE__, __VA_ARGS__);}
#undef MAXLINE
#else
-#define debug_printf(x,y...)
+#define debug_printf(x,...)
#endif
#endif /* non-C99 */
--- media/liboggz/include/oggz/oggz_off_t_generated.h.save Tue Nov 17 20:39:34 2009
+++ media/liboggz/include/oggz/oggz_off_t_generated.h Tue Nov 17 20:40:19 2009
@@ -59,7 +59,7 @@
#include <sys/types.h>
-#if defined(__APPLE__) || defined(SOLARIS) || defined(OS2)
+#if defined(__APPLE__) || defined(SOLARIS) || defined(OS2) || defined(__sgi)
typedef off_t oggz_off_t;
#else
typedef loff_t oggz_off_t;
--- xpcom/base/nsAutoRef.h.save Sun Nov 22 23:52:10 2009
+++ xpcom/base/nsAutoRef.h Tue Dec 1 14:36:17 2009
@@ -343,7 +343,7 @@
public:
// For constructing a return value with no resource
- nsReturnRef()
+ explicit nsReturnRef()
{
}
@@ -408,6 +408,7 @@
{
}
public:
+ nsReturningRef<T>(){}
nsReturnRef<T>& mReturnRef;
};
--- xpcom/glue/nsTextFormatter.cpp.save Tue Nov 17 08:02:51 2009
+++ xpcom/glue/nsTextFormatter.cpp Tue Nov 17 08:03:17 2009
@@ -71,13 +71,13 @@
** and requires array notation.
*/
-#ifdef HAVE_VA_COPY
+/*#ifdef HAVE_VA_COPY
#define VARARGS_ASSIGN(foo, bar) VA_COPY(foo,bar)
#elif defined(HAVE_VA_LIST_AS_ARRAY)
#define VARARGS_ASSIGN(foo, bar) foo[0] = bar[0]
-#else
+#else*/
#define VARARGS_ASSIGN(foo, bar) (foo) = (bar)
-#endif
+/*#endif*/
typedef struct SprintfStateStr SprintfState;
--- js/src/xpconnect/src/xpcconvert.cpp.save Tue Nov 17 09:26:03 2009
+++ js/src/xpconnect/src/xpcconvert.cpp Tue Nov 17 09:26:38 2009
@@ -1731,13 +1731,13 @@
** Note: on some platforms va_list is defined as an array,
** and requires array notation.
*/
-#ifdef HAVE_VA_COPY
+/*#ifdef HAVE_VA_COPY
#define VARARGS_ASSIGN(foo, bar) VA_COPY(foo,bar)
#elif defined(HAVE_VA_LIST_AS_ARRAY)
#define VARARGS_ASSIGN(foo, bar) foo[0] = bar[0]
-#else
+#else*/
#define VARARGS_ASSIGN(foo, bar) (foo) = (bar)
-#endif
+/*#endif*/
// We assert below that these formats all begin with "%i".
const char* XPC_ARG_FORMATTER_FORMAT_STRINGS[] = {"%ip", "%iv", "%is", nsnull};
--- js/src/jstypes.h.save Tue Nov 17 07:45:11 2009
+++ js/src/jstypes.h Tue Nov 17 07:46:10 2009
@@ -55,6 +55,7 @@
#define jstypes_h___
#include <stddef.h>
+#include <inttypes.h>
#include "jsstdint.h"
/***********************************************************************
--- js/src/jsprf.cpp.save Tue Nov 17 07:48:57 2009
+++ js/src/jsprf.cpp Tue Nov 17 07:49:33 2009
@@ -56,13 +56,13 @@
** Note: on some platforms va_list is defined as an array,
** and requires array notation.
*/
-#ifdef HAVE_VA_COPY
+/*#ifdef HAVE_VA_COPY
#define VARARGS_ASSIGN(foo, bar) VA_COPY(foo,bar)
#elif defined(HAVE_VA_LIST_AS_ARRAY)
#define VARARGS_ASSIGN(foo, bar) foo[0] = bar[0]
-#else
+#else*/
#define VARARGS_ASSIGN(foo, bar) (foo) = (bar)
-#endif
+/*#endif*/
/*
** WARNING: This code may *NOT* call JS_LOG (because JS_LOG calls it)
--- js/src/jscntxt.h.save Tue Nov 17 07:54:02 2009
+++ js/src/jscntxt.h Tue Nov 17 07:54:46 2009
@@ -1082,7 +1082,7 @@
JSContext *mContext;
private:
-#ifndef AIX
+#if !defined(AIX) && !defined(__sgi)
static void *operator new(size_t);
static void operator delete(void *, size_t);
#endif
--- gfx/qcms/qcmsint.h.save Tue Nov 17 08:37:59 2009
+++ gfx/qcms/qcmsint.h Tue Nov 17 09:22:05 2009
@@ -13,8 +13,12 @@
#ifdef _MSC_VER
#define ALIGN __declspec(align(16))
#else
+#ifdef __sgi
+#define ALIGN
+#else
#define ALIGN __attribute__(( aligned (16) ))
#endif
+#endif
struct _qcms_transform {
float ALIGN matrix[3][4];
@@ -60,7 +64,7 @@
struct curveType {
uint32_t count;
- uInt16Number data[0];
+ uInt16Number data[];
};
struct lutType {
--- gfx/thebes/public/gfxFont.h.save Fri Nov 20 20:06:27 2009
+++ gfx/thebes/public/gfxFont.h Fri Nov 20 20:09:13 2009
@@ -1345,7 +1345,7 @@
mCharacterGlyphs[aCharIndex] = aGlyph;
}
if (mDetailedGlyphs) {
- mDetailedGlyphs[aCharIndex] = nsnull;
+ *(mDetailedGlyphs+aCharIndex) = nsnull;
}
}
void SetGlyphs(PRUint32 aCharIndex, CompressedGlyph aGlyph,
@@ -1365,7 +1365,7 @@
// and gfxFont::GetBoundingBox
const CompressedGlyph *GetCharacterGlyphs() { return mCharacterGlyphs; }
const DetailedGlyph *GetDetailedGlyphs(PRUint32 aCharIndex) {
- return mDetailedGlyphs ? mDetailedGlyphs[aCharIndex].get() : nsnull;
+ return mDetailedGlyphs ? (mDetailedGlyphs+aCharIndex)->get() : nsnull;
}
PRBool HasDetailedGlyphs() { return mDetailedGlyphs.get() != nsnull; }
PRUint32 CountMissingGlyphs();
Reporter | ||
Updated•16 years ago
|
OS: Other → IRIX
Hardware: Other → SGI
Version: unspecified → 3.5 Branch
Reporter | ||
Comment 1•16 years ago
|
||
(In reply to comment #0)
typos:
gfxFontconfigUtils.c should be gfxFontconfigUtils.cpp and
NsReturningRef should be nsReturningRef
Updated•16 years ago
|
Component: General → Graphics
Product: Firefox → Core
QA Contact: general → thebes
Version: 3.5 Branch → 1.9.1 Branch
Reporter | ||
Comment 2•16 years ago
|
||
I have found a workaround for this bug by specifying a different frontend for the mipspro 7.4.4 compiler: using -Zf,_330 selects the version 3.3 which does not produce an error on this piece of code. Still i would like to ask if this can be written in another way, since -Zf,_330 is experimental an can cause problems when compiling other pieces of code
Comment 3•14 years ago
|
||
Frank, is this still an issue? If so, can you attach a patch (see https://developer.mozilla.org/En/Developer_Guide/How_to_Submit_a_Patch ) and ask me for review?
If not (if, for example, mispro frontend 3.3 is not experimental any more, though it seems that perhaps 7.4.4 is still the most recent version of the compiler), we can feel free to resolve this incomplete.
Reporter | ||
Comment 4•14 years ago
|
||
(In reply to Joe Drew (:JOEDREW!) from comment #3)
> Frank, is this still an issue? If so, can you attach a patch (see
> https://developer.mozilla.org/En/Developer_Guide/How_to_Submit_a_Patch ) and
> ask me for review?
This is still an issue, because there is no update on the MIPSPro compiler. The workaround involves letting the build crash, compile the offending source file by hand and resume make. There is no easy fix which you can cast in a Makefile.
> If not (if, for example, mispro frontend 3.3 is not experimental any more,
> though it seems that perhaps 7.4.4 is still the most recent version of the
> compiler), we can feel free to resolve this incomplete.
Please do so. I'm behind on porting recent Firefox releases anyway, so chances are that i will not get around in fixing this particular problem.
Comment 5•14 years ago
|
||
(In reply to Frank Everdij from comment #4)
> (In reply to Joe Drew (:JOEDREW!) from comment #3)
> > Frank, is this still an issue? If so, can you attach a patch (see
> > https://developer.mozilla.org/En/Developer_Guide/How_to_Submit_a_Patch ) and
> > ask me for review?
>
> This is still an issue, because there is no update on the MIPSPro compiler.
> The workaround involves letting the build crash, compile the offending
> source file by hand and resume make. There is no easy fix which you can cast
> in a Makefile.
Well, if we had code that worked everywhere, we wouldn't need to change Makefiles or anything like that. But...
> Please do so. I'm behind on porting recent Firefox releases anyway, so
> chances are that i will not get around in fixing this particular problem.
I will resolve this incomplete, though do know that I'm willing to take an up-to-date patch that fixes our compile on MIPSPro, so just reopen if and when you get around to it!
Status: UNCONFIRMED → RESOLVED
Closed: 14 years ago
Resolution: --- → INCOMPLETE
You need to log in
before you can comment on or make changes to this bug.
Description
•