Comments (4)
The error message does seem like a CMake issue though...
Basically, the tool creates a bunch of containers and remembers the size they wanted to allocate. This has to be done on the target machine. If the tool is disabled it should just create an empty container_node_sizes_impl.hpp
, could you see whether that has been done?
You can of course manually create it, it's just a bunch of template specializations, but I'd recommend against it. If CMake doesn't want to do it, you can manually compile node_size_debugger.cpp
(it's just a single file), but it has to be run on your target.
from memory.
Yes it did create an empty file.
But i only realized it after my main project failed to find the templates that were supposed to be in that empty file.
It wasnt exactly hard to find the problem but maybe add a #warn
to the container_node_sizes_impl.hpp
file if the tools failed to make things easier to debug.
I am apparently blind since i didnt notice the warning in cmake.
Im going to try to manually compile the file. I think i have an idea of what happened now.
from memory.
The problem was that the tools program was unable to save the file from the virtual file system that emscripten created to the actually system fs. I dont know whether or not cmake knew that it had to invoke node instead of just running the file.
The fix was rather simple:
In the include section i had to add
#ifdef __EMSCRIPTEN__
#include <emscripten.h>
#endif
And at the beginning of the main function:
int main(int argc, char* argv[])
{
#ifdef __EMSCRIPTEN__
EM_ASM(
FS.mkdir('cwd');
FS.mount(NODEFS, { root: '.' }, '/cwd');
);
#endif
After this these small fixes the tool properly created the files. It does however limit the capabilities of the tool in the sense that it can only access the current working directory and that the file name passed as command line argument has to be proceeded by cwd/.
from memory.
Okay, so I won't add it there myself.
Please let me know if you have any other issues.
from memory.
Related Issues (20)
- How to use memory::unordered_map HOT 12
- Build error because of doctest HOT 5
- Is container_node_sizes_impl.hpp platform related? HOT 6
- mac build failure - Unable to determine alignment of C++ type long long - no error text HOT 3
- cross-compiling for qnx 32 bit HOT 2
- Wrapping Stateful to Stateless allocators HOT 2
- Compile error when set FOONATHAN_MEMORY_TEMPORARY_STACK_MODE to 1 HOT 1
- Making `container node sizes` optional? HOT 3
- Strange exception from unordered_set with memory_stack, on MSVC HOT 9
- Library triggers bug in MSVC++ v19 (VS 2022) under modern C++ standards, preventing compilation HOT 2
- `memory_pool_collection` carves too little memory from block if there are many buckets HOT 4
- [docs/examples] associative containers HOT 4
- memory_block_stack::owns() seems wrong? HOT 1
- Time for a new release? HOT 1
- problem with std::is_abstract for unique_ptr with allocator inside struct definition HOT 1
- give allocator_polymorphic_deleter a default constructor HOT 1
- Thread safety
- Build issues on MacOS while building tools with static flag HOT 3
- MinGW build fails due to "#warning" HOT 1
- Can a vector use a memory pool with a small_node_pool ?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from memory.