nem0 / LumixEngine

3D C++ Game Engine - yet another open source game engine
MIT License
3.52k stars 397 forks source link

Errors building according to instructions on Linux. #1179

Closed zelon88 closed 7 years ago

zelon88 commented 7 years ago

Hello!

I followed the instructions at https://github.com/nem0/LumixEngine/wiki/Getting-started to build Lumix Engine on Linux. I am able to use the genie_linux_gcc.sh script to create the makefiles, but when I cd into the tmp/gcc5 folder and run make I get output full of errors.

There's too much output to list, but I'll give the first few lines so you can see what I'm dealing with...

../../../src/engine/metaprogramming.h:113:16: note:   initializing argument 1 of ‘constexpr void Lumix::apply(F&, Tuple&) [with F = Lumix::Properties::Component<Props>::visit(Lumix::Properties::IComponentVisitor&) const [with Props = {Lumix::Properties::CommonProperty<Lumix::Vec3, Lumix::Vec3 (Lumix::RenderScene::*)(Lumix::ComponentHandle), void (Lumix::RenderScene::*)(Lumix::ComponentHandle, const Lumix::Vec3&)>}]::<lambda(auto:6&)>; Tuple = const Lumix::Tuple<Lumix::Properties::CommonProperty<Lumix::Vec3, Lumix::Vec3 (Lumix::RenderScene::*)(Lumix::ComponentHandle), void (Lumix::RenderScene::*)(Lumix::ComponentHandle, const Lumix::Vec3&)> >]’
 constexpr void apply(F& f, Tuple& t)
                ^
In file included from ../../../src/renderer/renderer.cpp:12:0:
../../../src/engine/properties.h: In instantiation of ‘void Lumix::Properties::Component<Props>::visit(Lumix::Properties::IComponentVisitor&) const [with Props = {}]’:
../../../src/renderer/renderer.cpp:724:1:   required from here
../../../src/engine/properties.h:698:8: error: invalid initialization of non-const reference of type ‘Lumix::Properties::Component<Props>::visit(Lumix::Properties::IComponentVisitor&) const [with Props = {}]::<lambda(auto:6&)>&’ from an rvalue of type ‘Lumix::Properties::Component<Props>::visit(Lumix::Properties::IComponentVisitor&) const [with Props = {}]::<lambda(auto:6&)>’
   apply([&](auto& x) { visitor.visit(x); }, properties);
        ^
In file included from ../../../src/engine/properties.h:8:0,
                 from ../../../src/renderer/renderer.cpp:12:
../../../src/engine/metaprogramming.h:113:16: note:   initializing argument 1 of ‘constexpr void Lumix::apply(F&, Tuple&) [with F = Lumix::Properties::Component<Props>::visit(Lumix::Properties::IComponentVisitor&) const [with Props = {}]::<lambda(auto:6&)>; Tuple = const Lumix::Tuple<>]’
 constexpr void apply(F& f, Tuple& t)
                ^
In file included from ../../../src/renderer/renderer.cpp:12:0:
../../../src/engine/properties.h: In instantiation of ‘void Lumix::Properties::Component<Props>::visit(Lumix::Properties::IComponentVisitor&) const [with Props = {Lumix::Properties::SampledFuncProperty<const Lumix::Vec2* (Lumix::RenderScene::*)(Lumix::ComponentHandle), void (Lumix::RenderScene::*)(Lumix::ComponentHandle, const Lumix::Vec2*, int), int (Lumix::RenderScene::*)(Lumix::ComponentHandle)>}]’:
../../../src/renderer/renderer.cpp:724:1:   required from here
../../../src/engine/properties.h:698:8: error: invalid initialization of non-const reference of type ‘Lumix::Properties::Component<Props>::visit(Lumix::Properties::IComponentVisitor&) const [with Props = {Lumix::Properties::SampledFuncProperty<const Lumix::Vec2* (Lumix::RenderScene::*)(Lumix::ComponentHandle), void (Lumix::RenderScene::*)(Lumix::ComponentHandle, const Lumix::Vec2*, int), int (Lumix::RenderScene::*)(Lumix::ComponentHandle)>}]::<lambda(auto:6&)>&’ from an rvalue of type ‘Lumix::Properties::Component<Props>::visit(Lumix::Properties::IComponentVisitor&) const [with Props = {Lumix::Properties::SampledFuncProperty<const Lumix::Vec2* (Lumix::RenderScene::*)(Lumix::ComponentHandle), void (Lumix::RenderScene::*)(Lumix::ComponentHandle, const Lumix::Vec2*, int), int (Lumix::RenderScene::*)(Lumix::ComponentHandle)>}]::<lambda(auto:6&)>’
   apply([&](auto& x) { visitor.visit(x); }, properties);

Any ideas?

dud3 commented 7 years ago

He didn't fix the build on linux yet I think. https://travis-ci.org/nem0/LumixEngine

dud3 commented 7 years ago

Build it on windows, that should do it for now.

zelon88 commented 7 years ago

Thank you! I appreciate the honest answer and the proposed solution. My Windowz machines aren't as powerful as my Linux ones, so I'll have to see how game dev goes on them for now.

I have been following the project for a while, and I remember when I first started watching it I tried to build it with similar results.

Do you think you could put in a good word towards getting the issues fixed? I'd be willing to help but my experience with C++ is very minimal (I'm a backend web guy, but I've followed some cpp tutorials). Maybe this is a scripting issue? If you have any input on what's causing the problems I could perhaps work on the problems myself. I am really excited to get started working on some game projects with Lumix but I've never been able to get it running.

Thanks again, zelon88

nem0 commented 7 years ago

Hi @zelon88 , That's an issue caused by recent big refactor and I have not managed to fixed linux build yet. I will fix it hopefully soon.

zelon88 commented 7 years ago

Thank you!

I can't wait! Lumix Engine FTW!!!

nem0 commented 7 years ago

It builds now, but #655