Last Comment Bug 771588 - libvpx encoder fails to build with "Too many sections"
: libvpx encoder fails to build with "Too many sections"
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: Audio/Video (show other bugs)
: Trunk
: x86_64 Windows 7
: -- major (vote)
: mozilla16
Assigned To: Randell Jesup [:jesup]
:
: Maire Reavy [:mreavy]
Mentors:
Depends on:
Blocks: 771248
  Show dependency treegraph
 
Reported: 2012-07-06 10:55 PDT by Randell Jesup [:jesup]
Modified: 2012-07-08 10:50 PDT (History)
4 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
don't PGO asm_enc_offsets.c in libvpx - fix for MSVC2010 (974 bytes, patch)
2012-07-06 19:41 PDT, Randell Jesup [:jesup]
no flags Details | Diff | Splinter Review
don't PGO asm_enc_offsets.c in libvpx - fix for MSVC2010 (1.00 KB, patch)
2012-07-06 19:54 PDT, Randell Jesup [:jesup]
tterribe: review-
Details | Diff | Splinter Review
don't PGO asm_enc_offsets.c in libvpx - fix for MSVC2010 (1.54 KB, patch)
2012-07-07 06:09 PDT, Randell Jesup [:jesup]
benjamin: review+
Details | Diff | Splinter Review

Description Randell Jesup [:jesup] 2012-07-06 10:55:47 PDT
May be related to the update of MSVC to 10 on the builders.

Fails in host_obj_int_extract.exe

When this failed in the "eliminate gkmedia tests" (bug 768325), turning off PGO solved it.  The offset extractor fails with "Too Many Sections", it fails to parse something correctly and goes off in the weeds.  Derf has the output of a local build showing the problem (with full PGO). This may happen due to a related opt which may be disabled if we explicitly disable PGO - I'll try that.

This blocks turning on webrtc in m-c
Comment 1 Randell Jesup [:jesup] 2012-07-06 19:41:15 PDT
Created attachment 639905 [details] [diff] [review]
don't PGO asm_enc_offsets.c in libvpx - fix for MSVC2010
Comment 2 Randell Jesup [:jesup] 2012-07-06 19:54:16 PDT
Created attachment 639909 [details] [diff] [review]
don't PGO asm_enc_offsets.c in libvpx - fix for MSVC2010
Comment 3 Randell Jesup [:jesup] 2012-07-06 20:02:03 PDT
Comment on attachment 639909 [details] [diff] [review]
don't PGO asm_enc_offsets.c in libvpx - fix for MSVC2010

per https://tbpl.mozilla.org/php/getParsedLog.php?id=13301040&tree=Try&full=1 this appears to work (PGO is forced in that try push).  Added the WINNT tests after that try.

Changed both asm_com_offsets and asm_enc_offsets, since PGO has no purpose here and it's playing with fire to leave it on for asm_com_offsets.  Note I used .obj directly since I couldn't use $(OBJ_SUFFIX) (it bitched at me for trying).

Probably need r+ from a build peer; or build peer plus Tim
Comment 4 Timothy B. Terriberry (:derf) 2012-07-06 20:19:33 PDT
Comment on attachment 639909 [details] [diff] [review]
don't PGO asm_enc_offsets.c in libvpx - fix for MSVC2010

Review of attachment 639909 [details] [diff] [review]:
-----------------------------------------------------------------

Fix at least the first issue, and we should be good.

::: media/libvpx/Makefile.in
@@ +441,5 @@
>  HOST_PROGRAM = host_obj_int_extract$(HOST_BIN_SUFFIX)
>  
>  CSRCS += asm_com_offsets.c
>  
> +ifeq (WINNT,$(OS_TARGET))

I think this needs to make sure we're using MSVC, as well, since someone could be doing a mingw32 build. Cargo-culting Mozilla's top-level Makefile.in, ifeq(WINNT_,$(OS_TARGET)_$(GNU_CC)) should work, I think.

@@ +442,5 @@
>  
>  CSRCS += asm_com_offsets.c
>  
> +ifeq (WINNT,$(OS_TARGET))
> +asm_com_offsets.obj: CFLAGS += -GL-

To use $(OBJ_SUFFIX) outside of a recursively-expanded variable, you need to add this rule after including rules.mk (see the comment on line 484).

I don't know how much this matters for MSVC builds, as I don't expect this suffix to ever change.
Comment 5 Randell Jesup [:jesup] 2012-07-07 06:09:24 PDT
Created attachment 639953 [details] [diff] [review]
don't PGO asm_enc_offsets.c in libvpx - fix for MSVC2010
Comment 6 Randell Jesup [:jesup] 2012-07-07 06:13:28 PDT
Comment on attachment 639953 [details] [diff] [review]
don't PGO asm_enc_offsets.c in libvpx - fix for MSVC2010

https://tbpl.mozilla.org/?tree=Try&rev=1654d3f416a5
(or https://tbpl.mozilla.org/?tree=Try&pusher=rjesup@wgate.com if try/tbpl is still unhappy)

That try run is with PGO for windows (with turning on webrtc by default)

Need review from 1 build peer, but didn't know who'd be available this weekend.
Comment 7 Benjamin Smedberg [:bsmedberg] 2012-07-07 06:45:21 PDT
Comment on attachment 639953 [details] [diff] [review]
don't PGO asm_enc_offsets.c in libvpx - fix for MSVC2010

The better way to write this is "ifdef _MSC_VER". r=me with that
Comment 9 Ryan VanderMeulen [:RyanVM] 2012-07-08 10:50:38 PDT
https://hg.mozilla.org/mozilla-central/rev/d50d39defc0c

Note You need to log in before you can comment on or make changes to this bug.