Compile error in MacOS
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 30/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- cmake, cpp
- Domain
- backend, build-system
Research direction
Start with include/eosio/vm/allocator.hpp at the reported uses of map and set extract, then inspect the hello-driver build in tools/hello_driver.cpp under the stated Clang and LLVM versions. Confirm the expected C++ standard support and define done as successfully compiling the hello-driver target on the affected macOS environments.
Written by the indexing model from the issue text.
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<std::__1::pair<unsigned long, void *>, eosio::vm::jit_allocator::by_size,
std::__1::allocator<std::__1::pair<unsigned long, void *> > >'
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<void *, unsigned long, std::__1::less<void *>, std::__1::allocator<std::__1::pair<void *const, unsigned long> >
>'
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::map<void *, unsigned long, std::__1::less<void *>,
std::__1::allocator<std::__1::pair<void *const, unsigned long> > > >' 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<std::__1::pair<unsigned long, void *>, eosio::vm::jit_allocator::by_size,
std::__1::allocator<std::__1::pair<unsigned long, void *> > >'
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<std::__1::set<std::__1::pair<unsigned long, void *>,
eosio::vm::jit_allocator::by_size, std::__1::allocator<std::__1::pair<unsigned long, void *> > > >' 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.
- Dominant language
- C++
- Stars
- 198
- Forks
- 62
- PR merge metrics
- No merged PRs in 30d
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from EOSIO/eos-vm
-
NOpen
Difficulty 5/5 Over a week Newbie friendliness 1/100
-
NOpen
Difficulty 5/5 Over a week Newbie friendliness 1/100
-
NoneOpen
Difficulty 5/5 Over a week Newbie friendliness 1/100
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
-
HOpen
Difficulty 5/5 Over a week Newbie friendliness 1/100
Similar issues
-
Web3 RPC: one-element batch request returns an object instead of an array (breaks ethers.js v6)Open
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
FISCO-BCOS/FISCO-BCOS#5706 ·
Maintainers usually reply within 3 days
-
Difficulty 1/5 Under an hour Newbie friendliness 85/100
521xueweihan/HelloGitHub#4011 ·
-
docs(simulation): Quickstart publishes UDP 14550, which the SITL images' own docs say not to doOpenstatus:needs-triage
Difficulty 1/5 1-3 hours Newbie friendliness 78/100
PX4/PX4-Autopilot#29292 · 1 comment ·
Maintainers usually reply within 1 day
-
I/O internal correctness medium priority rt_lib
Difficulty 2/5 1-3 hours Newbie friendliness 79/100
Maintainers usually reply within 1 day
-
GUI
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
sonic-pi-net/sonic-pi#3594 ·