Git Product home page Git Product logo

Comments (4)

foonathan avatar foonathan commented on June 4, 2024

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.

CodingRays avatar CodingRays commented on June 4, 2024

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.

CodingRays avatar CodingRays commented on June 4, 2024

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.

foonathan avatar foonathan commented on June 4, 2024

Okay, so I won't add it there myself.

Please let me know if you have any other issues.

from memory.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.