Git Product home page Git Product logo

Comments (6)

atishp04 avatar atishp04 commented on July 17, 2024

I got past this issue by -fms-extensions. GCC does not recognize the anonymous structures without this extensions.

However, the build failed at the following error after that.

[kabi-dw]# make
gcc -Wall -O0 -g --std=c99 -fms-extensions -D_GNU_SOURCE -c -MM generate.c ksymtab.c utils.c main.c stack.c objects.c > ./.depend
gcc -Wall -O0 -g --std=c99 -fms-extensions -D_GNU_SOURCE -c generate.c -o generate.o
gcc -Wall -O0 -g --std=c99 -fms-extensions -D_GNU_SOURCE -c ksymtab.c -o ksymtab.o
gcc -Wall -O0 -g --std=c99 -fms-extensions -D_GNU_SOURCE -c utils.c -o utils.o
gcc -Wall -O0 -g --std=c99 -fms-extensions -D_GNU_SOURCE -c main.c -o main.o
gcc -Wall -O0 -g --std=c99 -fms-extensions -D_GNU_SOURCE -c stack.c -o stack.o
gcc -Wall -O0 -g --std=c99 -fms-extensions -D_GNU_SOURCE -c objects.c -o objects.o
bison -d -t parser.y
parser.y:66.26: warning: stray $' parser.y:74.24: warning: stray $'
parser.y:75.53: warning: stray $' parser.y:76.18: warning: stray $'
parser.y:77.18: warning: stray $' parser.y:84.24: warning: stray $'
parser.y:85.55: warning: stray $' parser.y:86.18: warning: stray $'
parser.y:87.18: warning: stray $' parser.y:99.22: warning: stray $'
parser.y:116.34: warning: stray $' parser.y:116.47: warning: stray $'
parser.y:126.34: warning: stray $' parser.y:145.29: warning: stray $'
parser.y:149.29: warning: stray $' parser.y:150.31: warning: stray $'
parser.y:157.32: warning: stray $' parser.y:161.26: warning: stray $'
parser.y:169.40: warning: stray $' parser.y:169.53: warning: stray $'
parser.y:170.26: warning: stray $' parser.y:176.40: warning: stray $'
parser.y:176.53: warning: stray $' parser.y:187.28: warning: stray $'
parser.y:191.28: warning: stray $' parser.y:192.31: warning: stray $'
parser.y:193.13: warning: stray $' parser.y:200.27: warning: stray $'
parser.y:201.31: warning: stray $' parser.y:202.13: warning: stray $'
parser.y:209.32: warning: stray $' parser.y:213.26: warning: stray $'
parser.y:221.31: warning: stray $' parser.y:222.28: warning: stray $'
parser.y:232.35: warning: stray $' parser.y:233.31: warning: stray $'
parser.y:234.17: warning: stray $' parser.y:235.21: warning: stray $'
parser.y:239.24: warning: stray $' parser.y:240.55: warning: stray $'
parser.y:241.18: warning: stray $' parser.y:242.37: warning: stray $'
parser.y:253.18: warning: stray $' parser.y:257.22: warning: stray $'
parser.y:257.33: warning: stray $' parser.y:258.18: warning: stray $'
parser.y:273.32: warning: stray $' parser.y:277.26: warning: stray $'
parser.y:285.30: warning: stray $' parser.y:285.43: warning: stray $'
parser.y:292.30: warning: stray $' parser.y:299.32: warning: stray $'
parser.y:300.25: warning: stray $' parser.y:307.36: warning: stray $'
parser.y:308.29: warning: stray $' parser.y:328.38: warning: stray $'
parser.y:329.27: warning: stray $' parser.y:337.29: warning: stray $'
flex -o parser.yy.c parser.l
gcc -Wall -O0 -g --std=c99 -fms-extensions -D_GNU_SOURCE -c parser.yy.c -o parser.yy.o
gcc -Wall -O0 -g --std=c99 -fms-extensions -D_GNU_SOURCE -c parser.tab.c -o parser.tab.o
parser.y: In function ‘yyparse’:
parser.y:66: error: ‘$declaration’ undeclared (first use in this function)
parser.y:66: error: (Each undeclared identifier is reported only once
parser.y:66: error: for each function it appears in.)
parser.y:74: error: ‘$IDENTIFIER’ undeclared (first use in this function)
parser.y:77: error: ‘$STRING’ undeclared (first use in this function)
parser.y:87: error: ‘$SRCFILE’ undeclared (first use in this function)
parser.y:116: error: ‘$type’ undeclared (first use in this function)
parser.y:150: error: ‘$struct_list’ undeclared (first use in this function)
parser.y:157: error: ‘$struct_elt’ undeclared (first use in this function)
parser.y:170: error: ‘$CONSTANT’ undeclared (first use in this function)
parser.y:192: error: ‘$elt_list’ undeclared (first use in this function)
parser.y:201: error: ‘$enum_list’ undeclared (first use in this function)
parser.y:209: error: ‘$enum_elt’ undeclared (first use in this function)
parser.y:233: error: ‘$arg_list’ undeclared (first use in this function)
parser.y:242: error: ‘$reference_file’ undeclared (first use in this function)
parser.y:257: error: ‘$variable_var_list’ undeclared (first use in this function)
parser.y:273: error: ‘$elt’ undeclared (first use in this function)
parser.y:308: error: ‘$type_qualifier’ undeclared (first use in this function)
make: *** [parser.tab.o] Error 1

I have elfutils installed.

[kabi-dw]# rpm -qa | grep elfutils
elfutils-libelf-devel-0.164-2.el6.x86_64
elfutils-0.164-2.el6.x86_64
elfutils-libs-0.164-2.el6.x86_64
elfutils-devel-0.164-2.el6.x86_64
elfutils-libelf-0.164-2.el6.x86_64

Am I missing something ?

Regards,
Atish

from kabi-dw.

skozina avatar skozina commented on July 17, 2024

Hello Atish,

Thanks for looking!

In general it seems that you're using significantly older toolchain (gcc, bison) than us. So the first solution is that you'd use something more recent.
We'll look into this anyway, we might be able to remove the anonymous types to get it compilable by older tools.

Thanks!

from kabi-dw.

atishp04 avatar atishp04 commented on July 17, 2024

Sure. I will do that.
Can you please provide the recommended gcc & bison versions ?

Regards,
Atish

from kabi-dw.

skozina avatar skozina commented on July 17, 2024

On my system:
$ gcc --version
gcc (GCC) 6.3.1 20161221 (Red Hat 6.3.1-1)
$ bison -V
bison (GNU Bison) 3.0.4

from kabi-dw.

atishp04 avatar atishp04 commented on July 17, 2024

Thanks. Mine was pretty old.
Now it works.

from kabi-dw.

skozina avatar skozina commented on July 17, 2024

Atish,
We just pushed a major redesign of the tool. Now we store most of the information in memory rather than in files. So for a full kernel run including all modules you might need up to 250MB of memory, but the benefit is that the tool runs few times faster. Our current testing is able to generate all the type information of the kernel in about 30 seconds. Please give it a try!
Because of a screwup on my side I had to also change the last 3 commits in the history, so please make sure to reset to the last common ancestor and pull again. Thank you!

from kabi-dw.

Related Issues (6)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.