Closed
Bug 414971
Opened 18 years ago
Closed 18 years ago
Mingw build error: `PR_ROTATE_RIGHT32' was not declared in this scope
Categories
(Core :: Graphics: ImageLib, defect)
Tracking
()
RESOLVED
FIXED
mozilla1.9beta4
People
(Reporter: martijn.martijn, Assigned: jag+mozilla)
References
Details
Attachments
(1 file)
|
1.01 KB,
patch
|
wtc
:
review+
pavlov
:
superreview+
mtschrep
:
approval1.9+
|
Details | Diff | Splinter Review |
I get this build error now after having updated my mingw build:
HAVE_MEMORY_H=1 -DHAVE_UNISTD_H=1 -DHAVE_MALLOC_H=1 -DHAVE_LIBM=1 -DNO_X11=1 -DM
MAP_MISSES_WRITES=1 -DHAVE_STRERROR=1 -DHAVE_SNPRINTF=1 -DHAVE_MEMMOVE=1 -DHAVE_
RINT=1 -DVA_COPY=va_copy -DHAVE_VA_COPY=1 -DMOZ_EMBEDDING_LEVEL_DEFAULT=1 -DMOZ_
EMBEDDING_LEVEL_BASIC=1 -DMOZ_EMBEDDING_LEVEL_MINIMAL=1 -DMOZ_PHOENIX=1 -DMOZ_BU
ILD_APP=browser -DMOZ_XUL_APP=1 -DMOZ_DEFAULT_TOOLKIT=\"cairo-windows\" -DMOZ_TH
EBES=1 -DMOZ_CAIRO_GFX=1 -DMOZ_DISTRIBUTION_ID=\"org.mozilla\" -DOJI=1 -DIBMBIDI
=1 -DMOZ_VIEW_SOURCE=1 -DMOZ_XPINSTALL=1 -DMOZ_JSLOADER=1 -DNS_PRINTING=1 -DNS_P
RINT_PREVIEW=1 -DMOZ_NO_XPCOM_OBSOLETE=1 -DMOZ_XTF=1 -DMOZ_MATHML=1 -DMOZ_ENABLE
_CANVAS=1 -DMOZ_SVG=1 -DMOZ_SVG_FOREIGNOBJECT=1 -DMOZ_UPDATE_CHANNEL=default -DM
OZ_PLACES=1 -DMOZ_FEEDS=1 -DMOZ_STORAGE=1 -DMOZ_SAFE_BROWSING=1 -DMOZ_URL_CLASSI
FIER=1 -DMOZ_LOGGING=1 -DHAVE___CXA_DEMANGLE=1 -DMOZ_DEMANGLE_SYMBOLS=1 -DHAVE__
UNWIND_BACKTRACE=1 -DMOZ_USER_DIR=\"Mozilla\" -DHAVE_STDINT_H=1 -DHAVE_INTTYPES_
H=1 -DHAVE_UINT64_T=1 -DMOZ_XUL=1 -DMOZ_PROFILELOCKING=1 -DMOZ_RDF=1 -DMOZ_MORKR
EADER=1 -DMOZ_DLL_SUFFIX=\".dll\" -DJS_THREADSAFE=1 -DMOZ_REFLOW_PERF=1 -DMOZ_RE
FLOW_PERF_DSP=1 -DMOZILLA_LOCALE_VERSION=\"1.9a1\" -DMOZILLA_REGION_VERSION=\"1.
9a1\" -DMOZILLA_SKIN_VERSION=\"1.8\" -D_MOZILLA_CONFIG_H_ -DMOZILLA_CLIENT /cyg
drive/c/mozilla/mozilla/modules/libpr0n/decoders/gif/nsGIFDecoder2.cpp
c:/mozilla/mozilla/modules/libpr0n/decoders/gif/nsGIFDecoder2.h: In constructor
`nsGIFDecoder2::nsGIFDecoder2()':
c:/mozilla/mozilla/modules/libpr0n/decoders/gif/nsGIFDecoder2.h:100: warning: `n
sGIFDecoder2::mLastFlushedPass' will be initialized after
c:/mozilla/mozilla/modules/libpr0n/decoders/gif/nsGIFDecoder2.h:98: warning: `
PRUint32 nsGIFDecoder2::mOldColor'
c:/mozilla/mozilla/modules/libpr0n/decoders/gif/nsGIFDecoder2.cpp:125: warning:
when initialized here
c:/mozilla/mozilla/modules/libpr0n/decoders/gif/nsGIFDecoder2.cpp: In member fun
ction `void nsGIFDecoder2::BeginImageFrame(gfx_depth)':
c:/mozilla/mozilla/modules/libpr0n/decoders/gif/nsGIFDecoder2.cpp:339: warning:
enumeral mismatch in conditional expression: `gfxIFormats::<anonymous enum>' vs
`gfxIFormats::<anonymous enum>'
c:/mozilla/mozilla/modules/libpr0n/decoders/gif/nsGIFDecoder2.cpp:342: warning:
enumeral mismatch in conditional expression: `gfxIFormats::<anonymous enum>' vs
`gfxIFormats::<anonymous enum>'
c:/mozilla/mozilla/modules/libpr0n/decoders/gif/nsGIFDecoder2.cpp: In member fun
ction `PRUint32 nsGIFDecoder2::OutputRow()':
c:/mozilla/mozilla/modules/libpr0n/decoders/gif/nsGIFDecoder2.cpp:493: warning:
comparison between signed and unsigned integer expressions
c:/mozilla/mozilla/modules/libpr0n/decoders/gif/nsGIFDecoder2.cpp: In function `
void ConvertColormap(PRUint32*, PRUint32)':
c:/mozilla/mozilla/modules/libpr0n/decoders/gif/nsGIFDecoder2.cpp:704: error: `P
R_ROTATE_RIGHT32' was not declared in this scope
c:/mozilla/mozilla/modules/libpr0n/decoders/gif/nsGIFDecoder2.cpp:704: error: `P
R_ROTATE_LEFT32' was not declared in this scope
make[6]: *** [nsGIFDecoder2.o] Error 1
make[6]: Leaving directory `/cygdrive/c/mozilla/mozilla/_firefox/modules/libpr0n
/decoders/gif'
make[5]: *** [libs] Error 2
make[5]: Leaving directory `/cygdrive/c/mozilla/mozilla/_firefox/modules/libpr0n
/decoders'
make[4]: *** [libs] Error 2
make[4]: Leaving directory `/cygdrive/c/mozilla/mozilla/_firefox/modules/libpr0n
'
make[3]: *** [libs_tier_gecko] Error 2
make[3]: Leaving directory `/cygdrive/c/mozilla/mozilla/_firefox'
make[2]: *** [tier_gecko] Error 2
make[2]: Leaving directory `/cygdrive/c/mozilla/mozilla/_firefox'
make[1]: *** [alldep] Error 2
make[1]: Leaving directory `/cygdrive/c/mozilla/mozilla/_firefox'
make: *** [alldep] Error 2
C:\mozilla\mozilla>
I guess it's a regression from bug 413143.
Comment 1•18 years ago
|
||
Sounds like a personal problem with NSPR. ;)
| Assignee | ||
Comment 2•18 years ago
|
||
Yeah, why isn't your build picking up the new nspr bits? Specifically this was added in bug 331043, and picked up with revision 1.364 of client.mk: http://bonsai.mozilla.org/cvslog.cgi?file=mozilla/client.mk&rev=HEAD&mark=1.364
Be sure to run make -f client.mk checkout and try this again.
| Reporter | ||
Comment 3•18 years ago
|
||
I did do a make -f client.mk pull_all.
I see NSPR_CO_TAG = NSPR_HEAD_20080129 in my client.mk and I get the build error with this.
Do I need to manually pull the nspr directory or something?
| Reporter | ||
Comment 4•18 years ago
|
||
Or maybe I do need to do a distclean and rebuild from scratch?
| Assignee | ||
Comment 5•18 years ago
|
||
Can you see whether dist/include/nspr/prbit.h is the same as nsprpub/pr/include/prbit.h, and that they both have the rotate macros?
Otherwise you might have to. Maybe you can get away with simply deleting the dist directory.
| Assignee | ||
Comment 6•18 years ago
|
||
Well, if nsprpub/pr/include/prbit.h doesn't have the rotate macros something else is very wrong :-)
| Reporter | ||
Comment 7•18 years ago
|
||
prbit.h in C:\mozilla\mozilla\_firefox\dist\include\nspr looks the same as in C:\mozilla\mozilla\nsprpub\pr\include
It seems to me like this code in that file doesn't work for mingw, right?
#if defined(_MSC_VER) && (defined(_M_IX86) || defined(_M_AMD64) || \
defined(_M_X64))
| Reporter | ||
Comment 8•18 years ago
|
||
I guess this might be a regression from bug 331043, then.
| Reporter | ||
Comment 9•18 years ago
|
||
Never mind, I probably made a wrong assumption in comment 7, but still, could this be somehow a regression from bug 331043?
Comment 10•18 years ago
|
||
gfx/thebes/public/gfxColor.h needs to include "prbit.h". This is jag's checkin.
Comment 11•18 years ago
|
||
+ #if (_MSC_VER >= 1300) // also excludes MinGW
+ #include <stdlib.h>
+ #pragma intrinsic(_byteswap_ulong)
+ #define GFX_NTOHL(x) _byteswap_ulong(x)
+ #define GFX_HAVE_CHEAP_NTOHL
+ #else
+ // A reasonably fast generic little-endian implementation.
INCLUDE "prbit.h" HERE <===========================
+ #define GFX_NTOHL(x) \
+ ( (PR_ROTATE_RIGHT32((x),8) & 0xFF00FF00) | \
+ (PR_ROTATE_LEFT32((x),8) & 0x00FF00FF) )
+ #endif
| Assignee | ||
Comment 12•18 years ago
|
||
I guess I was assuming that someone would have included nspr.h along the line. I wonder why that's not happening on MinGW. Anyway, yeah, that would fix it. Patch coming up.
| Assignee | ||
Comment 13•18 years ago
|
||
In fact, on Mac it is. I tested the MinGW branches by replacing "ifdef"s with "if 1"s.
| Assignee | ||
Comment 14•18 years ago
|
||
Ah, but I only did a quick build test in decoders/png. Anyway, patch coming up.
| Assignee | ||
Comment 15•18 years ago
|
||
| Assignee | ||
Updated•18 years ago
|
Attachment #300569 -
Flags: review? → superreview?(pavlov)
Comment 16•18 years ago
|
||
Comment on attachment 300569 [details] [diff] [review]
Be sure to include prbit.h
r=wtc.
I'm surprised how fast people discover these new rotate macros.
Attachment #300569 -
Flags: review+
| Assignee | ||
Comment 17•18 years ago
|
||
Thanks for the r+ :-) I saw the PR_ROTATE_* macro change fly by on bonsai and figured I should use it.
Updated•18 years ago
|
Attachment #300569 -
Flags: superreview?(pavlov) → superreview+
| Assignee | ||
Comment 18•18 years ago
|
||
Comment on attachment 300569 [details] [diff] [review]
Be sure to include prbit.h
Requesting a1.9. Simple fix to unbust MinGW builds.
Attachment #300569 -
Flags: approval1.9?
Updated•18 years ago
|
Attachment #300569 -
Flags: approval1.9? → approval1.9+
| Assignee | ||
Comment 19•18 years ago
|
||
Checking in gfxColor.h;
/cvsroot/mozilla/gfx/thebes/public/gfxColor.h,v <-- gfxColor.h
new revision: 1.20; previous revision: 1.19
done
Status: ASSIGNED → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
Updated•18 years ago
|
Target Milestone: --- → mozilla1.9beta4
Conditional includes (of unconditionally-available headers) are rather evil; it would be better to #include prbit.h unconditionally. Otherwise there's a risk for bustage from somebody using its macros successfully because gfxColor.h was included and the change not compiling on other platforms.
...which jag now filed as bug 418026.
You need to log in
before you can comment on or make changes to this bug.
Description
•