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

Expression did not evaluate to a known generator expression #14

Closed
giron3s opened this issue Jul 13, 2018 · 4 comments
Closed

Expression did not evaluate to a known generator expression #14

giron3s opened this issue Jul 13, 2018 · 4 comments

Comments

@giron3s
Copy link

giron3s commented Jul 13, 2018

Hello,
After to following the installation instruction from link , when execute the cmake -H. -B./cmk_build/Linux64 -G "Unix Makefiles" -DCMAKE_BUILD_TYPE="Debug" command i get the next build error:
``
$<IF:$CONFIG:RELEASE,/home/mgironesd/Documents/DiligentEngine/DiligentCore/Utilities/File2Include/bin/Linux/,$<TARGET_FILE_DIR:File2String>>

Expression did not evaluate to a known generator expression

@DiligentGraphics
Copy link
Collaborator

Hello!
Are you using CMake 3.10 or later?

@giron3s
Copy link
Author

giron3s commented Jul 16, 2018

Hello,

Firstly sorry for the late answer!
After to update the cmake to 3.10, solved the above mentioned issue. Now I can execute the cmake -H. -B./cmk_build/Linux64 -G "Unix Makefiles" -DCMAKE_BUILD_TYPE="Debug" command, however when i execute cmake --build ./cmk_build/Linux64, i get the following error:

/home/mgironesd/Documents/DiligentEngine/DiligentCore/Common/src/FixedBlockMemoryAllocator.cpp: In constructor ‘Diligent::FixedBlockMemoryAllocator::FixedBlockMemoryAllocator(Diligent::IMemoryAllocator&, size_t, Diligent::Uint32)’: /home/mgironesd/Documents/DiligentEngine/DiligentCore/Common/src/FixedBlockMemoryAllocator.cpp:37:45: error: no matching function for call to ‘std::unordered_set<long unsigned int, std::hash<long unsigned int>, std::equal_to<long unsigned int>, Diligent::STDAllocator<long unsigned int, Diligent::IMemoryAllocator> >::unordered_set(Diligent::STDAllocatorRawMem<long unsigned int>)’ m_NumBlocksInPage (NumBlocksInPage) ^ /home/mgironesd/Documents/DiligentEngine/DiligentCore/Common/src/FixedBlockMemoryAllocator.cpp:37:45: note: candidates are: In file included from /usr/include/c++/4.8/unordered_set:48:0, from /home/mgironesd/Documents/DiligentEngine/DiligentCore/Common/interface/FixedBlockMemoryAllocator.h:31, from /home/mgironesd/Documents/DiligentEngine/DiligentCore/Common/src/FixedBlockMemoryAllocator.cpp:25: /usr/include/c++/4.8/bits/unordered_set.h:178:7: note: std::unordered_set<_Value, _Hash, _Pred, _Alloc>::unordered_set(std::initializer_list<typename std::_Hashtable<_Value, _Value, _Alloc, std::__detail::_Identity, _Pred, _Hash, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<std::__not_<std::__and_<std::__is_fast_hash<_Hash>, std::is_default_constructible<_Hash>, std::is_copy_assignable<_Hash>, std::__detail::__is_noexcept_hash<_Tp, _Hash> > >::value, true, true> >::value_type>, std::unordered_set<_Value, _Hash, _Pred, _Alloc>::size_type, const hasher&, const key_equal&, const allocator_type&) [with _Value = long unsigned int; _Hash = std::hash<long unsigned int>; _Pred = std::equal_to<long unsigned int>; _Alloc = Diligent::STDAllocator<long unsigned int, Diligent::IMemoryAllocator>; typename std::_Hashtable<_Value, _Value, _Alloc, std::__detail::_Identity, _Pred, _Hash, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<std::__not_<std::__and_<std::__is_fast_hash<_Hash>, std::is_default_constructible<_Hash>, std::is_copy_assignable<_Hash>, std::__detail::__is_noexcept_hash<_Tp, _Hash> > >::value, true, true> >::value_type = long unsigned int; std::unordered_set<_Value, _Hash, _Pred, _Alloc>::size_type = long unsigned int; std::unordered_set<_Value, _Hash, _Pred, _Alloc>::hasher = std::hash<long unsigned int>; std::unordered_set<_Value, _Hash, _Pred, _Alloc>::key_equal = std::equal_to<long unsigned int>; std::unordered_set<_Value, _Hash, _Pred, _Alloc>::allocator_type = Diligent::STDAllocator<long unsigned int, Diligent::IMemoryAllocator>] unordered_set(initializer_list<value_type> __l, ^ /usr/include/c++/4.8/bits/unordered_set.h:178:7: note: no known conversion for argument 1 from ‘Diligent::STDAllocatorRawMem<long unsigned int> {aka Diligent::STDAllocator<long unsigned int, Diligent::IMemoryAllocator>}’ to ‘std::initializer_list<long unsigned int>’ /usr/include/c++/4.8/bits/unordered_set.h:165:7: note: std::unordered_set<_Value, _Hash, _Pred, _Alloc>::unordered_set(std::unordered_set<_Value, _Hash, _Pred, _Alloc>&&) [with _Value = long unsigned int; _Hash = std::hash<long unsigned int>; _Pred = std::equal_to<long unsigned int>; _Alloc = Diligent::STDAllocator<long unsigned int, Diligent::IMemoryAllocator>] unordered_set(unordered_set&&) = default; ^ /usr/include/c++/4.8/bits/unordered_set.h:165:7: note: no known conversion for argument 1 from ‘Diligent::STDAllocatorRawMem<long unsigned int> {aka Diligent::STDAllocator<long unsigned int, Diligent::IMemoryAllocator>}’ to ‘std::unordered_set<long unsigned int, std::hash<long unsigned int>, std::equal_to<long unsigned int>, Diligent::STDAllocator<long unsigned int, Diligent::IMemoryAllocator> >&&’ /usr/include/c++/4.8/bits/unordered_set.h:162:7: note: std::unordered_set<_Value, _Hash, _Pred, _Alloc>::unordered_set(const std::unordered_set<_Value, _Hash, _Pred, _Alloc>&) [with _Value = long unsigned int; _Hash = std::hash<long unsigned int>; _Pred = std::equal_to<long unsigned int>; _Alloc = Diligent::STDAllocator<long unsigned int, Diligent::IMemoryAllocator>] unordered_set(const unordered_set&) = default; ^ /usr/include/c++/4.8/bits/unordered_set.h:162:7: note: no known conversion for argument 1 from ‘Diligent::STDAllocatorRawMem<long unsigned int> {aka Diligent::STDAllocator<long unsigned int, Diligent::IMemoryAllocator>}’ to ‘const std::unordered_set<long unsigned int, std::hash<long unsigned int>, std::equal_to<long unsigned int>, Diligent::STDAllocator<long unsigned int, Diligent::IMemoryAllocator> >&’ /usr/include/c++/4.8/bits/unordered_set.h:153:2: note: template<class _InputIterator> std::unordered_set<_Value, _Hash, _Pred, _Alloc>::unordered_set(_InputIterator, _InputIterator, std::unordered_set<_Value, _Hash, _Pred, _Alloc>::size_type, const hasher&, const key_equal&, const allocator_type&) unordered_set(_InputIterator __f, _InputIterator __l, ^ /usr/include/c++/4.8/bits/unordered_set.h:153:2: note: template argument deduction/substitution failed: /home/mgironesd/Documents/DiligentEngine/DiligentCore/Common/src/FixedBlockMemoryAllocator.cpp:37:45: note: candidate expects 6 arguments, 1 provided m_NumBlocksInPage (NumBlocksInPage) ^ In file included from /usr/include/c++/4.8/unordered_set:48:0, from /home/mgironesd/Documents/DiligentEngine/DiligentCore/Common/interface/FixedBlockMemoryAllocator.h:31, from /home/mgironesd/Documents/DiligentEngine/DiligentCore/Common/src/FixedBlockMemoryAllocator.cpp:25: /usr/include/c++/4.8/bits/unordered_set.h:132:7: note: std::unordered_set<_Value, _Hash, _Pred, _Alloc>::unordered_set(std::unordered_set<_Value, _Hash, _Pred, _Alloc>::size_type, const hasher&, const key_equal&, const allocator_type&) [with _Value = long unsigned int; _Hash = std::hash<long unsigned int>; _Pred = std::equal_to<long unsigned int>; _Alloc = Diligent::STDAllocator<long unsigned int, Diligent::IMemoryAllocator>; std::unordered_set<_Value, _Hash, _Pred, _Alloc>::size_type = long unsigned int; std::unordered_set<_Value, _Hash, _Pred, _Alloc>::hasher = std::hash<long unsigned int>; std::unordered_set<_Value, _Hash, _Pred, _Alloc>::key_equal = std::equal_to<long unsigned int>; std::unordered_set<_Value, _Hash, _Pred, _Alloc>::allocator_type = Diligent::STDAllocator<long unsigned int, Diligent::IMemoryAllocator>] unordered_set(size_type __n = 10, ^ /usr/include/c++/4.8/bits/unordered_set.h:132:7: note: no known conversion for argument 1 from ‘Diligent::STDAllocatorRawMem<long unsigned int> {aka Diligent::STDAllocator<long unsigned int, Diligent::IMemoryAllocator>}’ to ‘std::unordered_set<long unsigned int, std::hash<long unsigned int>, std::equal_to<long unsigned int>, Diligent::STDAllocator<long unsigned int, Diligent::IMemoryAllocator> >::size_type {aka long unsigned int}’ /home/mgironesd/Documents/DiligentEngine/DiligentCore/Common/src/FixedBlockMemoryAllocator.cpp:37:45: error: no matching function for call to ‘std::unordered_map<void*, long unsigned int, std::hash<void*>, std::equal_to<void*>, Diligent::STDAllocator<std::pair<void* const, long unsigned int>, Diligent::IMemoryAllocator> >::unordered_map(Diligent::STDAllocatorRawMem<std::pair<void* const, long unsigned int> >)’ m_NumBlocksInPage (NumBlocksInPage) ^ /home/mgironesd/Documents/DiligentEngine/DiligentCore/Common/src/FixedBlockMemoryAllocator.cpp:37:45: note: candidates are: In file included from /usr/include/c++/4.8/unordered_map:48:0, from /home/mgironesd/Documents/DiligentEngine/DiligentCore/Common/interface/FixedBlockMemoryAllocator.h:29, from /home/mgironesd/Documents/DiligentEngine/DiligentCore/Common/src/FixedBlockMemoryAllocator.cpp:25: /usr/include/c++/4.8/bits/unordered_map.h:184:7: note: std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::unordered_map(std::initializer_list<typename std::_Hashtable<_Key, std::pair<const _Key, _Tp>, _Alloc, std::__detail::_Select1st, _Pred, _Hash, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<std::__not_<std::__and_<std::__is_fast_hash<_Hash>, std::is_default_constructible<_Hash>, std::is_copy_assignable<_Hash>, std::__detail::__is_noexcept_hash<_Key, _Hash> > >::value, false, true> >::value_type>, std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::size_type, const hasher&, const key_equal&, const allocator_type&) [with _Key = void*; _Tp = long unsigned int; _Hash = std::hash<void*>; _Pred = std::equal_to<void*>; _Alloc = Diligent::STDAllocator<std::pair<void* const, long unsigned int>, Diligent::IMemoryAllocator>; typename std::_Hashtable<_Key, std::pair<const _Key, _Tp>, _Alloc, std::__detail::_Select1st, _Pred, _Hash, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<std::__not_<std::__and_<std::__is_fast_hash<_Hash>, std::is_default_constructible<_Hash>, std::is_copy_assignable<_Hash>, std::__detail::__is_noexcept_hash<_Key, _Hash> > >::value, false, true> >::value_type = std::pair<void* const, long unsigned int>; std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::size_type = long unsigned int; std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::hasher = std::hash<void*>; std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::key_equal = std::equal_to<void*>; std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::allocator_type = Diligent::STDAllocator<std::pair<void* const, long unsigned int>, Diligent::IMemoryAllocator>] unordered_map(initializer_list<value_type> __l, ^ /usr/include/c++/4.8/bits/unordered_map.h:184:7: note: no known conversion for argument 1 from ‘Diligent::STDAllocatorRawMem<std::pair<void* const, long unsigned int> > {aka Diligent::STDAllocator<std::pair<void* const, long unsigned int>, Diligent::IMemoryAllocator>}’ to ‘std::initializer_list<std::pair<void* const, long unsigned int> >’ /usr/include/c++/4.8/bits/unordered_map.h:171:7: note: std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::unordered_map(std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>&&) [with _Key = void*; _Tp = long unsigned int; _Hash = std::hash<void*>; _Pred = std::equal_to<void*>; _Alloc = Diligent::STDAllocator<std::pair<void* const, long unsigned int>, Diligent::IMemoryAllocator>] unordered_map(unordered_map&&) = default; ^ /usr/include/c++/4.8/bits/unordered_map.h:171:7: note: no known conversion for argument 1 from ‘Diligent::STDAllocatorRawMem<std::pair<void* const, long unsigned int> > {aka Diligent::STDAllocator<std::pair<void* const, long unsigned int>, Diligent::IMemoryAllocator>}’ to ‘std::unordered_map<void*, long unsigned int, std::hash<void*>, std::equal_to<void*>, Diligent::STDAllocator<std::pair<void* const, long unsigned int>, Diligent::IMemoryAllocator> >&&’ /usr/include/c++/4.8/bits/unordered_map.h:168:7: note: std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::unordered_map(const std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>&) [with _Key = void*; _Tp = long unsigned int; _Hash = std::hash<void*>; _Pred = std::equal_to<void*>; _Alloc = Diligent::STDAllocator<std::pair<void* const, long unsigned int>, Diligent::IMemoryAllocator>] unordered_map(const unordered_map&) = default; ^ /usr/include/c++/4.8/bits/unordered_map.h:168:7: note: no known conversion for argument 1 from ‘Diligent::STDAllocatorRawMem<std::pair<void* const, long unsigned int> > {aka Diligent::STDAllocator<std::pair<void* const, long unsigned int>, Diligent::IMemoryAllocator>}’ to ‘const std::unordered_map<void*, long unsigned int, std::hash<void*>, std::equal_to<void*>, Diligent::STDAllocator<std::pair<void* const, long unsigned int>, Diligent::IMemoryAllocator> >&’ /usr/include/c++/4.8/bits/unordered_map.h:159:2: note: template<class _InputIterator> std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::unordered_map(_InputIterator, _InputIterator, std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::size_type, const hasher&, const key_equal&, const allocator_type&) unordered_map(_InputIterator __f, _InputIterator __l, ^ /usr/include/c++/4.8/bits/unordered_map.h:159:2: note: template argument deduction/substitution failed: /home/mgironesd/Documents/DiligentEngine/DiligentCore/Common/src/FixedBlockMemoryAllocator.cpp:37:45: note: candidate expects 6 arguments, 1 provided m_NumBlocksInPage (NumBlocksInPage) ^ In file included from /usr/include/c++/4.8/unordered_map:48:0, from /home/mgironesd/Documents/DiligentEngine/DiligentCore/Common/interface/FixedBlockMemoryAllocator.h:29, from /home/mgironesd/Documents/DiligentEngine/DiligentCore/Common/src/FixedBlockMemoryAllocator.cpp:25: /usr/include/c++/4.8/bits/unordered_map.h:138:7: note: std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::unordered_map(std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::size_type, const hasher&, const key_equal&, const allocator_type&) [with _Key = void*; _Tp = long unsigned int; _Hash = std::hash<void*>; _Pred = std::equal_to<void*>; _Alloc = Diligent::STDAllocator<std::pair<void* const, long unsigned int>, Diligent::IMemoryAllocator>; std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::size_type = long unsigned int; std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::hasher = std::hash<void*>; std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::key_equal = std::equal_to<void*>; std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::allocator_type = Diligent::STDAllocator<std::pair<void* const, long unsigned int>, Diligent::IMemoryAllocator>] unordered_map(size_type __n = 10, ^ /usr/include/c++/4.8/bits/unordered_map.h:138:7: note: no known conversion for argument 1 from ‘Diligent::STDAllocatorRawMem<std::pair<void* const, long unsigned int> > {aka Diligent::STDAllocator<std::pair<void* const, long unsigned int>, Diligent::IMemoryAllocator>}’ to ‘std::unordered_map<void*, long unsigned int, std::hash<void*>, std::equal_to<void*>, Diligent::STDAllocator<std::pair<void* const, long unsigned int>, Diligent::IMemoryAllocator> >::size_type {aka long unsigned int}’ make[2]: *** [DiligentCore/Common/CMakeFiles/Common.dir/src/FixedBlockMemoryAllocator.cpp.o] Error 1 make[1]: *** [DiligentCore/Common/CMakeFiles/Common.dir/all] Error 2 make: *** [all] Error 2

@DiligentGraphics
Copy link
Collaborator

DiligentGraphics commented Jul 16, 2018

Could you also upgrade your gcc, g++ and other c++ tools to version 7 or later? Looks like you are using gcc4.8, which is old and does not support modern c++ features.

@DiligentGraphics
Copy link
Collaborator

Closing this issue. Please feel free to reopen/create new one if you have other problems

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

1 participant