rayxuln / spine-runtime-for-godot

This project is a module for godot that allows it to load/play Spine skeleton animation.
MIT License
93 stars 22 forks source link

Bug found when compiling for Javascript #53

Open obinnaEmelumadu opened 2 years ago

obinnaEmelumadu commented 2 years ago

How to replicate: Run either scons -j4 platform=javascript tools=no target=release or scons -j4 platform=javascript tools=no target=release_debug in the console to build the export templates for Javascript.

The following errors will be returned:

scons: Reading SConscript files ... Couldn't parse CXX environment variable to infer compiler version. WebM SIMD optimizations are disabled. Check if your CPU architecture, CPU bits or platform are supported! Checking for C header file mntent.h... (cached) yes scons: done reading SConscript files. scons: Building targets ... [ 50%] Compiling ==> modules\spine_runtime\SpineSprite.cpp [ 53%] Compiling ==> thirdparty\miniupnpc\miniupnpc\minisoap.c [ 53%] Compiling ==> thirdparty\miniupnpc\miniupnpc\minissdpc.c [ 53%] Compiling ==> thirdparty\miniupnpc\miniupnpc\miniwget.c [ 53%] Compiling ==> thirdparty\miniupnpc\miniupnpc\upnpcommands.c [ 53%] Compiling ==> thirdparty\miniupnpc\miniupnpc\upnpdev.c [ 53%] Compiling ==> thirdparty\miniupnpc\miniupnpc\upnpreplyparse.c modules\spine_runtime\SpineSprite.cpp:77:55: warning: field 'skeleton_clipper' will be initialized after field 'overlap' [-Wreorder-ctor] select_track_id(0), empty_animation_duration(0.2f), skeleton_clipper(NULL), ^~~~~~ overlap(false) modules\spine_runtime\SpineSprite.cpp:341:30: warning: unused variable 'UV_STRIDE' [-Wunused-variable] static const unsigned short UV_STRIDE = 2; ^ [ 53%] error: conversion from 'size_t' (aka 'unsigned long') to 'const Variant' is ambiguous String prefix = vformat("ca/%d/", i); [ 53%] ^ .\core/variant.h:254:Compiling ==> thirdparty\miniupnpc\miniupnpc\connecthostport.c 2: note: candidate constructor Variant(bool p_bool); ^ .\core/variant.h:255:2: note: candidate constructor Variant(signed int p_int); // real one ^ .\core/variant.h:256:2: note: candidate constructor Variant(unsigned int p_int); ^ .\core/variant.h:262:2: note: candidate constructor Variant(signed short p_short); // real one ^ .\core/variant.h:263:2: note: candidate constructor Variant(unsigned short p_short); ^ .\core/variant.h:264:2: note: candidate constructor Variant(signed char p_char); // real one ^ .\core/variant.h:265:2: note: candidate constructor Variant(unsigned char p_char); ^ .\core/variant.h:266:2: note: candidate constructor Variant(int64_t p_int); // real one ^ .\core/variant.h:267:2: note: candidate constructor Variant(uint64_t p_int); ^ [ 53%] candidate constructor: Variant(float p_float); ^ [ 53%] .\core/variant.h:269:2: Compiling ==> thirdparty\miniupnpc\miniupnpc\portlistingparse.c note: candidate constructor Variant(double p_double); ^ modules\spine_runtime\SpineSprite.cpp:797:71: error: conversion from 'size_t' (aka 'unsigned long') to 'const Variant' is ambiguous p_list->push_back(PropertyInfo(Variant::NIL, vformat("ID %d", i), PROPERTY_HINT_NONE, prefix, PROPERTY_U... ^ .\core/variant.h:254:2: note: candidate constructor Variant(bool p_bool); ^ .\core/variant.h:255:2: note: candidate constructor Variant(signed int p_int); // real one ^ .\core/variant.h:256:2: note: candidate constructor Variant(unsigned int p_int); ^ .\core/variant.h:262:2: note: candidate constructor Variant(signed short p_short); // real one ^ .\core/variant.h:263:2: note: candidate constructor Variant(unsigned short p_short); [ 53%] ^ [ 53%] : note: candidate constructorCompiling ==> thirdparty\miniupnpc\miniupnpc\receivedata.c

    Variant(signed char p_char); // real one
    ^

.\core/variant.h:265:2: note: candidate constructor Variant(unsigned char p_char); ^ .\core/variant.h:266:2: note: candidate constructor Variant(int64_t p_int); // real one ^ .\core/variant.h:267:2: note: candidate constructor Variant(uint64_t p_int); ^ .\core/variant.h:268:2: note: candidate constructor Variant(float p_float); ^ .\core/variant.h:269:2: note: candidate constructor Variant(double p_double); ^ modules\spine_runtime\SpineSprite.cpp:984:88: error: conversion from 'size_t' (aka 'unsigned long') to 'const Variant' is ambiguous print_line(vformat("track_id at 'ID %d' can not be less than 0!", i)); ^ .\core/variant.h:254:2: note: candidate constructor Variant(bool p_bool); ^ .\core/variant.h:255:2: note: candidate constructor Variant(signed int p_int); // real one ^ .\core/variant.h:256:2: note: candidate constructor Variant(unsigned int p_int); ^ .\core/variant.h:262:2: note: candidate constructor Variant(signed short p_short); // real one ^ .\core/variant.h:263:2: note: candidate constructor Variant(unsigned short p_short); ^ .\core/variant.h:264:2: note: candidate constructor Variant(signed char p_char); // real one ^ .\core/variant.h:265:2: note: candidate constructor Variant(unsigned char p_char); ^ .\core/variant.h:266:2: note: candidate constructor Variant(int64_t p_int); // real one ^ .\core/variant.h:267:2: note: candidate constructor Variant(uint64_t p_int); ^ .\core/variant.h:268:2: note: candidate constructor Variant(float p_float); ^ .\core/variant.h:269:2: note: candidate constructor Variant(double p_double); ^ [ 53%] Compiling ==> thirdparty\miniupnpc\miniupnpc\addr_is_reserved.c 2 warnings and 3 errors generated. em++: error: 'D:/emsdk/upstream/bin\clang++.exe -target wasm32-unknown-emscripten -DEMSCRIPTEN -fignore-exceptions -fno-inline-functions -fvisibility=default -mllvm -combiner-global-alias-analysis=false -mllvm -enable-emscripten-sjlj -mllvm -disable-lsr -DEMSCRIPTEN_major=3 -DEMSCRIPTEN_minor=1 -D__EMSCRIPTEN_tiny__=0 -D_LIBCPP_ABI_VERSION=2 -Werror=implicit-function-declaration -Xclang -iwithsysroot/include/SDL --sysroot=D:\emsdk\upstream\emscripten\cache\sysroot -Xclang -iwithsysroot/include\compat -c -std=gnu++14 -Os -fno-exceptions -fno-rtti -Wall -Wno-ordered-compare-function-pointers -Werror=return-type -O2 -DNO_EDITOR_SPLASH -DNO_SAFE_CAST -DJAVASCRIPT_ENABLED -DUNIX_ENABLED -DJAVASCRIPT_EVAL_ENABLED -DNO_THREADS -DNDEBUG -DPTRCALL_ENABLED -DMINIZIP_ENABLED -DZSTD_STATIC_LINKING_ONLY -Ithirdparty\freetype\include -Ithirdparty\libpng -Ithirdparty\zstd -Ithirdparty\zlib -Iplatform\javascript -I. -Imodules\spine_runtime\spine-cpp\include modules\spine_runtime\SpineSprite.cpp -o modules\spine_runtime\SpineSprite.javascript.opt.bc' failed (returned 1) [ 53%] Compiling ==> thirdparty\vhacd\src\vhacdManifoldMesh.cpp [ 53%] Compiling ==> thirdparty\vhacd\src\FloatMath.cpp scons: *** [modules\spine_runtime\SpineSprite.javascript.opt.bc] Error 1 scons: building terminated because of errors. [Time elapsed: 00:00:36.006]