The default bug view has changed. See this FAQ.

Compiling with graphite enabled is failing with VS2010

RESOLVED FIXED in mozilla12

Status

()

Core
Graphics
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: mossop, Unassigned)

Tracking

Trunk
mozilla12
x86_64
Windows 7
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

5 years ago
Since bug 721068 landed on inbound I get the following build failure locally:

c:/mozilla-build/python/python2.7.exe -O c:/mozilla/source/trunk/build/cl.py cl -Fojson.obj -c -D_HAS_EXCEPTIONS=0 -I../../../dist/stl_wrappers  -DMOZILLA_INTERNAL_API -D_IMPL_NS_COM -DEXPORT_XPT_API
-DEXPORT_XPTC_API -D_IMPL_NS_GFX -D_IMPL_NS_WIDGET -DIMPL_XREAPI -DIMPL_NS_NET -DIMPL_THEBES  -DOSTYPE=\"WINNT6.1\" -DOSARCH=WINNT -DPACKAGE_VERSION="\"moz\"" -DPACKAGE_BUGREPORT="\"http://bugzilla.mozilla.org/\"" -DGRAPHITE2_NFILEFACE -DGRAPHITE2_NTRACING -DGRAPHITE2_NSEGCACHE -DGRAPHITE2_STATIC -DGRAPHITE2_CUSTOM_HEADER="\"MozGrMalloc.h\""  -I../../../../../source/trunk/gfx/graphite2/src -I. -I../../../dist/include -I../../../dist/include/nsprpub  -Ic:/mozilla/build/nightly/dist/include/nspr -Ic:/mozilla/build/nightly/dist/include/nss       -TP -nologo -W3 -Gy -Fdgenerated.pdb -wd4800 -we4553 -DNDEBUG -DTRIMMED -Zi -Zi -UDEBUG -DNDEBUG -O1 -Oy -MD            -FI ../../../dist/include/mozilla-config.h -DMOZILLA_CLIENT /c/mozilla/source/trunk/gfx/graphite2/src/json.cpp
json.cpp
c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\iosfwd(43) : error C2061: syntax error : identifier 'fpos_t'
        c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\iosfwd(117) : see reference to class template instantiation 'std::fpos<_Statetype>' being compiled
c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\iosfwd(58) : error C2146: syntax error : missing ';' before identifier 'seekpos'
c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\iosfwd(58) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\iosfwd(59) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\iosfwd(61) : warning C4183: 'seekpos': missing return type; assumed to be a member function returning 'int'
c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\iosfwd(115) : error C2146: syntax error : missing ';' before identifier '_Fpos'
c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\iosfwd(115) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\iosfwd(115) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\iosfwd(563) : error C2065: 'EOF' : undeclared identifier
make[2]: *** [json.obj] Error 2
make[2]: Leaving directory `/c/mozilla/build/nightly/gfx/graphite2/src'
make[1]: *** [libs] Error 2
make[1]: Leaving directory `/c/mozilla/build/nightly/gfx'
make: *** [all] Error 2
make: Leaving directory `/c/mozilla/build/nightly/gfx'
Created attachment 591911 [details] [diff] [review]
patch, fix the build failure by including <stdio.h> instead of <cstdio>

The attached patch, which just replaces #include <cstdio> with #include <stdio.h> in json.cpp, seems to fix the problem.

I don't really understand the underlying issue here yet - note that adding "using namespace std;" or "using std::fpos_t;" after the original #include does *not* resolve the failure.

I'd suggest we take this as a short-term fix so that people with VS2010 can continue to build without problems, while discussing the issue with upstream to try to understand it better.
(Reporter)

Comment 2

5 years ago
This patch fixes the problem for me.
Comment on attachment 591911 [details] [diff] [review]
patch, fix the build failure by including <stdio.h> instead of <cstdio>

I'm marking this r?roc, but intend to push it to inbound immediately, while review is still pending, so that people using VS2010 for local builds don't have to work around the compilation failure.
Attachment #591911 - Flags: review?(roc)
https://hg.mozilla.org/integration/mozilla-inbound/rev/a02b6f797e02
Attachment #591911 - Flags: review?(roc) → review+
https://hg.mozilla.org/mozilla-central/rev/a02b6f797e02
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla12
Depends on: 721839
You need to log in before you can comment on or make changes to this bug.