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

imgui not included in github release tarball #1332

Closed
Yamakuzure opened this issue Nov 14, 2019 · 9 comments · Fixed by #1632
Closed

imgui not included in github release tarball #1332

Yamakuzure opened this issue Nov 14, 2019 · 9 comments · Fixed by #1632
Labels
📁 Overlay Known Issues easy workaround exists or too intrusive to fix right away

Comments

@Yamakuzure
Copy link

System Information

  • Ogre Version: 1.12.3
  • Operating System / Platform: Gentoo Linux / x86_64
  • RenderSystem: none, yet, but planning with OpenGL3+

Detailled description

I am working on an ebuild for the latest ogre-1.12.3 release. When the configuration starts, it results in an error, that imgui.cpp can not be found.

Note: With 1.12.2 the ebuild worked perfectly fine, and all demos from the SampleBrowser worked well.

Configuration:

cmake \
    -C \
    /home/portage/dev-games/ogre-1.12.3/work/ogre-1.12.3_build/gentoo_common_config.cmake \
    -G \
    Ninja \
    -DCMAKE_INSTALL_PREFIX=/usr \
    -DCMAKE_SKIP_INSTALL_RPATH=yes \
    -DOGRE_BUILD_COMPONENT_BITES=yes \
    -DOGRE_BUILD_COMPONENT_CSHARP=no \
    -DOGRE_BUILD_COMPONENT_HLMS=yes \
    -DOGRE_BUILD_COMPONENT_JAVA=no \
    -DOGRE_BUILD_COMPONENT_PAGING=yes \
    -DOGRE_BUILD_COMPONENT_PROPERTY=yes \
    -DOGRE_BUILD_COMPONENT_PYTHON=no \
    -DOGRE_BUILD_COMPONENT_RTSHADERSYSTEM=yes \
    -DOGRE_BUILD_COMPONENT_TERRAIN=yes \
    -DOGRE_BUILD_COMPONENT_VOLUME=yes \
    -DOGRE_BUILD_DEPENDENCIES=no \
    -DOGRE_BUILD_PLUGIN_CG=yes \
    -DOGRE_BUILD_PLUGIN_FREEIMAGE=yes \
    -DOGRE_BUILD_PLUGIN_EXRCODEC=no \
    -DOGRE_BUILD_RENDERSYSTEM_GL=yes \
    -DOGRE_BUILD_RENDERSYSTEM_GL3PLUS=yes \
    -DOGRE_BUILD_RENDERSYSTEM_GLES2=no \
    -DOGRE_BUILD_SAMPLES=yes \
    -DOGRE_BUILD_TESTS=no \
    -DOGRE_BUILD_TOOLS=yes \
    -DOGRE_CONFIG_DOUBLE=yes \
    -DOGRE_CONFIG_ENABLE_GL_STATE_CACHE_SUPPORT=yes \
    -DOGRE_CONFIG_ENABLE_GLES2_CG_SUPPORT=no \
    -DOGRE_CONFIG_ENABLE_GLES3_SUPPORT=no \
    -DOGRE_CONFIG_THREADS=3 \
    -DOGRE_CONFIG_THREAD_PROVIDER=std \
    -DOGRE_ENABLE_PRECOMPILED_HEADERS=no \
    -DOGRE_GLSUPPORT_USE_EGL=no \
    -DOGRE_INSTALL_DOCS=yes \
    -DOGRE_INSTALL_SAMPLES=yes \
    -DOGRE_INSTALL_SAMPLES_SOURCE=yes \
    -DOGRE_PROFILING=no \
    -DOGRE_RESOURCEMANAGER_STRICT=2 \
    -DCMAKE_BUILD_TYPE=Gentoo \
    -DCMAKE_TOOLCHAIN_FILE=/home/portage/dev-games/ogre-1.12.3/work/ogre-1.12.3_build/gentoo_toolchain.cmake \
    /home/portage/dev-games/ogre-1.12.3/work/ogre-1.12.3

Relevant Output:

-- Configuring done
CMake Error at Components/Overlay/CMakeLists.txt:33 (add_library):
  Cannot find source file:

    /home/portage/dev-games/ogre-1.12.3/work/ogre-1.12.3/Components/Overlay/src/imgui/imgui.cpp

  Tried extensions .c .C .c++ .cc .cpp .cxx .cu .m .M .mm .h .hh .h++ .hm
  .hpp .hxx .in .txx


CMake Error at Components/Overlay/CMakeLists.txt:33 (add_library):
  No SOURCES given to target: OgreOverlay


CMake Generate step failed.  Build files cannot be regenerated correctly.

A look into the corresponding directory:

 $ l /home/portage/dev-games/ogre-1.12.3/work/ogre-1.12.3/Components/Overlay/src/imgui/
insgesamt 4,0K
-rw-r--r-- 1 sed sed 140 14. Nov 19:34 imconfig.h

Ogre.log

None, yet.

Hotfix

Currently I build with adding -DOGRE_BUILD_COMPONENT_OVERLAY_IMGUI=no, and that works as always, but I thought you's wish to know that the imgui inclusion is incomplete.

@Yamakuzure
Copy link
Author

Damn... I was a bit quick...

Compilation does not work this way out of the box. It fails at:

[520/575] ...
In file included from Samples/include/ImGuiDemo.h:4,
                 from /home/portage/dev-games/ogre-1.12.3/work/ogre-1.12.3/Samples/Common/src/DefaultSamplesPlugin.cpp:53:
/home/portage/dev-games/ogre-1.12.3/work/ogre-1.12.3/Components/Overlay/include/OgreImGuiOverlay.h:12:10: fatal error: imgui.h: No such file or directory
   12 | #include <imgui.h>
      |          ^~~~~~~~~
compilation terminated.

Seems like the include directory is missing when imgui is deactivated.

Hotfix:

I thought to just add the imgui include directory and the header to the includes list, but compilation still fails with

In file included from Samples/include/ImGuiDemo.h:4,
                 from /home/portage/dev-games/ogre-1.12.3/work/ogre-1.12.3/Samples/Common/src/DefaultSamplesPlugin.cpp:53:
/home/portage/dev-games/ogre-1.12.3/work/ogre-1.12.3/Components/Overlay/include/OgreImGuiOverlay.h:12:10: fatal error: imgui.h: No such file or directory
   12 | #include <imgui.h>
      |          ^~~~~~~~~
compilation terminated.

For now I am giving up and will deactivate the overlays until I can properly patch this, or it is fixed in master.

@Yamakuzure
Copy link
Author

Ok, found the issue. The imgui subfolder is a submodule; Which is not included when downloading a release.

@Yamakuzure
Copy link
Author

I now fetch using git and checkout the submodule and everything works.

However, could you please include imgui in the next release?

@jaysonpowers-zz
Copy link

Same thing happened to me, thanks for your solution

@paroj paroj changed the title ogre-1.12.3: cmake fails, can not find imgui.cpp imgui not included in github release tarball Dec 9, 2019
@paroj paroj added the Known Issues easy workaround exists or too intrusive to fix right away label Dec 9, 2019
@paroj
Copy link
Member

paroj commented Dec 9, 2019

blocked by https://github.saobby.my.eu.orgmunity/t5/How-to-use-Git-and-GitHub/Create-Release-that-contains-submodule/td-p/12073

workaround:

git clone --recursive --branch v1.12.3 https://github.com/OGRECave/ogre.git

@paroj paroj reopened this Dec 9, 2019
@paroj paroj pinned this issue Jan 27, 2020
at-wat added a commit to seqsense/aports-ros-experimental that referenced this issue Apr 14, 2020
@MrBenGriffin
Copy link

If you have already cloned ogre, you can do this:

cd (path to ogre)
git submodule update --init --recursive

@paroj paroj unpinned this issue Jul 26, 2020
RomainNaour added a commit to RomainNaour/buildroot that referenced this issue Dec 7, 2020
Remove upstream patch [1].

tinyxml has been replaced by pugixml [2].

Switch to git download method since github release without
the complete source code in the tarball [3].

Update indentation of hash file (two spaces).

The sdl2-config.cmake generated by sdl2 package is broken for
cross-compilation since it add /usr/include/SDL2 in CFLAGS.

Such flags are unsafe for cross-compilation since it mixes
headers for the host and target.

sdl2-config.cmake must be removed from staging since
we are using autotools build system to build sdl2 package
[4][5].

ogre 1.12.7 only include <sys/sysctl.h> for iOS in order to
build with glibc >= 2.32 [6].

[1] OGRECave/ogre@de4d5c9
[2] OGRECave/ogre@3381033
[3] OGRECave/ogre#1332 (comment)
[4] https://bugzilla.libsdl.org/show_bug.cgi?id=4597
[5] OGRECave/ogre#1568
[6] OGRECave/ogre@8ec086e

Signed-off-by: Romain Naour <romain.naour@gmail.com>
@aleksandaratanasov
Copy link

blocked by https://github.saobby.my.eu.orgmunity/t5/How-to-use-Git-and-GitHub/Create-Release-that-contains-submodule/td-p/12073

workaround:

git clone --recursive --branch v1.12.3 https://github.com/OGRECave/ogre.git

This does not work. I tried checking out v13.0.1 (latest tag) and I still get missing imgui_tables.cpp

@MrBenGriffin
Copy link

This does not work. I tried checking out v13.0.1 (latest tag) and I still get missing imgui_tables.cpp

Try

cd (path to ogre)
git submodule update --init --recursive

@paroj
Copy link
Member

paroj commented Sep 7, 2021

imgui is no longer a submodule. If you are upgrading from 1.12, delete your build folder. (or take a look at IMGUI_DIR in cmake)

buildroot-auto-update pushed a commit to buildroot/buildroot that referenced this issue Dec 22, 2021
Remove upstream patches [1][2].

tinyxml has been replaced by pugixml [3].

Switch to git download method since github release without
the complete source code in the tarball [4].

Update indentation of hash file (two spaces).

Previous ogre version unconditionally include <sys/sysctl.h>
header that has been removed from glibc since 2.32.
This has been fixed since Ogre 1.12.7 [5].

[1] OGRECave/ogre@de4d5c9
[2] OGRECave/ogre@3f182b7
[3] OGRECave/ogre@3381033
[4] OGRECave/ogre#1332 (comment)
[5] OGRECave/ogre@8ec086e

Signed-off-by: Romain Naour <romain.naour@gmail.com>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
📁 Overlay Known Issues easy workaround exists or too intrusive to fix right away
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants