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

Compile Error in current master #12

Open
incaseoftrouble opened this issue Jul 2, 2020 · 3 comments
Open

Compile Error in current master #12

incaseoftrouble opened this issue Jul 2, 2020 · 3 comments

Comments

@incaseoftrouble
Copy link

Hi,

I'm building checktestdata on WSL. When compiling on master, I get:

g++ -g -O2 -Wall -fstack-protector -fPIE -D_FORTIFY_SOURCE=2 -std=c++14 -DVERSION="\"20200702\"" -I/usr/include  -c -o parse.o parse.cc
In file included from parse.cc:6:0:
parser.ih: In member function ‘int Parser::lex()’:
parser.ih:23:2: error: ‘d_val_’ was not declared in this scope
  d_val_ = STYPE_(d_scanner.matched());
  ^~~~~~
parser.ih:23:2: note: suggested alternative: ‘d_val__’
  d_val_ = STYPE_(d_scanner.matched());
  ^~~~~~
  d_val__
parser.ih:23:11: error: ‘STYPE_’ was not declared in this scope
  d_val_ = STYPE_(d_scanner.matched());
           ^~~~~~
parser.ih:23:11: note: suggested alternative: ‘STYPE__’
  d_val_ = STYPE_(d_scanner.matched());
           ^~~~~~
           STYPE__
parse.cc: At global scope:
parse.cc:2363:30: error: no ‘void Parser::errorRecovery__()’ member function declared in class ‘Parser’
 void Parser::errorRecovery__()
                              ^
parse.cc:2395:44: error: no ‘void Parser::executeAction__(int)’ member function declared in class ‘Parser’
 void Parser::executeAction__(int production)
                                            ^
checktestdata.y:154:1: error: expected unqualified-id before ‘catch’
checktestdata.y:160:26: error: no ‘void Parser::nextCycle__()’ member function declared in class ‘Parser’
checktestdata.y:192:1: error: expected unqualified-id before ‘catch’
checktestdata.y:206:26: error: no ‘void Parser::nextToken__()’ member function declared in class ‘Parser’
checktestdata.y:233:22: error: no ‘void Parser::print__()’ member function declared in class ‘Parser’
checktestdata.y: In member function ‘int Parser::parse()’:
checktestdata.y:269:9: error: ‘nextCycle__’ was not declared in this scope
checktestdata.y:269:9: note: suggested alternative: ‘nextCycle_’
<builtin>: recipe for target 'parse.o' failed
make: *** [parse.o] Error 1

The release branch builds successfully. I'm a C++ noob and I've no idea what you might need to help :-) Feel free to ask! Some versions:

  • g++ (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0
  • bisonc++ V6.01.00
  • flexc++ V2.06.02
@eldering
Copy link
Member

Could you check if it works when you use the release branch? That one has pre-generated Bison/Flex parser code.

@incaseoftrouble
Copy link
Author

incaseoftrouble commented Jul 13, 2020

$ git clone https://github.com/DOMjudge/checktestdata.git
$ cd checktestdata/
$ git checkout release
$ ./bootstrap
...
checking for boostlib >= 1.33.1... yes
configure: parser generation disabled
configure: creating ./config.status
config.status: creating config.mk
$ make

This works.

Maybe useful:

$ uname -a
Linux <hostname> 4.19.104-microsoft-standard #1 SMP Wed Feb 19 06:37:35 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 18.04.4 LTS
Release:        18.04
Codename:       bionic

@eldering
Copy link
Member

Ok, that's good to hear.

I'll have to look into this a bit deeper. It's probably a combination of the Bisonc++/Flexc++ versions and the compiler version.

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

2 participants