emscripten-core/emscripten

implicit instantiation of undefined template

Open

#11.274 geöffnet am 28. Mai 2020

Auf GitHub ansehen
 (9 Kommentare) (1 Reaktion) (0 zugewiesene Personen)C++ (3.519 Forks)batch import
embindhelp wanted

Repository-Metriken

Stars
 (27.361 Stars)
PR-Merge-Metriken
 (Durchschn. Merge 19T 10h) (147 gemergte PRs in 30 T)

Beschreibung

Hello there 👋 I maintaining a core atom package and the CI looks like it's been stuck for a while, it was downloading a version-less portable emscripten sdk and activating version sdk-1.37.9-64bit

implicit instantiation of undefined template 'emscripten::internal::RegisterClassConstructor<emscripten::val>'

emcc: warning: Assuming object file output in the absence of `-c`, based on output filename. Add with `-c` or `-r` to avoid this warning [-Wemcc]
 
In file included from src/bindings/em/patch.cc:5:
 
/Users/distiller/project/emsdk-1.39.16/upstream/emscripten/system/include/emscripten/bind.h:1466:13: error: implicit instantiation of undefined template 'emscripten::internal::RegisterClassConstructor<emscripten::val>'
 
            invoker::template invoke<ClassType, Policies...>(callable);

src/bindings/em/patch.cc:86:6: note: in instantiation of function template specialization 'emscripten::class_<Patch, emscripten::internal::NoBaseClass>::constructor<emscripten::val, Patch *(*)(emscripten::val), emscripten::allow_raw_pointers>' requested here
 
    .constructor<emscripten::val>(WRAP_STATIC(&constructor), emscripten::allow_raw_pointers())   
/Users/distiller/project/emsdk-1.39.16/upstream/emscripten/system/include/emscripten/bind.h:1219:16: note: template is declared here
 
        struct RegisterClassConstructor;

I saw another issue that looks related but sadly there are no answers from the community.

For reference that's the PR I created on the target repo to update the emscripten dependencies and resolve the build issues, in case you would like the setup before and after, feel free to build this locally by following the same steps in .github/workflows/build.yml


that's the exact reference the compiler is complaining about, I am not entirely sure if the problem is related to this line or not but seems related to the way of overloading the constructor.

Contributor Guide