Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build error (on Linux Mint 18.1): 'PTXLexer' is not a member of 'parser #104

Open
eyalroz opened this issue Mar 8, 2017 · 7 comments
Open

Comments

@eyalroz
Copy link

eyalroz commented Mar 8, 2017

I'm trying to build gpuocelot on a Linux Mint 18.1 system (it's based on Ubuntu 16.04 Xenial Xerus). After following the clone and submodule init instructions, I ran:
./build.py -j 4 -p ~/opt/gpuocelot -i
in the gpuocelot source directory, and after some successful compilations I get:

In file included from ocelot/ocelot/parser/interface/PTXLexer.h:11:0,
                 from ocelot/ocelot/parser/interface/PTXParser.h:16,
                 from ocelot/ocelot/ir/implementation/Module.cpp:10:
.release_build/ocelot/ptxgrammar.hpp:354:14: error: 'PTXLexer' is not a member of 'parser'
 int yyparse (parser::PTXLexer& lexer, parser::PTXParser::State& state);
              ^
.release_build/ocelot/ptxgrammar.hpp:354:32: error: 'lexer' was not declared in this scope
 int yyparse (parser::PTXLexer& lexer, parser::PTXParser::State& state);
                                ^
.release_build/ocelot/ptxgrammar.hpp:354:47: error: 'parser::PTXParser' has not been declared
 int yyparse (parser::PTXLexer& lexer, parser::PTXParser::State& state);
                                               ^
.release_build/ocelot/ptxgrammar.hpp:354:65: error: 'state' was not declared in this scope
 int yyparse (parser::PTXLexer& lexer, parser::PTXParser::State& state);
                                                                 ^
.release_build/ocelot/ptxgrammar.hpp:354:70: error: expression list treated as compound expression in initializer [-fpermissive]
 int yyparse (parser::PTXLexer& lexer, parser::PTXParser::State& state);

What should I do?

@eyalroz eyalroz changed the title Build error: 'PTXLexer' is not a member of 'parser Build error (on Mint 18.1): 'PTXLexer' is not a member of 'parser Mar 8, 2017
@eyalroz eyalroz changed the title Build error (on Mint 18.1): 'PTXLexer' is not a member of 'parser Build error (on Linux Mint 18.1): 'PTXLexer' is not a member of 'parser Mar 8, 2017
@wanglu1991
Copy link

Same problem.Have you found a solution?

@eyalroz
Copy link
Author

eyalroz commented Dec 18, 2017

No, but to be honest I didn't really invest time in finding a solution. if you do find something, let me know (or just write me regardless - looks like we might have some common interests.)

@hemangandhi
Copy link

Any updates? I'm still getting this issue... I'm thinking that the file outputted by bison is somehow Kaput - it lacks the includes that are on the top of ptxgrammar.yy.

@eyalroz
Copy link
Author

eyalroz commented Mar 15, 2018

No updates from me, but again - I haven't looked into this further.

@hemangandhi
Copy link

I think this may fix the issue: https://github.com/hemangandhi/gpuocelot/tree/fix-parser

It seems two-fold: firstly, the generated header didn't include some required types.
Then, including said types causes a circular dependency.

I don't think my fix is the best, but it's a hack that seems to work, at least for the compilation of Module.cpp. Let me know if you think it's PR-worthy. (Now I'm getting a separate boost issue that I'll figure out. Might be me being dumb about library versions - I haven't worked with boost enough.)

@eyalroz
Copy link
Author

eyalroz commented Mar 18, 2018

@hemangandhi : With the branch you linked to, I get different errors. Would you like me to open a new bug on your issue page, or post them here?

@hemangandhi
Copy link

I'm not sure what collaborators would prefer... but here is easier for me (also because I'm getting an issue that might suggest that my "fix" is incomplete - TOKEN_TYPE not defined in PTXLexer).

I'll definitely work on this until this builds. Thanks for checking!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants