Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with 3.1.1 android compiling #15

Closed
alperc84 opened this issue Oct 7, 2019 · 5 comments
Closed

Issue with 3.1.1 android compiling #15

alperc84 opened this issue Oct 7, 2019 · 5 comments

Comments

@alperc84
Copy link
Contributor

alperc84 commented Oct 7, 2019

Hi,

I can build godot 3.1.1 with creature module without any problem for windows, but when i try android_arch=armv7 or android_arch=arm64v8 i get the error below about GLM. I hope I'm not making a silly mistake. I updated visual studio 2019 it don't help.

[ 23%] Compiling ==> modules\creaturegodot\CreatureMetaData.cpp
=====
b'In file included from modules\\creaturegodot\\CreatureMetaData.cpp:3:\r\nIn file included from modules\\creaturegodot/MeshBone.h:45:\r\nIn file included from modules\\creaturegodot\\glm\\gtx/transform.hpp:46:\r\nIn file included from modules\\creaturegodot\\glm\\gtx/../gtc/matrix_transform.hpp:292:\r\nmodules\\creaturegodot\\glm\\gtx/../gtc/matrix_transform.inl:58:11: warning: GLM: rotate function taking degrees as a parameter is deprecated. #define GLM_FORCE_RADIANS before including GLM headers to remove this message. [-W#pragma-messages]\r\n#               pragma message("GLM: rotate function taking degrees as a parameter is deprecated. #define GLM_FORCE_RADIANS before including GLM headers to remove this message.")\r\n                       ^\r\nmodules\\creaturegodot\\glm\\gtx/../gtc/matrix_transform.inl:99:11: warning: GLM: rotate_slow function taking degrees as a parameter is deprecated. #define GLM_FORCE_RADIANS before including GLM headers to remove this message. [-W#pragma-messages]\r\n#               pragma message("GLM: rotate_slow function taking degrees as a parameter is deprecated. #define GLM_FORCE_RADIANS before including GLM headers to remove this message.")\r\n                       ^\r\nmodules\\creaturegodot\\glm\\gtx/../gtc/matrix_transform.inl:232:11: warning: GLM: perspective function taking degrees as a parameter is deprecated. #define GLM_FORCE_RADIANS before including GLM headers to remove this message. [-W#pragma-messages]\r\n#               pragma message("GLM: perspective function taking degrees as a parameter is deprecated. #define GLM_FORCE_RADIANS before including GLM headers to remove this message.")\r\n                       ^\r\nmodules\\creaturegodot\\glm\\gtx/../gtc/matrix_transform.inl:264:11: warning: GLM: perspectiveFov function taking degrees as a parameter is deprecated. #define GLM_FORCE_RADIANS before including GLM headers to remove this message. [-W#pragma-messages]\r\n#               pragma message("GLM: perspectiveFov function taking degrees as a parameter is deprecated. #define GLM_FORCE_RADIANS before including GLM headers to remove this message.")\r\n                       ^\r\nmodules\\creaturegodot\\glm\\gtx/../gtc/matrix_transform.inl:290:11: warning: GLM: infinitePerspective function taking degrees as a parameter is deprecated. #define GLM_FORCE_RADIANS before including GLM headers to remove this message. [-W#pragma-messages]\r\n#               pragma message("GLM: infinitePerspective function taking degrees as a parameter is deprecated. #define GLM_FORCE_RADIANS before including GLM headers to remove this message.")\r\n                       ^\r\nmodules\\creaturegodot\\glm\\gtx/../gtc/matrix_transform.inl:318:11: warning: GLM: tweakedInfinitePerspective function taking degrees as a parameter is deprecated. #define GLM_FORCE_RADIANS before including GLM headers to remove this message. [-W#pragma-messages]\r\n#               pragma message("GLM: tweakedInfinitePerspective function taking degrees as a parameter is deprecated. #define GLM_FORCE_RADIANS before including GLM headers to remove this message.")\r\n                       ^\r\nIn file included from modules\\creaturegodot\\CreatureMetaData.cpp:3:\r\nIn file included from modules\\creaturegodot/MeshBone.h:46:\r\nIn file included from modules\\creaturegodot\\glm\\gtc/quaternion.hpp:401:\r\nmodules\\creaturegodot\\glm\\gtx/../gtc/quaternion.inl:626:11: warning: GLM: rotate function taking degrees as a parameter is deprecated. #define GLM_FORCE_RADIANS before including GLM headers to remove this message. [-W#pragma-messages]\r\n#               pragma message("GLM: rotate function taking degrees as a parameter is deprecated. #define GLM_FORCE_RADIANS before including GLM headers to remove this message.")\r\n                       ^\r\nmodules\\creaturegodot\\glm\\gtx/../gtc/quaternion.inl:653:11: warning: GLM: roll function returning degrees is deprecated. #define GLM_FORCE_RADIANS before including GLM headers to remove this message. [-W#pragma-messages]\r\n#               pragma message("GLM: roll function returning degrees is deprecated. #define GLM_FORCE_RADIANS before including GLM headers to remove this message.")\r\n                       ^\r\nmodules\\creaturegodot\\glm\\gtx/../gtc/quaternion.inl:667:11: warning: GLM: pitch function returning degrees is deprecated. #define GLM_FORCE_RADIANS before including GLM headers to remove this message. [-W#pragma-messages]\r\n#               pragma message("GLM: pitch function returning degrees is deprecated. #define GLM_FORCE_RADIANS before including GLM headers to remove this message.")\r\n                       ^\r\nmodules\\creaturegodot\\glm\\gtx/../gtc/quaternion.inl:681:11: warning: GLM: yaw function returning degrees is deprecated. #define GLM_FORCE_RADIANS before including GLM headers to remove this message. [-W#pragma-messages]\r\n#               pragma message("GLM: yaw function returning degrees is deprecated. #define GLM_FORCE_RADIANS before including GLM headers to remove this message.")\r\n                       ^\r\nmodules\\creaturegodot\\glm\\gtx/../gtc/quaternion.inl:811:11: warning: GLM: angle function returning degrees is deprecated. #define GLM_FORCE_RADIANS before including GLM headers to remove this message. [-W#pragma-messages]\r\n#               pragma message("GLM: angle function returning degrees is deprecated. #define GLM_FORCE_RADIANS before including GLM headers to remove this message.")\r\n                       ^\r\nmodules\\creaturegodot\\glm\\gtx/../gtc/quaternion.inl:841:11: warning: GLM: angleAxis function taking degrees as a parameter is deprecated. #define GLM_FORCE_RADIANS before including GLM headers to remove this message. [-W#pragma-messages]\r\n#               pragma message("GLM: angleAxis function taking degrees as a parameter is deprecated. #define GLM_FORCE_RADIANS before including GLM headers to remove this message.")\r\n                       ^\r\nIn file included from modules\\creaturegodot\\CreatureMetaData.cpp:3:\r\nIn file included from modules\\creaturegodot/MeshBone.h:49:\r\nIn file included from modules\\creaturegodot\\glm\\ext.hpp:116:\r\nIn file included from modules\\creaturegodot\\glm/./gtx/polar_coordinates.hpp:70:\r\nmodules\\creaturegodot\\glm\\gtx/polar_coordinates.inl:28:11: warning: GLM: polar function returning degrees is deprecated. #define GLM_FORCE_RADIANS before including GLM headers to remove this message. [-W#pragma-messages]\r\n#               pragma message("GLM: polar function returning degrees is deprecated. #define GLM_FORCE_RADIANS before including GLM headers to remove this message.")\r\n                       ^\r\nmodules\\creaturegodot\\glm\\gtx/polar_coordinates.inl:46:11: warning: GLM: euclidean function taking degrees as parameters is deprecated. #define GLM_FORCE_RADIANS before including GLM headers to remove this message. [-W#pragma-messages]\r\n#               pragma message("GLM: euclidean function taking degrees as parameters is deprecated. #define GLM_FORCE_RADIANS before including GLM headers to remove this message.")\r\n                       ^\r\nIn file included from modules\\creaturegodot\\CreatureMetaData.cpp:3:\r\nIn file included from modules\\creaturegodot/MeshBone.h:49:\r\nIn file included from modules\\creaturegodot\\glm\\ext.hpp:120:\r\nIn file included from modules\\creaturegodot\\glm/./gtx/rotate_vector.hpp:130:\r\nmodules\\creaturegodot\\glm\\gtx/rotate_vector.inl:24:11: warning: GLM: rotate function taking degrees as parameters is deprecated. #define GLM_FORCE_RADIANS before including GLM headers to remove this message. [-W#pragma-messages]\r\n#               pragma message("GLM: rotate function taking degrees as parameters is deprecated. #define GLM_FORCE_RADIANS before including GLM headers to remove this message.")\r\n                       ^\r\nmodules\\creaturegodot\\glm\\gtx/rotate_vector.inl:79:11: warning: GLM: rotateX function taking degrees as parameters is deprecated. #define GLM_FORCE_RADIANS before including GLM headers to remove this message. [-W#pragma-messages]\r\n#               pragma message("GLM: rotateX function taking degrees as parameters is deprecated. #define GLM_FORCE_RADIANS before including GLM headers to remove this message.")\r\n                       ^\r\nmodules\\creaturegodot\\glm\\gtx/rotate_vector.inl:102:11: warning: GLM: rotateY function taking degrees as parameters is deprecated. #define GLM_FORCE_RADIANS before including GLM headers to remove this message. [-W#pragma-messages]\r\n#               pragma message("GLM: rotateY function taking degrees as parameters is deprecated. #define GLM_FORCE_RADIANS before including GLM headers to remove this message.")\r\n                       ^\r\nmodules\\creaturegodot\\glm\\gtx/rotate_vector.inl:125:11: warning: GLM: rotateZ function taking degrees as parameters is deprecated. #define GLM_FORCE_RADIANS before including GLM headers to remove this message. [-W#pragma-messages]\r\n#               pragma message("GLM: rotateZ function taking degrees as parameters is deprecated. #define GLM_FORCE_RADIANS before including GLM headers to remove this message.")\r\n                       ^\r\nmodules\\creaturegodot\\glm\\gtx/rotate_vector.inl:148:11: warning: GLM: rotateX function taking degrees as parameters is deprecated. #define GLM_FORCE_RADIANS before including GLM headers to remove this message. [-W#pragma-messages]\r\n#               pragma message("GLM: rotateX function taking degrees as parameters is deprecated. #define GLM_FORCE_RADIANS before including GLM headers to remove this message.")\r\n                       ^\r\nmodules\\creaturegodot\\glm\\gtx/rotate_vector.inl:171:11: warning: GLM: rotateX function taking degrees as parameters is deprecated. #define GLM_FORCE_RADIANS before including GLM headers to remove this message. [-W#pragma-messages]\r\n#               pragma message("GLM: rotateX function taking degrees as parameters is deprecated. #define GLM_FORCE_RADIANS before including GLM headers to remove this message.")\r\n                       ^\r\nmodules\\creaturegodot\\glm\\gtx/rotate_vector.inl:194:11: warning: GLM: rotateZ function taking degrees as parameters is deprecated. #define GLM_FORCE_RADIANS before including GLM headers to remove this message. [-W#pragma-messages]\r\n#               pragma message("GLM: rotateZ function taking degrees as parameters is deprecated. #define GLM_FORCE_RADIANS before including GLM headers to remove this message.")\r\n                       ^\r\nmodules\\creaturegodot\\glm\\gtx/rotate_vector.inl:218:12: warning: GLM: rotateZ function taking degrees as parameters is deprecated. #define GLM_FORCE_RADIANS before including GLM headers to remove this message. [-W#pragma-messages]\r\n#                       pragma message("GLM: rotateZ function taking degrees as parameters is deprecated. #define GLM_FORCE_RADIANS before including GLM headers to remove this message.")\r\n                               ^\r\nIn file included from modules\\creaturegodot\\CreatureMetaData.cpp:3:\r\nIn file included from modules\\creaturegodot/MeshBone.h:49:\r\nIn file included from modules\\creaturegodot\\glm\\ext.hpp:129:\r\nIn file included from modules\\creaturegodot\\glm/./gtx/vector_angle.hpp:86:\r\nmodules\\creaturegodot\\glm\\gtx/vector_angle.inl:26:11: warning: GLM: angle function returning degrees is deprecated. #define GLM_FORCE_RADIANS before including GLM headers to remove this message. [-W#pragma-messages]\r\n#               pragma message("GLM: angle function returning degrees is deprecated. #define GLM_FORCE_RADIANS before including GLM headers to remove this message.")\r\n                       ^\r\nmodules\\creaturegodot\\glm\\gtx/vector_angle.inl:45:11: warning: GLM: angle function returning degrees is deprecated. #define GLM_FORCE_RADIANS before including GLM headers to remove this message. [-W#pragma-messages]\r\n#               pragma message("GLM: angle function returning degrees is deprecated. #define GLM_FORCE_RADIANS before including GLM headers to remove this message.")\r\n                       ^\r\nmodules\\creaturegodot\\glm\\gtx/vector_angle.inl:65:11: warning: GLM: orientedAngle function returning degrees is deprecated. #define GLM_FORCE_RADIANS before including GLM headers to remove this message. [-W#pragma-messages]\r\n#               pragma message("GLM: orientedAngle function returning degrees is deprecated. #define GLM_FORCE_RADIANS before including GLM headers to remove this message.")\r\n                       ^\r\nmodules\\creaturegodot\\glm\\gtx/vector_angle.inl:90:11: warning: GLM: orientedAngle function returning degrees is deprecated. #define GLM_FORCE_RADIANS before including GLM headers to remove this message. [-W#pragma-messages]\r\n#               pragma message("GLM: orientedAngle function returning degrees is deprecated. #define GLM_FORCE_RADIANS before including GLM headers to remove this message.")\r\n                       ^\r\nmodules\\creaturegodot\\CreatureMetaData.cpp:102:34: warning: lambda capture \'this\' is not used [-Wunused-lambda-capture]\r\n    auto getJsonNodeFromArray = [this](JsonNode& json_obj, int idx)\r\n                                 ^~~~\r\nmodules\\creaturegodot\\CreatureMetaData.cpp:518:31: warning: lambda capture \'this\' is not used [-Wunused-lambda-capture]\r\n                                                                auto getColorFloat = [this](uint8_t val_in)\r\n                                                                                      ^~~~\r\nmodules\\creaturegodot\\CreatureMetaData.cpp:579:8: warning: unused variable \'radius\' [-Wunused-variable]\r\n                auto radius = (float)morph_data.morph_res * 0.5f;\r\n                     ^\r\nIn file included from modules\\creaturegodot\\CreatureMetaData.cpp:1:\r\nIn file included from modules\\creaturegodot/CreatureMetaData.h:10:\r\nIn file included from modules\\creaturegodot\\glm\\gtx/../glm.hpp:110:\r\nIn file included from modules\\creaturegodot\\glm\\gtx/../gtc/../common.hpp:32:\r\nIn file included from modules\\creaturegodot\\glm/detail/func_common.hpp:470:\r\nmodules\\creaturegodot\\glm/detail/func_common.inl:720:12: error: use of undeclared identifier \'_isnan\'\r\n                                return _isnan(x) != 0;\r\n                                       ^\r\nmodules\\creaturegodot\\glm\\gtx/../gtc/packing.inl:143:16: note: in instantiation of function template specialization \'glm::isnan<float>\' requested here\r\n                else if(glm::isnan(x))\r\n                             ^\r\nIn file included from modules\\creaturegodot\\CreatureMetaData.cpp:1:\r\nIn file included from modules\\creaturegodot/CreatureMetaData.h:10:\r\nIn file included from modules\\creaturegodot\\glm\\gtx/../glm.hpp:110:\r\nIn file included from modules\\creaturegodot\\glm\\gtx/../gtc/../common.hpp:32:\r\nIn file included from modules\\creaturegodot\\glm/detail/func_common.hpp:470:\r\nmodules\\creaturegodot\\glm/detail/func_common.inl:791:12: error: use of undeclared identifier \'_isinf\'\r\n                                return _isinf(x) != 0;\r\n                                       ^\r\nmodules\\creaturegodot\\glm\\gtx/../gtc/packing.inl:145:16: note: in instantiation of function template specialization \'glm::isinf<float>\' requested here\r\n                else if(glm::isinf(x))\r\n                             ^\r\n29 warnings and 2 errors generated.\r\n'
=====
scons: *** [modules\creaturegodot\CreatureMetaData.android.opt.armv8.o] Error 1
scons: building terminated because of errors.
@kestrelm
Copy link
Owner

kestrelm commented Oct 7, 2019

Hello,

It looks like a compilation warning which results in the compiler refusing to go any further.
In the SCsub file of the godot plugin, you should add in the required additional compiler defines:

env_mymodule.Append(CPPDEFINES=['_USE_MATH_DEFINES', 'GLM_FORCE_RADIANS'])

to get rid of the warning. Give that a go.

@alperc84
Copy link
Contributor Author

alperc84 commented Oct 7, 2019

Thank you, that eliminated most of errors but we still can't continue:

[ 23%] �[94mCompiling �[95m==> �[93mmodules\creaturegodot\CreatureMetaData.cpp�[0m
=====
b"modules\\creaturegodot\\CreatureMetaData.cpp:102:34: warning: lambda capture 'this' is not used [-Wunused-lambda-capture]\r\n    auto getJsonNodeFromArray = [this](JsonNode& json_obj, int idx)\r\n                                 ^~~~\r\nmodules\\creaturegodot\\CreatureMetaData.cpp:518:31: warning: lambda capture 'this' is not used [-Wunused-lambda-capture]\r\n                                                                auto getColorFloat = [this](uint8_t val_in)\r\n                                                                                      ^~~~\r\nmodules\\creaturegodot\\CreatureMetaData.cpp:579:8: warning: unused variable 'radius' [-Wunused-variable]\r\n                auto radius = (float)morph_data.morph_res * 0.5f;\r\n                     ^\r\nIn file included from modules\\creaturegodot\\CreatureMetaData.cpp:1:\r\nIn file included from modules\\creaturegodot/CreatureMetaData.h:10:\r\nIn file included from modules\\creaturegodot\\glm\\gtx/../glm.hpp:110:\r\nIn file included from modules\\creaturegodot\\glm\\gtx/../gtc/../common.hpp:32:\r\nIn file included from modules\\creaturegodot\\glm/detail/func_common.hpp:470:\r\nmodules\\creaturegodot\\glm/detail/func_common.inl:720:12: error: use of undeclared identifier '_isnan'\r\n                                return _isnan(x) != 0;\r\n                                       ^\r\nmodules\\creaturegodot\\glm\\gtx/../gtc/packing.inl:143:16: note: in instantiation of function template specialization 'glm::isnan<float>' requested here\r\n                else if(glm::isnan(x))\r\n                             ^\r\nIn file included from modules\\creaturegodot\\CreatureMetaData.cpp:1:\r\nIn file included from modules\\creaturegodot/CreatureMetaData.h:10:\r\nIn file included from modules\\creaturegodot\\glm\\gtx/../glm.hpp:110:\r\nIn file included from modules\\creaturegodot\\glm\\gtx/../gtc/../common.hpp:32:\r\nIn file included from modules\\creaturegodot\\glm/detail/func_common.hpp:470:\r\nmodules\\creaturegodot\\glm/detail/func_common.inl:791:12: error: use of undeclared identifier '_isinf'\r\n                                return _isinf(x) != 0;\r\n                                       ^\r\nmodules\\creaturegodot\\glm\\gtx/../gtc/packing.inl:145:16: note: in instantiation of function template specialization 'glm::isinf<float>' requested here\r\n                else if(glm::isinf(x))\r\n                             ^\r\n3 warnings and 2 errors generated.\r\n"
=====
scons: *** [modules\creaturegodot\CreatureMetaData.android.opt.armv7.neon.o] Error 1
scons: building terminated because of errors.

btw my setup: godot-3.1.1-stable - android-sdk-tools-windows-4333796 - android-ndk-r20-windows-x86_64 - python-3.7.4 - pywin32-224.win32-py3.7 - scons-3.0.4 - jdk1.8.0_212 - Creature_Godot-master - vs2019

@kestrelm
Copy link
Owner

kestrelm commented Oct 7, 2019

Hello,

Looks like those are all warnings which result from your very strict compiler settings. You can remove the 'this' keyword from the lambda bindings and recompile. As for the unidentified isNan and isInf calls, that is strange. You can take a look at this thread:
numworks/epsilon#115

For maybe more info. They suggest including math.h in the affected files. Or you can try replacing those isNan and isInf calls with the regular std versions. I don't have android so I am unable to verify but perhaps they have a different version of those math calls for their platform.

@alperc84
Copy link
Contributor Author

alperc84 commented Oct 7, 2019

Thank you for your time,
I updated GLM in "modules\creaturegodot\glm". https://github.com/g-truc/glm/releases/tag/0.9.9.6
and it's solved.

@alperc84 alperc84 closed this as completed Oct 7, 2019
@kestrelm
Copy link
Owner

kestrelm commented Oct 7, 2019

Fantastic! I think I might update glm for the godot runtime here in the future as well.

Cheers

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants