build error: 'PTXLexer' is not a member of 'parser'

505 views
Skip to first unread message

Sean Dougherty

unread,
Jan 12, 2015, 5:55:36 PM1/12/15
to gpuo...@googlegroups.com
I see the following error message from the build:


g++ -o .release_build/ocelot/ir/implementation/Module.os -c -O2 -Wall -Werror -std=c++0x -fPIC -I. -I/usr/include -I/usr/include -I.release_build -I. ocelot/ir/implementation/Module.cpp
In file included from ./ocelot/parser/interface/PTXLexer.h:11:0,
                 from ./ocelot/parser/interface/PTXParser.h:16,
                 from ocelot/ir/implementation/Module.cpp:10:
.release_build/ptxgrammar.hpp:352:14: error: 'PTXLexer' is not a member of 'parser'
 int yyparse (parser::PTXLexer& lexer, parser::PTXParser::State& state);
              ^
.release_build/ptxgrammar.hpp:352:32: error: 'lexer' was not declared in this scope
 int yyparse (parser::PTXLexer& lexer, parser::PTXParser::State& state);
                                ^
.release_build/ptxgrammar.hpp:352:47: error: 'parser::PTXParser' has not been declared
 int yyparse (parser::PTXLexer& lexer, parser::PTXParser::State& state);
                                               ^
.release_build/ptxgrammar.hpp:352:65: error: 'state' was not declared in this scope
 int yyparse (parser::PTXLexer& lexer, parser::PTXParser::State& state);
                                                                 ^
.release_build/ptxgrammar.hpp:352:70: error: expression list treated as compound expression in initializer [-fpermissive]
 int yyparse (parser::PTXLexer& lexer, parser::PTXParser::State& state);
                                                                      ^
scons: *** [.release_build/ocelot/ir/implementation/Module.os] Error 1
Build failed...
Build failed
 

Please let me know what information you might need. I followed the instructions I found at https://code.google.com/p/gpuocelot/wiki/Installation. Earlier in the build, I saw the following:


Glew disabled: not found
Failed to find llvm-config
 

That doesn't seem good...

Output from uname -a:

Linux laptop 3.13.0-36-generic #63-Ubuntu SMP Wed Sep 3 21:30:45 UTC 2014 i686 athlon i686 GNU/Linux


Contents of /etc/lsb-release:


DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=14.04
DISTRIB_CODENAME=trusty
DISTRIB_DESCRIPTION="Ubuntu 14.04.1 LTS"
 

Output of g++ --version:

g++ (Ubuntu 4.9.2-0ubuntu1~14.04) 4.9.2



Jin Wang

unread,
Jan 14, 2015, 1:16:35 PM1/14/15
to gpuo...@googlegroups.com
Hi Sean,

This looks like a parser problem. Could you please check if you have installed bison or flex properly?

Regards,

Jin

--
You received this message because you are subscribed to the Google Groups "gpuocelot" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gpuocelot+...@googlegroups.com.
To post to this group, send email to gpuo...@googlegroups.com.
Visit this group at http://groups.google.com/group/gpuocelot.
For more options, visit https://groups.google.com/d/optout.

Diogo Sampaio

unread,
Jan 15, 2015, 5:23:24 AM1/15/15
to gpuo...@googlegroups.com
This error occurs if you're not using an ancient version of bison. The
easiest workaround is just to delete the line with error. You should
also disable -Werror, else you get an signed to unsigned comparison
warning turned to an error.
--
Diogo Nunes Sampaio

Zhou Wu

unread,
Mar 10, 2015, 3:39:23 AM3/10/15
to gpuo...@googlegroups.com
Hi Diogo,

I encountered the same problem. What do you mean by deleting the line with error?
Which file shall I change?

Regards,
Zhou

Diogo Sampaio

unread,
Mar 16, 2015, 9:04:39 AM3/16/15
to gpuo...@googlegroups.com
.release_build/ptxgrammar.hpp
line 352 (if building an release version, .debug_build/ptxgrammar.hpp
if building an debug one. This file is not in the original source, it
is generated in the build path.)
Portable: +33 6 59 05 75 57

INRIA - Institut national de recherche en informatique et en automatique
CORSE - http://www.inria.fr/equipes/corse
Reply all
Reply to author
Forward
0 new messages