Bug 110656 - src/intel/tools/i965_gram.tab.h:202:4: error: expected identifier before numeric constant
Summary: src/intel/tools/i965_gram.tab.h:202:4: error: expected identifier before nume...
Status: RESOLVED FIXED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Drivers/DRI/i965 (show other bugs)
Version: git
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Intel 3D Bugs Mailing List
QA Contact: Intel 3D Bugs Mailing List
URL:
Whiteboard:
Keywords: bisected, regression
Depends on:
Blocks:
 
Reported: 2019-05-09 18:16 UTC by Vinson Lee
Modified: 2019-06-06 02:24 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description Vinson Lee 2019-05-09 18:16:38 UTC
In file included from ../src/intel/tools/i965_lex.l:6:0:
src/intel/tools/i965_gram.tab.h:202:4: error: expected identifier before numeric constant
     OVERFLOW = 412,
    ^
Comment 1 Lionel Landwerlin 2019-05-09 18:33:20 UTC
Is there a bit more context to this error?
Comment 2 Vinson Lee 2019-05-09 18:43:33 UTC
meson builddir -Dplatforms=x11 -Ddri-drivers=i965 -Dgallium-drivers='' -Dvulkan-drivers='' -Dtools=intel


70308a5a8a801a960bb9f45fb597f80b77c51014 is the first bad commit
commit 70308a5a8a801a960bb9f45fb597f80b77c51014
Author: Sagar Ghuge <sagar.ghuge@intel.com>
Date:   Mon Dec 10 16:12:07 2018 -0800

    intel/tools: New i965 instruction assembler tool
    
    Tool is inspired from igt's assembler tool. Thanks to Matt Turner, who
    mentored me through out this project.
    
    v2: Fix memory leaks and naming convention (Caio)
    v3: Fix meson changes (Dylan Baker)
    v4: Fix usage options (Matt Turner)
    
    Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com>
    Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
    Reviewed-by: Matt Turner <mattst88@gmail.com>
    Closes: https://gitlab.freedesktop.org/mesa/mesa/merge_requests/141

:040000 040000 131f7523768fd9131124e7ca87c0efe79030991e 28078bac12cb3f99e3609f8f3057b5ecb2b9c9de M	src
bisect run success
Comment 3 Sagar Ghuge 2019-05-10 17:31:45 UTC
For me, it builds successfully without any errors, I deleted my builddir and rebuilt everything again but I am not facing any issue. May be I am missing something here. Flex version will make any difference ? I have flex 2.6.1
Comment 4 Sagar Ghuge 2019-05-10 17:38:41 UTC
Forgot to add bison version : 3.0.5. Not sure if flex and bison version will make any difference.
Comment 5 Vinson Lee 2019-05-10 18:10:22 UTC
OVERFLOW is defined in /usr/include/math.h on glibc < 2.27.
Comment 6 Kenneth Graunke 2019-05-10 20:01:23 UTC
We should rename it to TOK_OVERFLOW or OVERFLOW_TOK then (token).
Comment 7 Vinson Lee 2019-06-06 02:24:11 UTC
commit 20b42fad9b705f59b2467226abac299a7d473920
Author: Vinson Lee <vlee@freedesktop.org>
Date:   Fri May 10 11:24:18 2019 -0700

    intel/tools: Fix build with glibc < 2.27.
    
    glibc < 2.27 defines OVERFLOW in /usr/include/math.h.
    
    This patch fixes this build error.
    
    In file included from ../include/c99_math.h:37:0,
                     from ../src/util/u_math.h:44,
                     from ../src/mesa/main/macros.h:35,
                     from ../src/intel/compiler/brw_reg.h:47,
                     from ../src/intel/tools/i965_asm.h:32,
                     from ../src/intel/tools/i965_gram.y:29:
    src/intel/tools/i965_gram.tab.c:562:5: error: expected identifier before numeric constant
         OVERFLOW = 412,
         ^
    
    Fixes: 70308a5a8a80 ("intel/tools: New i965 instruction assembler tool")
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=110656
    Signed-off-by: Vinson Lee <vlee@freedesktop.org>
    Acked-by: Eric Engestrom <eric@engestrom.ch>


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.