emscripten-core/emscripten

implicit instantiation of undefined template

Open

#11,274 建立於 2020年5月28日

在 GitHub 查看
 (9 留言) (1 反應) (0 負責人)C++ (3,519 fork)batch import
embindhelp wanted

倉庫指標

Star
 (27,361 star)
PR 合併指標
 (平均合併 19天 10小時) (30 天內合併 147 個 PR)

描述

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.

貢獻者指南