Godot version:
GODOT_arduino module building and working on GODOT version 3.1.2-stable
in the next 'stable' versions, the module GODOT_arduino didn't build anymore
https://github.com/threaderic/GODOT_arduino
Issue description:
scons: Reading SConscript files ...
Automatically detected platform: x11
Enabling ALSA
Enabling PulseAudio
Checking for C header file mntent.h... (cached) yes
scons: done reading SConscript files.
scons: Building targets ...
[ 6%] Compiling ==> modules/arduino_f/arduino_f.cpp
[ 14%] Compiling ==> thirdparty/bullet/BulletCollision/Gimpact/gim_box_set.cpp
[ 14%] Compiling ==> thirdparty/bullet/BulletCollision/Gimpact/gim_contact.cpp
[ 14%] Compiling ==> thirdparty/bullet/BulletCollision/Gimpact/gim_memory.cpp
[ 14%] Compiling ==> thirdparty/bullet/BulletCollision/Gimpact/gim_tri_collision.cpp
[ 14%] Compiling ==> thirdparty/bullet/BulletCollision/NarrowPhaseCollision/btContinuousConvexCollision.cpp
[ 14%] Compiling ==> thirdparty/bullet/BulletCollision/NarrowPhaseCollision/btConvexCast.cpp
[ 14%] Compiling ==> thirdparty/bullet/BulletCollision/NarrowPhaseCollision/btGjkConvexCast.cpp
[ 14%] Compiling ==> thirdparty/bullet/BulletCollision/NarrowPhaseCollision/btGjkEpa2.cpp
[ 14%] Compiling ==> thirdparty/bullet/BulletCollision/NarrowPhaseCollision/btGjkEpaPenetrationDepthSolver.cpp
[ 14%] Compiling ==> thirdparty/bullet/BulletCollision/NarrowPhaseCollision/btGjkPairDetector.cpp
[ 14%] Compiling ==> thirdparty/bullet/BulletCollision/NarrowPhaseCollision/btMinkowskiPenetrationDepthSolver.cpp
[ 15%] Compiling ==> thirdparty/bullet/BulletCollision/NarrowPhaseCollision/btPersistentManifold.cpp
[ 15%] Compiling ==> thirdparty/bullet/BulletCollision/NarrowPhaseCollision/btRaycastCallback.cpp
In file included from ./core/method_bind.h:407:0,
from ./core/class_db.h:34,
from ./core/reference.h:34,
from modules/arduino_f/arduino_f.h:43,
from modules/arduino_f/arduino_f.cpp:3:
./core/method_bind.gen.inc: In instantiation of 'PropertyInfo MethodBind0R<R>::_gen_argument_type_info(int) const [with R = char*]':
modules/arduino_f/arduino_f.cpp:235:1: required from here
./core/method_bind.gen.inc:204:60: error: incomplete type 'GetTypeInfo<char*, void>' used in nested name specifier
if (p_argument==-1) return GetTypeInfo<R>::get_class_info();
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~
./core/method_bind.gen.inc: In instantiation of 'GodotTypeInfo::Metadata MethodBind0R<R>::get_argument_meta(int) const [with R = char*]':
modules/arduino_f/arduino_f.cpp:235:1: required from here
./core/method_bind.gen.inc:192:41: error: incomplete type 'GetTypeInfo<char*, void>' used in nested name specifier
if (p_arg==-1) return GetTypeInfo<R>::METADATA;
^~~~~~~~
./core/method_bind.gen.inc: In instantiation of 'Variant::Type MethodBind0R<R>::_get_argument_type(int) const [with R = char*]':
./core/method_bind.gen.inc:190:87: required from 'Variant::Type MethodBind0R<R>::_gen_argument_type(int) const [with R = char*]'
modules/arduino_f/arduino_f.cpp:235:1: required from here
./core/method_bind.gen.inc:198:30: error: incomplete type 'GetTypeInfo<char*, void>' used in nested name specifier
if (p_argument==-1) return (Variant::Type)GetTypeInfo<R>::VARIANT_TYPE;
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[ 15%] Compiling ==> thirdparty/bullet/BulletCollision/NarrowPhaseCollision/btSubSimplexConvexCast.cpp
[ 15%] Compiling ==> thirdparty/bullet/BulletCollision/NarrowPhaseCollision/btVoronoiSimplexSolver.cpp
[ 15%] scons: *** [modules/arduino_f/arduino_f.x11.tools.64.o] Error 1
Compiling ==> thirdparty/bullet/BulletCollision/NarrowPhaseCollision/btPolyhedralContactClipping.cpp
scons: building terminated because of errors.
Steps to reproduce:
copy module from
https://github.com/threaderic/GODOT_arduino/tree/master/Godot_module
or from zip below
into the modules folder --> /godot-3.2.X-stable/modules/
Minimal reproduction project:
Godot_module_test.zip
./core/method_bind.gen.inc
Errors in the *.gen.* files are normal when you move from version to version. Clean up your build tree from the old *.gen.* files.
Either delete them manually or use git clean -dfx to delete changes from the repo (CAUTION: it will delete all changes, including custom modules and untracked files, use git clean -dxi for interactive mode if you aren't sure) or make a fresh clone.
I don't understand exactly by cleaning up your build tree from the old *.gen.*files :
I downloaded the last tagged Godot version 3.2.3-stable, then build without modifying anything ('initial build'),
then copy the above mentioned folder in the /godot-3.2.X-stable/modules/ and then rebuild.
This method worked well for the version 3.1.2-stable
If you are building from the clean source my comment is not relevant (old gen files are common issue when you update source and build without cleaning).
I don't know how it would have worked previously, but you're trying to bind a method which takes a char * argument here: https://github.com/threaderic/GODOT_arduino/blob/master/Godot_module/arduino_f.cpp#L215
And Godot's binding system likely doesn't like that. You should expose Strings to the public API.
but you're trying to bind a method which takes a char * argument here
Nop, there's String version above in the #ifndef TEST_arduino_f_module_in_main, char* is in #else branch and seems to be used for standalone test build.
Thing to test: your module is set to C++11, and 3.2 is currently using C++14 (3.2.1 was using it to, but some C++14 specific might be added to method binding since then).
yes, bruvzg, you're right char*, it's for a standalone version. the String is used for the Godot version.
I changed the SCsub from C++11 to C++14 --> unfortunately, the problem stays the same.
https://github.com/threaderic/GODOT_arduino/blob/master/Godot_module/arduino_f.cpp#L197
Here's the issue, this one is char *, I guess it was not checking return type in older version.
Yessssss ! I built it and it works very well ! :+1: many thanks spending your time reading my code guys...
I spent many minutes... hours not finding this issue !
I can now propose it as a new module... Perhaps it would interest someone to connect Arduino <-> Godot !
I wish you a good time !
Bye
Most helpful comment
https://github.com/threaderic/GODOT_arduino/blob/master/Godot_module/arduino_f.cpp#L197
Here's the issue, this one is
char *, I guess it was not checking return type in older version.