EOSIO / EOSIO/eos-vm

Compile error in MacOS

Open
#121 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
200
Forks
62
PR merge metrics
No merged PRs in 30d

Description

Env: MacOS Catalina (also tried in OS version MacOS High Serria)
Clang:
- Apple clang version 11.0.0 (clang-1100.0.33.8)
- Target: x86_64-apple-darwin19.0.0
- Thread model: posix
- InstalledDir: /Applications/Xcode11.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
(also tried in clang version 10.0.1)

llvm: 7.1.0 (also tried in llvm version 9.0.0)

Compile Error:

> Scanning dependencies of target hello-driver
> [ 98%] Building CXX object tools/CMakeFiles/hello-driver.dir/hello_driver.cpp.o
> In file included from /Users/zhangyy/CLionProjects/eos-vm/tools/hello_driver.cpp:1:
> In file included from /Users/zhangyy/CLionProjects/eos-vm/include/eosio/vm/backend.hpp:3:
> /Users/zhangyy/CLionProjects/eos-vm/include/eosio/vm/allocator.hpp:213:45: error: no member named 'extract' in 'std::__1::set, eosio::vm::jit_allocator::by_size,
> std::__1::allocator > >'
> auto node = free_blocks_by_size.extract({lhs->second, lhs->first});
> ~~~~~~~~~~~~~~~~~~~ ^
> /Users/zhangyy/CLionProjects/eos-vm/include/eosio/vm/allocator.hpp:174:27: error: no member named 'extract' in 'std::__1::map, std::__1::allocator >
> >'
> auto node = from.extract(key);
> ~~~~ ^
> /Users/zhangyy/CLionProjects/eos-vm/include/eosio/vm/allocator.hpp:106:10: note: in instantiation of function template specialization 'eosio::vm::jit_allocator::transfer_node,
> std::__1::allocator > > >' requested here
> transfer_node(free_blocks, allocated_blocks, best->second);
> ^
> /Users/zhangyy/CLionProjects/eos-vm/include/eosio/vm/allocator.hpp:174:27: error: no member named 'extract' in 'std::__1::set, eosio::vm::jit_allocator::by_size,
> std::__1::allocator > >'
> auto node = from.extract(key);
> ~~~~ ^
> /Users/zhangyy/CLionProjects/eos-vm/include/eosio/vm/allocator.hpp:107:17: note: in instantiation of function template specialization 'eosio::vm::jit_allocator::transfer_node,
> eosio::vm::jit_allocator::by_size, std::__1::allocator > > >' requested here
> best = transfer_node(free_blocks_by_size, allocated_blocks_by_size, *best);
> ^
> 3 errors generated.
> make[2]: *** [tools/CMakeFiles/hello-driver.dir/hello_driver.cpp.o] Error 1
> make[1]: *** [tools/CMakeFiles/hello-driver.dir/all] Error 2
> make: *** [all] Error 2

It seems Clang does not support **C++17** feature **map and set extract function**.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.