emscripten-core/emscripten

implicit instantiation of undefined template

开放

#11,274 创建于 2020年5月28日

 (9 条评论) (1 个反应) (0 位负责人)C++ (3,519 个派生)batch import
embindhelp wanted

仓库指标

星标
 (27,361 个星标)
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.

贡献者指南