Skip to content

Issue with builing of libvpx on Windows using NASM version 3.02 #267

Open

Description

@novomesk

Hello,

me, and other Telegram Desktop contributors are experiencing problem to build libvpx (one of the ffmpeg dependencies) since the moment when MSYS2 updated NASM to version 3.02

Image

I am also getting the same problem using original nasm.exe from https://nasm.us/pub/nasm/releasebuilds/3.02/win64/

When I use original nasm.exe from the previous nasm-3.01, everything works.

The issue is described in https://issues.webmproject.org/issues/540261859 and partially in telegramdesktop/tdesktop#31021

At the same time I have no problem to build other libraries (like dav1d) where NASM is also used.

Activity

  1. ludloff commented on Jul 30, 2026

    @ludloff

    https://issues.webmproject.org/issues/540261859#comment7 says

    "It looks like the issue is with nasm silently failing on section .rodata. section .rdata doesn't cause an issue."

    Can [email protected] elaborate?

  2. jzern commented on Jul 30, 2026

    @jzern

    https://chromium-review.googlesource.com/c/webm/libvpx/+/8171724 has a fix to use .rdata with win32/win64, which is already done in x86inc.asm. There was no warning emitted from nasm though, so I'm a little curious about what change caused the difference in behavior and whether that was intentional. I haven't tried to bisect.

  3. jzern commented on Aug 3, 2026

    @jzern
    dee2d13f2ca58208fe544dfa15956a8377746181 is the first bad commit
    commit dee2d13f2ca58208fe544dfa15956a8377746181 (HEAD)
    Author: SEt <[email protected]>
    Date:   Wed Dec 10 15:13:20 2025 +0300
    
        Proper handling of several code sections in Codeview debug information
    
        Current Codeview implementation assumes there is only one actual code
        section and all line number information is pulled there. With support
        of comdat that assumption becomes incorrect, so proper generation of
        line number information table per code section is required.
    
        Also solved an issue with incorrect relocation for symbol with the
        same name as some section.
    
        New code assumes that coff_nsects doesn't change during generation of
        debug information.
    
        Fixes: https://github.com/netwide-assembler/nasm/pull/183
        Signed-off-by: H. Peter Anvin (Intel) <[email protected]>
    
     output/codeview.c | 201 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-----------------------------------------------------------------------------------------------------------
     1 file changed, 94 insertions(+), 107 deletions(-)
    
  4. SEt-t commented on Aug 7, 2026

    @SEt-t
    Contributor

    The code in libvpx was wrong (and fixed) as improper naming of read only data section on Windows created it with execution permission. That triggered a bug in nasm which is fixed by PR #292

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions