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

Cannot build due to EASTL issue #58

Closed
turbo0628 opened this issue Dec 7, 2022 · 5 comments
Closed

Cannot build due to EASTL issue #58

turbo0628 opened this issue Dec 7, 2022 · 5 comments

Comments

@turbo0628
Copy link

turbo0628 commented Dec 7, 2022

Hi folks, I'm building with clang++15, ubuntu 20.04.

I encounter a compilation error that is related with EASTL

Err log:

In file included from /home/dev/LuisaCompute/src/ext/EASTL/include/EASTL/algorithm.h:243:
/home/dev/LuisaCompute/src/ext/EASTL/include/EASTL/internal/copy_help.h:135:90: error: no member named 'contiguous_iterator_tag' in namespace 'std'
                                                                  (eastl::is_pointer<InputIterator>::value  || eastl::is_same<IIC, EASTL_ITC_NS::contiguous_iterator_tag>::value) &&
                                                                                                                                   ~~~~~~~~~~~~~~^
/home/dev/LuisaCompute/src/ext/EASTL/include/EASTL/internal/copy_help.h:136:90: error: no member named 'contiguous_iterator_tag' in namespace 'std'
                                                                  (eastl::is_pointer<OutputIterator>::value || eastl::is_same<OIC, EASTL_ITC_NS::contiguous_iterator_tag>::value);
                                                                                                                                   ~~~~~~~~~~~~~~^
/home/dev/LuisaCompute/src/ext/EASTL/include/EASTL/internal/copy_help.h:138:51: error: non-type template argument is not a constant expression
                return eastl::move_and_copy_helper<IIC, isMove, canBeMemmoved>::move_or_copy(first, last, result); // Need to chose based on the input iterator tag and not the output iterator tag, because containers accept input ranges of iterator types different than self.
                                                                ^~~~~~~~~~~~~

This seems the same error with electronicarts/EASTL#482

EASTL commit hash b6f329dc9c09ffaf68a979c6591e66a12cf6c2b9

Do you have any suggestions about this?

@Mike-Leo-Smith
Copy link
Contributor

Hi, @turbo0628. Thanks for reporting this.

The issue looks the same as electronicarts/EASTL#482, but should not occur with a C++20-compatible compiler like clang 15... I'm setting up similar environments to yours in the GitHub workflows to reproduce the issue.

Meanwhile, would you mind providing the CMake log when you configured the project? Maybe it's because CMake is not finding the correct compiler.

@turbo0628
Copy link
Author

turbo0628 commented Dec 8, 2022

Yeah I'm very confused about it too.

The CMakeCache.txt is attached as follows
CMakeCache.txt
I think the CMake system located the right compiler.

The clang-15 compiler is freshly installed with LLVM apt repository https://apt.llvm.org/
clang version 15.0.6

Which version are you using in your dev environment?

@Mike-Leo-Smith
Copy link
Contributor

I think I've reproduced a similar error in the workflows, where the compiler is clang 15.0.6 but it failed to find the C++20 <barrier> header.

However, this error is gone with a newer gcc. So the most likely explanation is that clang is using the standard library headers from the old gcc?

@Mike-Leo-Smith
Copy link
Contributor

It looks like the error can be worked around by specifying the stdlib to use.

Please pull the latest master branch and try the following steps to see if they can solve your error:

  • Install libc++-15-dev and libc++abi-15-dev via apt;
  • Pass -D CMAKE_CXX_FLAGS="-stdlib=libc++" to CMake when configuring the project.

@turbo0628
Copy link
Author

Thanks!

Sorry for the late reply as I didn't have time to proceed in the last month. I close this issue as I have successfully compiled the project with gcc 11.3 on a freshly installed ubuntu 22.04.

Nice work!

This issue was closed.
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