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

[BUG] Got "Expected class-name before '{' token" error when compiling under manjaro #272

Closed
jiangjiechu opened this issue Jan 12, 2022 · 4 comments
Assignees
Labels
bug Something isn't working

Comments

@jiangjiechu
Copy link

My cmake flag is
$ cmake -B build -DEXTENSION_gmpm:BOOL=ON -DEXTENSION_mesher:BOOL=ON -DEXTENSION_FastFLIP:BOOL=ON -DEXTENSION_zenvdb:BOOL=ON -DZENOFX_ENABLE_OPENVDB:BOOL=ON -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON
Got error while compiling /projects/gmpm/zecomp/include/zensim/cuda/Cuda.cu:
/home/peter/zeno/projects/gmpm/zecomp/include/zensim/meta/Sequence.h:132:189: 错误:expected class-name before ‘{’ token 132 | struct shuffle_convert_impl<Unary, index_seq<Js...>> | ^ /home/peter/zeno/projects/gmpm/zecomp/include/zensim/meta/Sequence.h:141:188: 错误:expected class-name before ‘{’ token 141 | template <std::size_t... Js> struct shuffle_impl<index_seq<Js...>> | ^ /home/peter/zeno/projects/gmpm/zecomp/include/zensim/meta/Sequence.h:211:189: 错误:expected class-name before ‘{’ token 211 | template <std::size_t... Js> struct shuffle_impl<index_seq<Js...>> | ^
I guess it is an c++17 related preprocessing error with the fold expression struct shuffle_convert_impl<Unary, index_seq<Js...>>, but I don't know whether c++17 is enabled, the verbose output of make shows that there is no -std=c++17 flag.
image
Eventhough I manually add -std=c++17 flag and recompile the file the error is still there:
image
My nvcc supports c++17
image

Environment

  • System: Manjaro Linux [x86_64]
  • Zeno Version: 2021.12.20
  • Graphics card (for viewport bugs): RTX 3070 Mobile / Max-Q
@jiangjiechu jiangjiechu added the bug Something isn't working label Jan 12, 2022
@littlemine
Copy link
Collaborator

I tried building the latest zeno (5807dee) with these extensions enabled and all submodules updated (especially zecomp) under ubuntu20.04 and cuda 11.5 (>=11.3 should be enough), and did not encounter such an error.
Can you share the cuda version and the commit hash of zecomp you are building zeno with?

@littlemine littlemine self-assigned this Jan 12, 2022
@jiangjiechu
Copy link
Author

Sorry for late response.
My cuda version is 11.5
image
I uses submodule zecomp of commit zenustech/zpc@ff6d647.
Besides, I have modified all the find_package(TBB ...) command to find_package(TBB CONFIG ...) to solve "TBB not found" errors (seems that projects/cmake/FindTBB.cmake wouldn't find the latest tbb installed in manjaro). That is almost all changes I have made on the repo.

@littlemine
Copy link
Collaborator

Thanks for the information. Then I suppose it has something to do with manjaro linux. I'll look into this issue soon and get back to you.

@littlemine
Copy link
Collaborator

littlemine commented Jan 19, 2022

I encountered the same issue under a similar setup as yours under manjaro, and pushed a fix (zenustech/zpc@c302735) as the work around. Thanks for the report!
I also noticed that the tseq and vseq implementations are quite verbose and outdated. I will spend some time clean this part soon.

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

No branches or pull requests

2 participants