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

[examples] "explicit qualification in declaration" while building loop_unroller example #509

Closed
ChrisCummins opened this issue Dec 9, 2021 · 0 comments · Fixed by #523
Closed
Assignees
Labels
Bug Something isn't working
Milestone

Comments

@ChrisCummins
Copy link
Contributor

ChrisCummins commented Dec 9, 2021

🐛 Bug

Strange error while building the loop unroller example pass:

examples/example_unrolling_service/loop_unroller/loop_unroller.cc:97:1: error: explicit qualification in declaration of 'void llvm::initializeLoopCounterPass(llvm::PassRegistry&)'
   97 | INITIALIZE_PASS_END(LoopCounter, "count-loops", "Count loops", false, false)
      | ^~~~~~~~~~~~~~~~~~~
examples/example_unrolling_service/loop_unroller/loop_unroller.cc:133:1: error: explicit qualification in declaration of 'void llvm::initializeLoopUnrollConfiguratorPass(llvm::PassRegistry&)'
  133 | INITIALIZE_PASS_END(LoopUnrollConfigurator, "unroll-loops-configurator",

The problem appears to be with the llvm:: namespace.

To Reproduce

bazel build //examples/example_unrolling_service/loop_unroller

Environment

Please fill in this checklist:

  • CompilerGym: 0.2.1
  • How you installed CompilerGym (conda, pip, source): source
  • OS: Ubuntu 20.10
  • Python version: 3.8
  • Build command you used (if compiling from source): make test
  • GCC/clang version (if compiling from source): gcc 10.3.0
  • Bazel version (if compiling from source): 4.0.0
@ChrisCummins ChrisCummins added the Bug Something isn't working label Dec 9, 2021
@ChrisCummins ChrisCummins added this to the v0.2.2 milestone Dec 9, 2021
@ChrisCummins ChrisCummins self-assigned this Dec 9, 2021
ChrisCummins added a commit to ChrisCummins/CompilerGym that referenced this issue Dec 9, 2021
This is to mitigate a strange error "explicit qualification in
declaration" while building using GCC 10.3.0 on Ubuntu Linux
20.10. Removing the llvm:: namespace fixes the problem.

Issue facebookresearch#509.
ChrisCummins added a commit to ChrisCummins/CompilerGym that referenced this issue Dec 21, 2021
This appears to be the way that the LLVM sources structure their
passes, with the implementation in an anonymous namespace and the
INITIALIZE_PASS_xxx macros in no namespace.

Fixes facebookresearch#509.
ChrisCummins added a commit to ChrisCummins/CompilerGym that referenced this issue Dec 21, 2021
This appears to be the way that the LLVM sources structure their
passes, with the implementation in an anonymous namespace and the
INITIALIZE_PASS_xxx macros in no namespace.

Fixes facebookresearch#509.
ChrisCummins added a commit to ChrisCummins/CompilerGym that referenced this issue Dec 21, 2021
This appears to be the way that the LLVM sources structure their
passes, with the implementation in an anonymous namespace and the
INITIALIZE_PASS_xxx macros in no namespace.

Fixes facebookresearch#509.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant