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

Fails to build with gcc 12.2 – this not specified in enclosing parallel #196

Open
jirutka opened this issue Apr 13, 2023 · 2 comments
Open
Labels
feature request a new feature is requested good first issue Good for newcomers

Comments

@jirutka
Copy link

jirutka commented Apr 13, 2023

Describe the bug

Fails to build from source on recent gcc:

ninja: job failed: /usr/bin/g++  -I./include -I./src -I/usr/include/python3.11 -isystem ./deps/install/include -isystem /usr/local/include -fomit-frame-pointer -DNO_STACKTRACE -Wall -Wno-unused-local-typedefs -Wno-unused-but-set-variable -Wno-unused-variable -Wno-unused-value -Wno-unused-function -Wno-reorder -DLGRAPH_USE_MOCK_KV=0 -D__STDC_FORMAT_MACROS -fopenmp -std=c++17 -static-libstdc++ -static-libgcc -O3 -DNDEBUG -std=gnu++17 -MD -MT plugins/CMakeFiles/lpa_standalone.dir/cpp/lpa_standalone.cpp.o -MF plugins/CMakeFiles/lpa_standalone.dir/cpp/lpa_standalone.cpp.o.d -o plugins/CMakeFiles/lpa_standalone.dir/cpp/lpa_standalone.cpp.o -c ./plugins/cpp/lpa_standalone.cpp
In file included from ./src/olap/olap_config.h:20,
                 from ./src/olap/olap_io.h:22,
                 from ./src/olap/olap_on_disk.h:17,
                 from ./plugins/cpp/lpa_standalone.cpp:15:
./include/lgraph/olap_base.h: In lambda function:
./include/lgraph/olap_base.h:704:46: error: 'this' not specified in enclosing 'parallel'
  704 |               for (size_t ei = 0; ei < this->num_edges_; ei++) {
      |                                        ~~~~~~^~~~~~~~~~
./include/lgraph/olap_base.h:703:9: note: enclosing 'parallel'
  703 | #pragma omp parallel for default(none)
      |         ^~~
./include/lgraph/olap_base.h: In lambda function:
./include/lgraph/olap_base.h:762:46: error: 'this' not specified in enclosing 'parallel'
  762 |               for (size_t ei = 0; ei < this->num_edges_; ei++) {
      |                                        ~~~~~~^~~~~~~~~~
./include/lgraph/olap_base.h:761:9: note: enclosing 'parallel'
  761 | #pragma omp parallel for default(none)
      |         ^~~
ninja: job failed: /usr/bin/g++  -I./include -I./src -I/usr/include/python3.11 -isystem ./deps/install/include -isystem /usr/local/include -fomit-frame-pointer -DNO_STACKTRACE -Wall -Wno-unused-local-typedefs -Wno-unused-but-set-variable -Wno-unused-variable -Wno-unused-value -Wno-unused-function -Wno-reorder -DLGRAPH_USE_MOCK_KV=0 -D__STDC_FORMAT_MACROS -fopenmp -std=c++17 -static-libstdc++ -static-libgcc -O3 -DNDEBUG -std=gnu++17 -MD -MT plugins/CMakeFiles/lcc_standalone.dir/cpp/lcc_standalone.cpp.o -MF plugins/CMakeFiles/lcc_standalone.dir/cpp/lcc_standalone.cpp.o.d -o plugins/CMakeFiles/lcc_standalone.dir/cpp/lcc_standalone.cpp.o -c ./plugins/cpp/lcc_standalone.cpp
In file included from ./src/olap/olap_config.h:20,
                 from ./src/olap/olap_io.h:22,
                 from ./src/olap/olap_on_disk.h:17,
                 from ./plugins/cpp/lcc_standalone.cpp:15:
./include/lgraph/olap_base.h: In lambda function:
./include/lgraph/olap_base.h:704:46: error: 'this' not specified in enclosing 'parallel'
  704 |               for (size_t ei = 0; ei < this->num_edges_; ei++) {
      |                                        ~~~~~~^~~~~~~~~~
./include/lgraph/olap_base.h:703:9: note: enclosing 'parallel'
  703 | #pragma omp parallel for default(none)
      |         ^~~
./include/lgraph/olap_base.h: In lambda function:
./include/lgraph/olap_base.h:762:46: error: 'this' not specified in enclosing 'parallel'
  762 |               for (size_t ei = 0; ei < this->num_edges_; ei++) {
      |                                        ~~~~~~^~~~~~~~~~
./include/lgraph/olap_base.h:761:9: note: enclosing 'parallel'
  761 | #pragma omp parallel for default(none)
      |         ^~~

Environment:

  • OS: Alpine Linux Edge
  • CPU: x86_64
  • Compiler: gcc 12.2.1

Additional context

@knightast
Copy link
Contributor

knightast commented Apr 19, 2023

It seems openmp is not correctly installed. Maybe you can refer the Dockerfile for compile environment, I haven't tried Alpine.

https://github.com/TuGraph-family/tugraph-db/blob/master/ci/images/tugraph-compile-centos7-Dockerfile#L31
https://github.com/TuGraph-family/tugraph-db/blob/master/ci/images/tugraph-compile-centos7-Dockerfile#L218

@qishipengqsp
Copy link
Collaborator

Add this to Good first issue. TODO: support GCC12 compilation

@qishipengqsp qishipengqsp added the good first issue Good for newcomers label Jul 17, 2023
@qishipengqsp qishipengqsp added the feature request a new feature is requested label Jan 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request a new feature is requested good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

3 participants