Closed Bug 1171082 Opened 4 years ago Closed 4 years ago

Re-enable Sphinx on Windows B2G builds

Categories

(Firefox Build System :: General, defect)

Unspecified
Windows
defect
Not set

Tracking

(firefox41 fixed)

RESOLVED FIXED
2.2 S14 (12june)
Tracking Status
firefox41 --- fixed

People

(Reporter: RyanVM, Assigned: kdavis)

References

Details

(Whiteboard: [webspeechapi][systemsfe])

Attachments

(1 file, 1 obsolete file)

Bug 1051146 landed today and hit bustage on Windows B2G desktop builds. As a temporary fix, the newly-added code is being disabled on Windows builds. This bug tracks finding the correct long-term fix so it can be re-enabled.
Now _WIN32_WINNT is defined to 0x0400 only if it is not defined, 0x0400
is the minimal version. Also modified update.sh to do this

The problem arose as the sphinxbase library from Bug 1051146 had the
following define

#define _WIN32_WINNT 0x0400

However, _WIN32_WINNT was defined elsewhere in our code. Thus, on
Windows targeting B2G the compilation failed. 

_WIN32_WINNT tells the included Windows headers which API version
to export. The minimal version gecko supports for _WIN32_WINNT is
0x0400. Hence, replacing the above define with

#ifndef _WIN32_WINNT
#define _WIN32_WINNT 0x0400
#endif /* not _WIN32_WINNT */

is sufficient to fix the problem.

In addition to the change above an update has been made to the
update.sh script to apply a patch to the sphinxbase sources to
in future include this change.

The try for this change has complied on all platforms and is here
https://treeherder.mozilla.org/#/jobs?repo=try&revision=6d2c7cbfdfc2
Attachment #8615138 - Flags: review?(bugs)
Comment on attachment 8615138 [details] [diff] [review]
Now _WIN32_WINNT is defined to 0x0400 only if it is not defined, 0x0400 is the minimal version. Also modified update.sh to do this

Please don't do unrelated changes to sbthread.c
(those whitespace changes to the licence)
Attachment #8615138 - Flags: review?(bugs) → review+
I agree on the "unrelated changes to sbthread.c".

I can try to run it again, but it seemed like patch was killing trailing whitespace.
Whiteboard: [webspeechapi][systemsfe]
Target Milestone: --- → 2.2 S14 (12june)
Now _WIN32_WINNT is defined to 0x0400 only if it is not defined, 0x0400
is the minimal version. Also modified update.sh to do this

The problem arose as the sphinxbase library from Bug 1051146 had the
following define

#define _WIN32_WINNT 0x0400

However, _WIN32_WINNT was defined elsewhere in our code. Thus, on
Windows targeting B2G the compilation failed. 

_WIN32_WINNT tells the included Windows headers which API version
to export. The minimal version gecko supports for _WIN32_WINNT is
0x0400. Hence, replacing the above define with

#ifndef _WIN32_WINNT
#define _WIN32_WINNT 0x0400
#endif /* not _WIN32_WINNT */

is sufficient to fix the problem.

In addition to the change above an update has been made to the
update.sh script to apply a patch to the sphinxbase sources to
in future include this change.

The only difference between this patch and the patch it replaces
is that this patch retains the trailing whitespace of the patched
file. The code from sphinxbase unfortunately has trailing whitespace
which this patch retains.

The try for this change is running here https://treeherder.mozilla.org/#/jobs?repo=try&revision=ef3bb6cb790d
Attachment #8615138 - Attachment is obsolete: true
Attachment #8615797 - Flags: review+
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/30c3929cef76
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Blocks: 1172925
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.