anura-engine / anura

Anura Engine
Other
379 stars 77 forks source link

Compiling issue : src/kre/imgui_impl_sdl_gl3.cpp:13:10: fatal error: imgui.h: no such file #314

Open B4rabbas opened 3 years ago

B4rabbas commented 3 years ago

~/anura$ make -j$(nproc) OPTIMIZE : yes USE_CCACHE : yes CCACHE : ccache SANITIZE_ADDRESS : no SANITIZE_UNDEFINED : USE_DB_CLIENT : no USE_BOX2D : yes USE_LIBVPX : no USE_LUA : yes USE_SDL2 : yes CXX : g++ BASE_CXXFLAGS : -O2 -Wall -Werror -Wno-literal-suffix -Wno-sign-compare -I/usr/include/SDL2 -D_REENTRANT -DUSE_LUA -std=c++0x -g -fno-inline-functions -fthreadsafe-statics -Wno-narrowing -Wno-reorder -Wno-unused -Wno-unknown-pragmas -Wno-overloaded-virtual -DUSE_SVG -DUSE_IMGUI CXXFLAGS : LDFLAGS : -rdynamic INC : -isystem external/header-only-libs -D_REENTRANT -I/usr/include/SDL2 -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/uuid -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/uuid -I/usr/include/freetype2 -I/usr/include/libpng16 -Iimgui LIBS : -lX11 -lGL -D_REENTRANT -I/usr/include/SDL2 -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/uuid -I/usr/include/freetype2 -I/usr/include/libpng16 -lX11 -lGLEW -lGLU -lGL -lSDL2_image -lSDL2_ttf -lSDL2 -lpng16 -lz -lfreetype -lcairo -logg -lvorbis -lvorbisfile -lrt -lcairo Building: src/kre/imgui_impl_sdl_gl3.cpp Building: src/kre/Scissor.cpp Building: src/kre/SceneTree.cpp Building: src/kre/VGraphOGLFixed.cpp Building: src/kre/AttributeSetOGL.cpp src/kre/imgui_impl_sdl_gl3.cpp:13:10: fatal error: imgui.h: Aucun fichier ou dossier de ce type 13 | #include "imgui.h" | ^~~~~~~~~ compilation terminated. make: *** [Makefile:236 : build/kre/imgui_impl_sdl_gl3.o] Erreur 1 make: *** Attente des tâches non terminées.... spiegel@spiegel-laptop:~/anura$

DDR0 commented 3 years ago

Hmm, have you run git submodule init? (You'll also need the module you actually want to run as a separate step.) Feel free to stop by our Discord if it gives you any more trouble. 😕

On Tue., Mar. 2, 2021, 3:16 p.m. Barabbas, notifications@github.com wrote:

/anura$ make -j$(nproc) OPTIMIZE : yes USE_CCACHE : yes CCACHE : ccache SANITIZE_ADDRESS : no SANITIZE_UNDEFINED : USE_DB_CLIENT : no USE_BOX2D : yes USE_LIBVPX : no USE_LUA : yes USE_SDL2 : yes CXX : g++ BASE_CXXFLAGS : -O2 -Wall -Werror -Wno-literal-suffix -Wno-sign-compare -I/usr/include/SDL2 -D_REENTRANT -DUSE_LUA -std=c++0x -g -fno-inline-functions -fthreadsafe-statics -Wno-narrowing -Wno-reorder -Wno-unused -Wno-unknown-pragmas -Wno-overloaded-virtual -DUSE_SVG -DUSE_IMGUI CXXFLAGS : LDFLAGS : -rdynamic INC : -isystem external/header-only-libs -D_REENTRANT -I/usr/include/SDL2 -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/uuid -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/uuid -I/usr/include/freetype2 -I/usr/include/libpng16 -Iimgui LIBS : -lX11 -lGL -D_REENTRANT -I/usr/include/SDL2 -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/uuid -I/usr/include/freetype2 -I/usr/include/libpng16 -lX11 -lGLEW -lGLU -lGL -lSDL2_image -lSDL2_ttf -lSDL2 -lpng16 -lz -lfreetype -lcairo -logg -lvorbis -lvorbisfile -lrt -lcairo Building: src/kre/imgui_impl_sdl_gl3.cpp Building: src/kre/Scissor.cpp Building: src/kre/SceneTree.cpp Building: src/kre/VGraphOGLFixed.cpp Building: src/kre/AttributeSetOGL.cpp src/kre/imgui_impl_sdl_gl3.cpp:13:10: fatal error: imgui.h: Aucun fichier ou dossier de ce type 13 | #include "imgui.h" | ^~~~~ compilation terminated. make: [Makefile:236 : build/kre/imgui_impl_sdl_gl3.o] Erreur 1 make: Attente des tâches non terminées.... spiegel@spiegel-laptop:/anura$

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/anura-engine/anura/issues/314, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAGSTI76HN2DNASAT6B2KKLTBVWVBANCNFSM4YP5GVFQ .

B4rabbas commented 3 years ago

Maybe you could understand if I've missed something if I describe precisly what I've done

In details

First I've installed the requested lib sudo apt install -y build-essential ccache git libboost-dev libboost-filesystem-dev libboost-iostreams-dev libboost-regex-dev libboost-locale-dev libsdl2-image-dev libsdl2-mixer-dev libsdl2-ttf-dev libglew-dev libpng-dev libcairo2-dev libfreetype6-dev libvorbis-dev

Then download the code git clone https://github.com/anura-engine/anura.git

locate the folder cd anura

run the command you've suggested git submodule init

And finally make -j$(nproc)

Unfortunatly it don't fixe the building error spiegel@spiegel-laptop:~/anura$ make -j$(nproc) OPTIMIZE : yes USE_CCACHE : yes CCACHE : ccache SANITIZE_ADDRESS : no SANITIZE_UNDEFINED : USE_DB_CLIENT : no USE_BOX2D : yes USE_LIBVPX : no USE_LUA : yes USE_SDL2 : yes CXX : g++ BASE_CXXFLAGS : -O2 -Wall -Werror -Wno-literal-suffix -Wno-sign-compare -I/usr/include/SDL2 -D_REENTRANT -DUSE_LUA -std=c++0x -g -fno-inline-functions -fthreadsafe-statics -Wno-narrowing -Wno-reorder -Wno-unused -Wno-unknown-pragmas -Wno-overloaded-virtual -DUSE_SVG -DUSE_IMGUI CXXFLAGS : LDFLAGS : -rdynamic INC : -isystem external/header-only-libs -D_REENTRANT -I/usr/include/SDL2 -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/uuid -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/uuid -I/usr/include/freetype2 -I/usr/include/libpng16 -Iimgui LIBS : -lX11 -lGL -D_REENTRANT -I/usr/include/SDL2 -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/uuid -I/usr/include/freetype2 -I/usr/include/libpng16 -lX11 -lGLEW -lGLU -lGL -lSDL2_image -lSDL2_ttf -lSDL2 -lpng16 -lz -lfreetype -lcairo -logg -lvorbis -lvorbisfile -lrt -lcairo Building: src/kre/SceneTree.cpp Building: src/kre/imgui_impl_sdl_gl3.cpp Building: src/kre/Scissor.cpp Building: src/kre/VGraphOGLFixed.cpp Building: src/kre/AttributeSetOGL.cpp Building: src/kre/UniformBuffer.cpp Building: src/kre/ParticleSystemAffectors.cpp Building: src/kre/SceneNode.cpp src/kre/imgui_impl_sdl_gl3.cpp:13:10: fatal error: imgui.h: Aucun fichier ou dossier de ce type 13 | #include "imgui.h" | ^~~~~~~~~ compilation terminated. make: *** [Makefile:236 : build/kre/imgui_impl_sdl_gl3.o] Erreur 1 make: *** Attente des tâches non terminées....

B4rabbas commented 3 years ago

"Aucun fichier" mean "no such file"

DDR0 commented 3 years ago

Thank you for the good error log, that is a very useful reply.

I don't know why it's not working, as that looks like the correct steps. I'll see if I can reproduce here over the next day or two, and hopefully have a better answer for you soon.

On Wed., Mar. 3, 2021, 2:43 p.m. Barabbas, notifications@github.com wrote:

"Aucun fichier" mean "no such file"

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/anura-engine/anura/issues/314#issuecomment-790125249, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAGSTI5S7MMO5XAM5VE7PEDTB23Q3ANCNFSM4YP5GVFQ .

DDR0 commented 3 years ago

Hey, sorry for the delay here.

Try running git submodule update after git submodule init and let me know if that works. It seems init just sets things up, it doesn't actually get the files we need. 🤦

DDR0 commented 3 years ago

I'm going to close this bug as I have heard no further action on it for a while now. Please reopen it if the issue persists.

DDR0 commented 1 year ago

Some minor diagnosis and updates on this issue:

To verify the submodule has cloned correctly, you should see these files running ls in the imgui folder in the base Anura folder:

0 in ~/Projects/Anura/imgui git:(2379a8b3)  
$ ls
docs        imgui.d         imgui_draw.o      imgui_user.inl     imstb_rectpack.h  misc
examples    imgui_demo.cpp  imgui.h           imgui_widgets.cpp  imstb_textedit.h  spline.h
imconfig.h  imgui_draw.cpp  imgui_internal.h  imgui_widgets.d    imstb_truetype.h
imgui.cpp   imgui_draw.d    imgui.o           imgui_widgets.o    LICENSE.txt

There's ongoing work fixing this entirely in the unvendor-imgui branch.

DDR0 commented 1 year ago

This issue has been hard-reproduced by Knightron#0666 in the #tech-support channel. It appears that, on some setups, Git submodules just don't work? image