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

Failed to build on MSYS2 MINGW64 #11

Open
ghost opened this issue Apr 8, 2023 · 3 comments
Open

Failed to build on MSYS2 MINGW64 #11

ghost opened this issue Apr 8, 2023 · 3 comments

Comments

@ghost
Copy link

ghost commented Apr 8, 2023

Please have a look. There are too many errors so I can't post it here. Thank you.

@gan74 gan74 mentioned this issue Jun 29, 2023
@gan74
Copy link
Owner

gan74 commented Jun 29, 2023

Hi, I was just able to try compiling with MSYS2 in a long while, and I am running into problem compiling LuaJIT.

Are your error related to LuaJIT or the engine itself ?

@ghost
Copy link
Author

ghost commented Jun 29, 2023

Actually they are not errors but warnings. There are too many warning and as ninja by default does parallel builds so I mistake them as full of errors. Indeed there is only one error:

[23/234] Building CXX object CMakeFiles/yave.dir/yave/components/LocalLightBase.cpp.obj
FAILED: CMakeFiles/yave.dir/yave/components/LocalLightBase.cpp.obj
C:\msys64\mingw64\bin\c++.exe  -IC:/msys64/home/Administrator/Yave/build -IC:/msys64/home/Administrator/Yave -IC:/msys64/home/Administrator/Yave/y -IC:/msys64/home/Administrator/Yave/external/sol/include -IC:/msys64/home/Administrator/Yave/external/LuaJIT/src -IC:/msys64/home/Administrator/Yave/external/spirv_cross -DTRACY_ENABLE -pedantic -Wall -Wextra -Wzero-as-null-pointer-constant -Wfloat-conversion -Woverloaded-virtual -Wnon-virtual-dtor -Wlogical-op -Wredundant-decls -Wundef -Wno-gnu-zero-variadic-macro-arguments -DY_DEBUG -MD -MT CMakeFiles/yave.dir/yave/components/LocalLightBase.cpp.obj -MF CMakeFiles\yave.dir\yave\components\LocalLightBase.cpp.obj.d -o CMakeFiles/yave.dir/yave/components/LocalLightBase.cpp.obj -c C:/msys64/home/Administrator/Yave/yave/components/LocalLightBase.cpp
In file included from C:/msys64/home/Administrator/Yave/yave/ecs/ComponentInspector.h:25,
                 from C:/msys64/home/Administrator/Yave/yave/components/LocalLightBase.cpp:25:
C:/msys64/home/Administrator/Yave/yave/ecs/ecs.h:135:13: error: 'hash' is not a class template
  135 | struct std::hash<yave::ecs::EntityId> : std::hash<y::u64> {
      |             ^~~~
C:/msys64/home/Administrator/Yave/yave/ecs/ecs.h:135:39: error: qualified name does not name a class before ':' token
  135 | struct std::hash<yave::ecs::EntityId> : std::hash<y::u64> {
      |                                       ^
C:/msys64/home/Administrator/Yave/yave/ecs/ecs.h:135:39: error: expected '{' before ':' token
In file included from C:/msys64/home/Administrator/Yave/yave/assets/AssetTraits.h:25,
                 from C:/msys64/home/Administrator/Yave/yave/assets/AssetId.h:26,
                 from C:/msys64/home/Administrator/Yave/yave/assets/AssetPtr.h:25,
                 from C:/msys64/home/Administrator/Yave/yave/ecs/ComponentInspector.h:27:
C:/msys64/home/Administrator/Yave/y/y/reflect/reflect.h:177:21: warning: extra ';' [-Wpedantic]
  177 | y_reflect_base(Type);                                                                                       \
      |                     ^
C:/msys64/home/Administrator/Yave/y/y/reflect/reflect.h:184:33: note: in expansion of macro 'y_reflect_static'
  184 | #define y_reflect(Type, ...)    y_reflect_static(Type, __VA_ARGS__)
      |                                 ^~~~~~~~~~~~~~~~
C:/msys64/home/Administrator/Yave/yave/assets/AssetPtr.h:176:9: note: in expansion of macro 'y_reflect'
  176 |         y_reflect(AssetPtr, _id)
      |         ^~~~~~~~~
cc1plus.exe: note: unrecognized command-line option '-Wno-gnu-zero-variadic-macro-arguments' may have been intended to silence earlier diagnostics
ninja: build stopped: subcommand failed.

@gan74
Copy link
Owner

gan74 commented Jul 29, 2023

This looks like an include problem. Can you try including <functional> in ecs.h?

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

1 participant