#551 fail to compile dct-a.asm of x264

closed-fixed
nobody
5
2011-10-04
2011-09-26
No

Hi/2.

When I try to compile x264 with nasm, nasm fails to do it.

The following is the log.

-----
nasm -O2 -f aout -DPREFIX -DBIT_DEPTH=8 -Icommon/x86/ -o common/x86/dct-a.o common/x86/dct-a.asm
common/x86/dct-a.asm:443: error: (call_internal:3) `%ifdef' expects macro identifiers
common/x86/dct-a.asm:443: error: (call_internal:3) `%ifdef' expects macro identifiers
common/x86/dct-a.asm:443: error: (call_internal:3) `%ifdef' expects macro identifiers
common/x86/dct-a.asm:444: error: (call_internal:3) `%ifdef' expects macro identifiers
common/x86/dct-a.asm:444: error: (call_internal:3) `%ifdef' expects macro identifiers
common/x86/dct-a.asm:444: error: (call_internal:3) `%ifdef' expects macro identifiers
common/x86/dct-a.asm:445: error: (call_internal:3) `%ifdef' expects macro identifiers
common/x86/dct-a.asm:445: error: (call_internal:3) `%ifdef' expects macro identifiers
common/x86/dct-a.asm:445: error: (call_internal:3) `%ifdef' expects macro identifiers
common/x86/dct-a.asm:446: error: (call_internal:3) `%ifdef' expects macro identifiers
common/x86/dct-a.asm:446: error: (call_internal:3) `%ifdef' expects macro identifiers
common/x86/dct-a.asm:446: error: (call_internal:3) `%ifdef' expects macro identifiers
common/x86/dct-a.asm:666: error: (call_internal:3) `%ifdef' expects macro identifiers
make.exe: *** [common/x86/dct-a.o] Error 1
-----

Discussion

  • KO Myung-Hun

    KO Myung-Hun - 2011-10-01

    This is a simple testcase.

    -----
    %xdefine SUFFIX

    %macro call 1
    call_internal %1, %1 %+ SUFFIX
    %endmacro

    %macro call_internal 2
    %xdefine %%i %1
    %ifndef cglobaled_%1
    %ifdef cglobaled_%2
    %xdefine %%i %2
    %endif
    %endif
    %endmacro

    section .text
    _label_test:
    call _label_test
    -----

    If an empty macro is used with %+, %ifdef fails.

    The following is the patch to fix this.

    -----
    diff --git a/preproc.c b/preproc.c
    index 63b0c61..0826abb 100644
    --- a/preproc.c
    +++ b/preproc.c
    @@ -1922,6 +1922,7 @@ static bool if_condition(Token * tline, enum preproc_token ct)
    if (smacro_defined(NULL, tline->text, 0, NULL, true))
    j = true;
    tline = tline->next;
    + skip_white_(tline);
    }
    break;

    -----

     
  • Nobody/Anonymous

    The fix pushed upstream. Though we found some more nits in preprocessor code which prevents x264 to build with nasm. We're working on this issue and hopefully resolve it soon.

    Thanks for report!

     
  • Nobody/Anonymous

    If you have a chance to buid nasm from git repo -- please do (we still observing problems in our build farm still there is a hope we will be up more or less soon). The repo is at usual place http://repo.or.cz/w/nasm.git

     
  • KO Myung-Hun

    KO Myung-Hun - 2011-10-04

    Thanks for applying.

    With this patch, I can build x264 from git repo successfully.

    I don't know what the another problem is in preprocessor preventing from building x264.

    And I'm already working with git repo.

     
  • Cyrill Gorcunov

    Cyrill Gorcunov - 2011-10-04

    Seems it's another issue I hit locally. Still, this particular bug is fixed, I'm closing the bug. Thanks a lot for report and testing!

     
  • Cyrill Gorcunov

    Cyrill Gorcunov - 2011-10-04
    • status: open --> closed-fixed
     
  • Cyrill Gorcunov

    Cyrill Gorcunov - 2011-10-04

    This item has been resolved; the fix has been checked into git (http://repo.or.cz/w/nasm.git) and will be in the next release.
    You can usually also obtain a nightly snapshot at http://www.nasm.us/; the snapshot robot usually runs some time between 07:00 and 09:00 UTC, but sometimes runs immediately if there was no previous snapshot for today.

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks