Cemu icon indicating copy to clipboard operation
Cemu copied to clipboard

Current State Of Linux Builds

Open Crementif opened this issue 1 year ago • 170 comments

Linux builds of Cemu are not recommended yet for beginners, since currently it lacks a few things:

  • There's only prebuilt binaries for ubuntu 20.04, which means that for other distros (or versions) you'll have to compile it yourself.
    • In the future the plan is to also distribute appimages and/or flatpak releases using the CI.
  • Cemu currently requires all files to be placed in a case-insensitive filesystem
  • Cemu utilizes GTK3 using wxWidgets and xlib for it's Linux port currently. Wayland support should work but other environments aren't tested.

You can use this issue to share your experiences, issues or build tips!

Crementif avatar Aug 23 '22 00:08 Crementif

One thing I notice, being on Gentoo running OpenRC, is that the binary, and compilation seem to hard require systemd. Not sure if there's a CMAKE flag included to disable systemd support or not. To be clear, not saying you need to support openrc at all, but maybe a compile flag to disable the systemd stuff would be nice. (I'm not very experienced with CMAKE so maybe there is a way I'm just not aware of).

ethannij avatar Aug 24 '22 04:08 ethannij

It is unusual that the project requires the entire Vulkan SDK, as opposed to just the headers. Any comment on this?

liamwhite avatar Aug 24 '22 04:08 liamwhite

For Flatpak, would you mind if I tried to make a package? I can't guarantee anything, but I could see if I can get something working later today

lunaneff avatar Aug 24 '22 05:08 lunaneff

Also-- Is there a reason vcpkg is used on linux? vcpkg is, no matter what microsoft says, designed for windows, and it doesn't make a ton of sense to have to compile all of the dependencies when they are already available in the various package managers.

Zopolis4 avatar Aug 24 '22 06:08 Zopolis4

For Flatpak, would you mind if I tried to make a package? I can't guarantee anything, but I could see if I can get something working later today

Sure, although we'd like to have an official flatpak package. I'm not sure if/how other emulators do that with their continuous builds, but maybe worrying about that is a later step and you should see if it requires some source code changes first.

Crementif avatar Aug 24 '22 06:08 Crementif

It is unusual that the project requires the entire Vulkan SDK, as opposed to just the headers. Any comment on this?

I ran into compilation issues on Windows when trying to compile with headers only after we switched from VS solution to cmake. I forgot where exactly the dependency comes from but it was meant as a quick and dirty fix to just add the whole thing. In general there are a lot of dependencies that could probably be optimized out.

Also-- Is there a reason vcpkg is used on linux? vcpkg is, no matter what microsoft says, designed for windows, and it doesn't make a ton of sense to have to compile all of the dependencies when they are already available in the various package managers.

I like it because it generally seems to be the most hassle free across platforms. But yes, ideally we would conditionally use system libraries if present. Will look into this

Exzap avatar Aug 24 '22 06:08 Exzap

I sadly couldn't get this to compile on Arch so I'm sharing my steps in case somebody else wants to give it a whirl:

  1. Install dependencies
sudo pacman -S --needed gtk3 libsecret libgcrypt systemd-libs freeglut nasm
  1. I had clang-14.0.6-2 installed on my system so I decided to downgrade everything to v12 just in case
yay -S downgrade
sudo downgrade clang llvm llvm-libs
  1. Install VulkanSDK
cd ~
mkdir vulkan
cd vulkan
curl https://sdk.lunarg.com/sdk/download/1.3.224.0/linux/vulkansdk-linux-x86_64-1.3.224.0.tar.gz | tar xz
cd 1.3.224.0
source setup-env.sh
  1. Get Cemu
cd ~
git clone --recursive https://github.com/cemu-project/Cemu
cd Cemu
mkdir build
cd build
cmake .. -DCMAKE_BUILD_TYPE=release -DCMAKE_C_COMPILER=/usr/bin/clang-12 -DCMAKE_CXX_COMPILER=/usr/bin/clang++-12 -G Ninja -DCMAKE_MAKE_PROGRAM=/usr/bin/ninja
  1. Compile
ninja
  1. First issue
FAILED: dependencies/cubeb/CMakeFiles/cubeb.dir/src/cubeb_resampler.cpp.o
/usr/bin/clang++ -DENABLE_DISCORD_RPC -DHAS_CUBEB=1 -DVK_NO_PROTOTYPES -DVK_USE_PLATFORM_XCB_KHR -DVK_USE_PLATFORM_XLIB_KHR -D_UNICODE -D__WXGTK3__ -D__WXGTK__ -I/home/user/Cemu/build/src/Cafe -I/home/user/Cemu/src/Cafe -I/home/user/vulkan/1.3.224.0/x86_64/include -I/home/user/Cemu/src/Cafe/. -I/home/user/Cemu/src/Cafe/.. -I/home/user/Cemu/dependencies/cubeb/include -I/home/user/Cemu/build/exports -I/home/user/Cemu/dependencies/ZArchive/include -isystem /home/user/Cemu/build/vcpkg_installed/x64-linux/include -isystem /home/user/Cemu/build/vcpkg_installed/x64-linux/include/SDL2 -isystem /home/user/Cemu/build/vcpkg_installed/x64-linux/lib/wx/include/gtk3-unicode-static-3.2 -isystem /home/user/Cemu/build/vcpkg_installed/x64-linux/include/wx-3.2 -O3 -DNDEBUG   -fms-extensions -fms-compatibility-version=19.14 -fdelayed-template-parsing -maes -Wno-switch -Wno-ignored-attributes -Wno-deprecated-enum-enum-conversion -Wno-ambiguous-reversed-operator -std=gnu++20 -Winvalid-pch -Xclang -include-pch -Xclang /home/user/Cemu/build/src/Cafe/CMakeFiles/CemuCafe.dir/cmake_pch.hxx.pch -Xclang -include -Xclang /home/user/Cemu/build/src/Cafe/CMakeFiles/CemuCafe.dir/cmake_pch.hxx -MD -MT src/Cafe/CMakeFiles/CemuCafe.dir/Account/Account.cpp.o -MF src/Cafe/CMakeFiles/CemuCafe.dir/Account/Account.cpp.o.d -o src/Cafe/CMakeFiles/CemuCafe.dir/Account/Account.cpp.o -c /home/user/Cemu/src/Cafe/Account/Account.cpp
In file included from <built-in>:451:
In file included from /home/user/Cemu/build/src/Cafe/CMakeFiles/CemuCafe.dir/cmake_pch.hxx:5:
In file included from /home/user/Cemu/src/Cafe/../Common/precompiled.h:10:
In file included from /home/user/Cemu/build/vcpkg_installed/x64-linux/include/fmt/core.h:13:
In file included from /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/12.2.0/../../../../include/c++/12.2.0/functional:64:
In file included from /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/12.2.0/../../../../include/c++/12.2.0/bits/stl_algo.h:65:
/usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/12.2.0/../../../../include/c++/12.2.0/bits/uniform_int_dist.h:250:31: error: expected unqualified-id
          static_assert(!_Up_traits::__is_signed, "U must be unsigned");
                                     ^
/usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/12.2.0/../../../../include/c++/12.2.0/bits/uniform_int_dist.h:251:31: error: expected unqualified-id
          static_assert(!_Wp_traits::__is_signed, "W must be unsigned");
                                     ^
2 errors generated.

Temporary solution: Turn lines 250 and 251 into comments in /usr/include/c++/12.2.0/bits/uniform_int_dist.h

  1. Second issue
FAILED: src/Cafe/CMakeFiles/CemuCafe.dir/HW/Latte/Renderer/Vulkan/RendererShaderVk.cpp.o 
/usr/bin/clang++ -DENABLE_DISCORD_RPC -DHAS_CUBEB=1 -DVK_NO_PROTOTYPES -DVK_USE_PLATFORM_XCB_KHR -DVK_USE_PLATFORM_XLIB_KHR -D_UNICODE -D__WXGTK3__ -D__WXGTK__ -I/home/user/Cemu/build/src/Cafe -I/home/user/Cemu/src/Cafe -I/home/user/vulkan/1.3.224.0/x86_64/include -I/home/user/Cemu/src/Cafe/. -I/home/user/Cemu/src/Cafe/.. -I/home/user/Cemu/dependencies/cubeb/include -I/home/user/Cemu/build/exports -I/home/user/Cemu/dependencies/ZArchive/include -isystem /home/user/Cemu/build/vcpkg_installed/x64-linux/include -isystem /home/user/Cemu/build/vcpkg_installed/x64-linux/include/SDL2 -isystem /home/user/Cemu/build/vcpkg_installed/x64-linux/lib/wx/include/gtk3-unicode-static-3.2 -isystem /home/user/Cemu/build/vcpkg_installed/x64-linux/include/wx-3.2 -O3 -DNDEBUG   -fms-extensions -fms-compatibility-version=19.14 -fdelayed-template-parsing -maes -Wno-switch -Wno-ignored-attributes -Wno-deprecated-enum-enum-conversion -Wno-ambiguous-reversed-operator -std=gnu++20 -Winvalid-pch -Xclang -include-pch -Xclang /home/user/Cemu/build/src/Cafe/CMakeFiles/CemuCafe.dir/cmake_pch.hxx.pch -Xclang -include -Xclang /home/user/Cemu/build/src/Cafe/CMakeFiles/CemuCafe.dir/cmake_pch.hxx -MD -MT src/Cafe/CMakeFiles/CemuCafe.dir/HW/Latte/Renderer/Vulkan/RendererShaderVk.cpp.o -MF src/Cafe/CMakeFiles/CemuCafe.dir/HW/Latte/Renderer/Vulkan/RendererShaderVk.cpp.o.d -o src/Cafe/CMakeFiles/CemuCafe.dir/HW/Latte/Renderer/Vulkan/RendererShaderVk.cpp.o -c /home/user/Cemu/src/Cafe/HW/Latte/Renderer/Vulkan/RendererShaderVk.cpp
/home/user/Cemu/src/Cafe/HW/Latte/Renderer/Vulkan/RendererShaderVk.cpp:13:10: fatal error: 'SPIRV/Logger.h' file not found
#include <SPIRV/Logger.h>
         ^~~~~~~~~~~~~~~~
1 error generated.

Workaround: Change line 10 into #if true in ~/Cemu/src/Cafe/HW/Latte/Renderer/Vulkan/RendererShaderVk.cpp

  1. Third issue
FAILED: src/Cafe/CMakeFiles/CemuCafe.dir/HW/Latte/Renderer/Vulkan/RendererShaderVk.cpp.o 
/usr/bin/clang++ -DENABLE_DISCORD_RPC -DHAS_CUBEB=1 -DVK_NO_PROTOTYPES -DVK_USE_PLATFORM_XCB_KHR -DVK_USE_PLATFORM_XLIB_KHR -D_UNICODE -D__WXGTK3__ -D__WXGTK__ -I/home/user/Cemu/build/src/Cafe -I/home/user/Cemu/src/Cafe -I/home/user/vulkan/1.3.224.0/x86_64/include -I/home/user/Cemu/src/Cafe/. -I/home/user/Cemu/src/Cafe/.. -I/home/user/Cemu/dependencies/cubeb/include -I/home/user/Cemu/build/exports -I/home/user/Cemu/dependencies/ZArchive/include -isystem /home/user/Cemu/build/vcpkg_installed/x64-linux/include -isystem /home/user/Cemu/build/vcpkg_installed/x64-linux/include/SDL2 -isystem /home/user/Cemu/build/vcpkg_installed/x64-linux/lib/wx/include/gtk3-unicode-static-3.2 -isystem /home/user/Cemu/build/vcpkg_installed/x64-linux/include/wx-3.2 -O3 -DNDEBUG   -fms-extensions -fms-compatibility-version=19.14 -fdelayed-template-parsing -maes -Wno-switch -Wno-ignored-attributes -Wno-deprecated-enum-enum-conversion -Wno-ambiguous-reversed-operator -std=gnu++20 -Winvalid-pch -Xclang -include-pch -Xclang /home/user/Cemu/build/src/Cafe/CMakeFiles/CemuCafe.dir/cmake_pch.hxx.pch -Xclang -include -Xclang /home/user/Cemu/build/src/Cafe/CMakeFiles/CemuCafe.dir/cmake_pch.hxx -MD -MT src/Cafe/CMakeFiles/CemuCafe.dir/HW/Latte/Renderer/Vulkan/RendererShaderVk.cpp.o -MF src/Cafe/CMakeFiles/CemuCafe.dir/HW/Latte/Renderer/Vulkan/RendererShaderVk.cpp.o.d -o src/Cafe/CMakeFiles/CemuCafe.dir/HW/Latte/Renderer/Vulkan/RendererShaderVk.cpp.o -c /home/user/Cemu/src/Cafe/HW/Latte/Renderer/Vulkan/RendererShaderVk.cpp
In file included from /home/user/Cemu/src/Cafe/HW/Latte/Renderer/Vulkan/RendererShaderVk.cpp:19:
In file included from /home/user/Cemu/src/Cafe/../Cafe/HW/Latte/Renderer/Vulkan/VulkanRenderer.h:5:
In file included from /home/user/Cemu/src/Cafe/../Cafe/HW/Latte/Renderer/Vulkan/LatteTextureVk.h:7:
/home/user/Cemu/src/Cafe/HW/Latte/Renderer/Vulkan/RendererShaderVk.cpp:134:18: error: excess elements in scalar initializer
        /* .limits = */ {
                        ^
1 error generated.

Workaround: Remove the curly brackets in line 134 and 144 in ~/Cemu/src/Cafe/HW/Latte/Renderer/Vulkan/RendererShaderVk.cpp

  1. Final boss
FAILED: /home/user/Cemu/bin/Cemu 
/usr/bin/clang++ -O3 -DNDEBUG  src/CMakeFiles/CemuBin.dir/main.cpp.o src/CMakeFiles/CemuBin.dir/mainLLE.cpp.o -o /home/user/Cemu/bin/Cemu  vcpkg_installed/x64-linux/lib/libboost_program_options.a  vcpkg_installed/x64-linux/lib/libboost_filesystem.a  vcpkg_installed/x64-linux/lib/libboost_nowide.a  /usr/lib/libSM.so  /usr/lib/libICE.so  /usr/lib/libX11.so  /usr/lib/libXext.so  vcpkg_installed/x64-linux/lib/libSDL2.a  vcpkg_installed/x64-linux/lib/libSDL2main.a  vcpkg_installed/x64-linux/lib/libSDL2.a  vcpkg_installed/x64-linux/lib/libwx_gtk3u_core-3.2.a  vcpkg_installed/x64-linux/lib/libwx_baseu-3.2.a  dependencies/cubeb/libcubeb.a  src/Common/libCemuCommon.a  src/Cemu/libCemuComponents.a  src/Cafe/libCemuCafe.a  src/config/libCemuConfig.a  src/gui/libCemuGui.a  src/audio/libCemuAudio.a  src/input/libCemuInput.a  src/util/libCemuUtil.a  src/asm/libCemuAsm.a  vcpkg_installed/x64-linux/lib/libssl.a  vcpkg_installed/x64-linux/lib/libz.a  vcpkg_installed/x64-linux/lib/libwx_baseu-3.2.a  vcpkg_installed/x64-linux/lib/libwx_gtk3u_core-3.2.a  vcpkg_installed/x64-linux/lib/libwx_gtk3u_adv-3.2.a  vcpkg_installed/x64-linux/lib/libwx_gtk3u_aui-3.2.a  vcpkg_installed/x64-linux/lib/libwx_gtk3u_html-3.2.a  vcpkg_installed/x64-linux/lib/libwx_gtk3u_propgrid-3.2.a  vcpkg_installed/x64-linux/lib/libwx_gtk3u_ribbon-3.2.a  vcpkg_installed/x64-linux/lib/libwx_gtk3u_stc-3.2.a  vcpkg_installed/x64-linux/lib/libwx_gtk3u_xrc-3.2.a  vcpkg_installed/x64-linux/lib/libwx_gtk3u_gl-3.2.a  vcpkg_installed/x64-linux/lib/libwx_gtk3u_qa-3.2.a  vcpkg_installed/x64-linux/lib/libwx_baseu_xml-3.2.a  vcpkg_installed/x64-linux/lib/libcurl.a  vcpkg_installed/x64-linux/lib/libimgui.a  vcpkg_installed/x64-linux/lib/libpugixml.a  src/Common/libCemuCommon.a  src/audio/libCemuAudio.a  src/input/libCemuInput.a  src/Cemu/libCemuComponents.a  src/Cafe/libCemuCafe.a  src/config/libCemuConfig.a  src/gui/libCemuGui.a  src/imgui/libimguiImpl.a  src/Common/libCemuCommon.a  src/input/libCemuInput.a  src/Cemu/libCemuComponents.a  src/Cafe/libCemuCafe.a  src/resource/libCemuResource.a  src/gui/libCemuGui.a  src/asm/libCemuAsm.a  src/Cemu/libCemuComponents.a  dependencies/discord-rpc/src/libdiscord-rpc.a  -lpthread  src/Cafe/libCemuCafe.a  vcpkg_installed/x64-linux/lib/libglslang.a  vcpkg_installed/x64-linux/lib/libSPIRV.a  vcpkg_installed/x64-linux/lib/libMachineIndependent.a  vcpkg_installed/x64-linux/lib/libOGLCompiler.a  vcpkg_installed/x64-linux/lib/libOSDependent.a  vcpkg_installed/x64-linux/lib/libGenericCodeGen.a  dependencies/ih264d/libih264d.a  vcpkg_installed/x64-linux/lib/libwx_gtk3u_adv-3.2.a  vcpkg_installed/x64-linux/lib/libwx_gtk3u_aui-3.2.a  vcpkg_installed/x64-linux/lib/libwx_gtk3u_propgrid-3.2.a  vcpkg_installed/x64-linux/lib/libwx_gtk3u_ribbon-3.2.a  vcpkg_installed/x64-linux/lib/libwx_gtk3u_stc-3.2.a  vcpkg_installed/x64-linux/lib/libwxscintilla-3.2.a  vcpkg_installed/x64-linux/lib/libwx_gtk3u_xrc-3.2.a  vcpkg_installed/x64-linux/lib/libwx_gtk3u_html-3.2.a  /usr/lib/libmspack.so  vcpkg_installed/x64-linux/lib/libwx_gtk3u_gl-3.2.a  /usr/lib/libGLU.so  /usr/lib/libGLX.so  /usr/lib/libEGL.so  /usr/lib/libOpenGL.so  -lffi  vcpkg_installed/x64-linux/lib/libwx_gtk3u_qa-3.2.a  vcpkg_installed/x64-linux/lib/libwx_baseu_xml-3.2.a  src/resource/libCemuResource.a  dependencies/ZArchive/libzarchive.a  vcpkg_installed/x64-linux/lib/libzstd.a  vcpkg_installed/x64-linux/lib/libzip.a  vcpkg_installed/x64-linux/lib/libssl.a  vcpkg_installed/x64-linux/lib/libz.a  vcpkg_installed/x64-linux/lib/libcrypto.a  vcpkg_installed/x64-linux/lib/libpugixml.a  dependencies/cubeb/libcubeb.a  vcpkg_installed/x64-linux/lib/libboost_program_options.a  vcpkg_installed/x64-linux/lib/libboost_filesystem.a  vcpkg_installed/x64-linux/lib/libboost_nowide.a  vcpkg_installed/x64-linux/lib/libSDL2.a  -lwayland-egl  -lwayland-client  -lwayland-cursor  -lEGL  -lxkbcommon  /usr/lib/libXss.so  /usr/lib/libXxf86vm.so  -ldbus-1  -lunwind  -lunwind-generic  -lrt  -Wl,--no-undefined  -pthread  vcpkg_installed/x64-linux/lib/libSDL2main.a  vcpkg_installed/x64-linux/lib/libwx_gtk3u_core-3.2.a  -lm  /usr/lib/libgtk-3.so  /usr/lib/libgdk-3.so  /usr/lib/libz.so  -lm  /usr/lib/libpcre.so  /usr/lib/libffi.so  /usr/lib/libbz2.so  /usr/lib/libbrotlicommon.so  /usr/lib/libgraphite2.so  /usr/lib/libglib-2.0.so  /usr/lib/libgio-2.0.so  /usr/lib/libgobject-2.0.so  /usr/lib/libgmodule-2.0.so  /usr/lib/libblkid.so  /usr/lib/libfribidi.so  /usr/lib/libdatrie.so  /usr/lib/libfreetype.so  /usr/lib/libbrotlidec.so  /usr/lib/libXrender.so  /usr/lib/libpthread.a  /usr/lib/libxcb.so  /usr/lib/libXau.so  /usr/lib/libdl.a  /usr/lib/liblzo2.so  /usr/lib/libpangocairo-1.0.so  /usr/lib/libpango-1.0.so  /usr/lib/libcairo.so  /usr/lib/libharfbuzz-gobject.so  /usr/lib/libfontconfig.so  vcpkg_installed/x64-linux/lib/libpng16.a  /usr/lib/libcairo-gobject.so  /usr/lib/libXcomposite.so  /usr/lib/libXdamage.so  /usr/lib/libwayland-client.so  /usr/lib/librt.a  /usr/lib/libepoxy.so  /usr/lib/libcloudproviders.so  /usr/lib/libatk-1.0.so  /usr/lib/libgdk_pixbuf-2.0.so  vcpkg_installed/x64-linux/lib/libtiff.a  vcpkg_installed/x64-linux/lib/libjpeg.a  vcpkg_installed/x64-linux/lib/liblzma.a  /usr/lib/libatk-bridge-2.0.so  /usr/lib/libsystemd.so  /usr/lib/libatspi.so  /usr/lib/libdbus-1.so  /usr/lib/libXtst.so  /usr/lib/libxkbcommon.so  /usr/lib/libwayland-cursor.so  /usr/lib/libwayland-egl.so  /usr/lib/libGL.so  /usr/lib/libEGL.so  /usr/lib/libpangoft2-1.0.so  /usr/lib/libthai.so  /usr/lib/libXft.so  /usr/lib/libxcb-render.so  /usr/lib/libxcb-shm.so  /usr/lib/libXdmcp.so  /usr/lib/libpixman-1.so  /usr/lib/libharfbuzz.so  /usr/lib/libmount.so  /usr/lib/libsysprof-capture-4.a  /usr/lib/libz.so  -lm  /usr/lib/libpcre.so  /usr/lib/libffi.so  /usr/lib/libbz2.so  /usr/lib/libbrotlicommon.so  /usr/lib/libgraphite2.so  /usr/lib/libglib-2.0.so  /usr/lib/libgio-2.0.so  /usr/lib/libgobject-2.0.so  /usr/lib/libgmodule-2.0.so  /usr/lib/libblkid.so  /usr/lib/libfribidi.so  /usr/lib/libdatrie.so  /usr/lib/libfreetype.so  /usr/lib/libbrotlidec.so  /usr/lib/libXrender.so  /usr/lib/libpthread.a  /usr/lib/libxcb.so  /usr/lib/libXau.so  /usr/lib/libdl.a  /usr/lib/liblzo2.so  /usr/lib/libpangocairo-1.0.so  /usr/lib/libpango-1.0.so  /usr/lib/libcairo.so  /usr/lib/libharfbuzz-gobject.so  /usr/lib/libfontconfig.so  vcpkg_installed/x64-linux/lib/libpng16.a  /usr/lib/libcairo-gobject.so  /usr/lib/libXcomposite.so  /usr/lib/libXdamage.so  /usr/lib/libwayland-client.so  /usr/lib/librt.a  /usr/lib/libepoxy.so  /usr/lib/libcloudproviders.so  /usr/lib/libatk-1.0.so  /usr/lib/libgdk_pixbuf-2.0.so  vcpkg_installed/x64-linux/lib/libtiff.a  vcpkg_installed/x64-linux/lib/libjpeg.a  vcpkg_installed/x64-linux/lib/liblzma.a  /usr/lib/libatk-bridge-2.0.so  /usr/lib/libsystemd.so  /usr/lib/libatspi.so  /usr/lib/libdbus-1.so  /usr/lib/libXtst.so  /usr/lib/libxkbcommon.so  /usr/lib/libwayland-cursor.so  /usr/lib/libwayland-egl.so  /usr/lib/libGL.so  /usr/lib/libEGL.so  /usr/lib/libpangoft2-1.0.so  /usr/lib/libthai.so  /usr/lib/libXft.so  /usr/lib/libxcb-render.so  /usr/lib/libxcb-shm.so  /usr/lib/libXdmcp.so  /usr/lib/libpixman-1.so  /usr/lib/libharfbuzz.so  /usr/lib/libmount.so  /usr/lib/libsysprof-capture-4.a  /usr/lib/libXcursor.so  /usr/lib/libXrandr.so  /usr/lib/libXinerama.so  /usr/lib/libXi.so  /usr/lib/libXfixes.so  vcpkg_installed/x64-linux/lib/libexpat.a  /usr/lib/libSM.so  /usr/lib/libICE.so  /usr/lib/libX11.so  /usr/lib/libXext.so  /usr/lib/libgspell-1.so  vcpkg_installed/x64-linux/lib/libwx_baseu-3.2.a  vcpkg_installed/x64-linux/lib/libz.a  -lc  -ldl  /usr/lib/libspeexdsp.so
/usr/bin/ld: src/CMakeFiles/CemuBin.dir/main.cpp.o: in function `std::__cxx11::basic_string<char8_t, std::char_traits<char8_t>, std::allocator<char8_t> > fmt::v7::detail::vformat<char8_t, 0>(fmt::v7::basic_string_view<char8_t>, fmt::v7::basic_format_args<fmt::v7::basic_format_context<fmt::v7::detail::buffer_appender<fmt::v7::type_identity<char8_t>::type>, fmt::v7::type_identity<char8_t>::type> >)':
main.cpp:(.text._ZN3fmt2v76detail7vformatIDuLi0EEENSt7__cxx1112basic_stringIT_St11char_traitsIS5_ESaIS5_EEENS0_17basic_string_viewIS5_EENS0_17basic_format_argsINS0_20basic_format_contextINS1_15buffer_appenderINS0_13type_identityIS5_E4typeEEESH_EEEE[_ZN3fmt2v76detail7vformatIDuLi0EEENSt7__cxx1112basic_stringIT_St11char_traitsIS5_ESaIS5_EEENS0_17basic_string_viewIS5_EENS0_17basic_format_argsINS0_20basic_format_contextINS1_15buffer_appenderINS0_13type_identityIS5_E4typeEEESH_EEEE]+0x6e): undefined reference to `void std::__cxx11::basic_string<char8_t, std::char_traits<char8_t>, std::allocator<char8_t> >::_M_construct<char8_t const*>(char8_t const*, char8_t const*, std::forward_iterator_tag)'
clang-12: error: linker command failed with exit code 1 (use -v to see invocation)

Anuskuss avatar Aug 24 '22 07:08 Anuskuss

Sure, although we'd like to have an official flatpak package.

Even if I haven't been involved in Cemu before, if you approve of it, wouldn't that make it official? Also, when it's ready for publishing I could ask to have you added as collaborators on the repo, so you could make changes as well

I'm not sure if/how other emulators do that with their continuous builds

Flatpaks are almost always compiled from source on Flathub's servers if the code is available. The only exception I can think of is osu, where it's because a small bit of code that's required for online functionality is proprietary to avoid cheaters.

you should see if it requires some source code changes first.

A .desktop file (for app menus) and a metadata file (for app stores) will be required. These can also be added in the flatpak instead of upstream, but upstreaming is preferred since these aren't Flatpak-specific and are also useful for other distribution methods. You can find info about these at these links:

  • https://standards.freedesktop.org/desktop-entry-spec/desktop-entry-spec-latest.html
  • https://www.freedesktop.org/software/appstream/docs/index.html
  • https://github.com/flathub/flathub/wiki/AppData-Guidelines

lunaneff avatar Aug 24 '22 07:08 lunaneff

fatal error: 'SPIRV/Logger.h' file not found

@Anuskuss looks like you're missing these headers. On Ubuntu, you can get them from this package: glslang-dev. I am unsure about Arch, but I would make sure the -devel packages are getting installed if they exist, so you have the required development packages, not the release packages.

Commenting include lines is probably not going to net any positive results. I would focus on fixing missing dependencies or why functions are missing. Most likely the required development files are not installed. (I'm not sure if this package was overlooked on the dependencies, but Exzap did say the linux build needs work.

FYI it looks like pacman has an apt-file search alternative, pacman -F. This allows searching for packages that provide a specific file, including searching the relative path, like SPIRV/Logger.h.

Drakonas avatar Aug 24 '22 07:08 Drakonas

@Drakonas I appreciate you trying to help but I'm not really looking for support. I'll just wait for the AUR/AppImage/Flatpak.

looks like you're missing these headers.

Oh no, they are there. Don't know why CMake can't find them though.

$ locate SPIRV/Logger.h
/home/user/vulkan/1.3.224.0/source/glslang/SPIRV/Logger.h
/home/user/vulkan/1.3.224.0/x86_64/include/glslang/SPIRV/Logger.h
/usr/include/glslang/SPIRV/Logger.h

Anuskuss avatar Aug 24 '22 07:08 Anuskuss

I think most people have figured this out already but the precompiled binary is way easier to get going. Just need to install libselinux and symlink the missing libraries:

yay -S libselinux
sudo ln -s /usr/lib/libffi.so.8 /usr/lib/libffi.so.7
sudo ln -s /usr/lib/libpcre.so.1 /usr/lib/libpcre.so.3
sudo ln -s /usr/lib/libsepol.so.2 /usr/lib/libsepol.so.1

Unfortunately audio doesn't seem to work and it can't read WUD/WUX but it's a start. Will investigate more tomorrow. Although I did try manually installing the packages (from Debian) and that still didn't work...

Anuskuss avatar Aug 24 '22 08:08 Anuskuss

I can't running any game here on ubuntu 22.04, when i try to add the mlc01 or a game folder it crash, i workaround this crash editing settings.xml but when i try to run a game i get another crash.

Crash when adding folders

./Cemu

(Cemu:16143): Gtk-CRITICAL **: 07:03:12.328: gtk_box_gadget_distribute: assertion 'size >= 0' failed in GtkScrollbar

(Cemu:16143): Gtk-WARNING **: 07:03:15.429: Could not load a pixbuf from /com/ubuntu/themes/Yaru/3.0/assets/bullet-symbolic.symbolic.png. This may indicate that pixbuf loaders or the mime database could not be found. ** Gtk:ERROR:../../../../gtk/gtkiconhelper.c:494:ensure_surface_for_gicon: assertion failed (error == NULL): Failed to load /usr/share/icons/Yaru/16x16/status/image-missing.png: Erro fatal ao ler o arquivo de imagem PNG: Invalid IHDR data (gdk-pixbuf-error-quark, 0) Bail out! Gtk:ERROR:../../../../gtk/gtkiconhelper.c:494:ensure_surface_for_gicon: assertion failed (error == NULL): Failed to load /usr/share/icons/Yaru/16x16/status/image-missing.png: Erro fatal ao ler o arquivo de imagem PNG: Invalid IHDR data (gdk-pixbuf-error-quark, 0) Abortado (imagem do núcleo gravada)

Crash when i start a game with vulkan backend

./Cemu

(Cemu:16305): Gtk-CRITICAL **: 07:08:10.075: gtk_box_gadget_distribute: assertion 'size >= 0' failed in GtkScrollbar

(Cemu:16305): Gtk-WARNING **: 07:08:12.420: Could not load a pixbuf from /com/ubuntu/themes/Yaru/3.0/assets/bullet-symbolic.symbolic.png. This may indicate that pixbuf loaders or the mime database could not be found. SIGSEGV! Error: signal 11: ./Cemu[0x533e87] /lib/x86_64-linux-gnu/libc.so.6(+0x42520)[0x7f656922f520] ./Cemu[0x5d0aab] ./Cemu[0x726eb8] /lib/x86_64-linux-gnu/libc.so.6(+0x5a180)[0x7f6569247180] terminate called without an active exception Abortado (imagem do núcleo gravada)

Crash when i start a game with opengl backend

./Cemu

(Cemu:16233): Gtk-CRITICAL **: 07:07:57.881: gtk_box_gadget_distribute: assertion 'size >= 0' failed in GtkScrollbar SIGSEGV! Error: signal 11: ./Cemu[0x533e87] /lib/x86_64-linux-gnu/libc.so.6(+0x42520)[0x7f2732d79520] ./Cemu[0x5d0aab] ./Cemu[0x726eb8] /lib/x86_64-linux-gnu/libc.so.6(+0x5a180)[0x7f2732d91180] SIGSEGV! Error: signal 11: ./Cemu[0x533e87] /lib/x86_64-linux-gnu/libc.so.6(+0x42520)[0x7f2732d79520] /lib/x86_64-linux-gnu/libnvidia-eglcore.so.515.65.01(+0xe03c78)[0x7f25eea03c78] /lib/x86_64-linux-gnu/libnvidia-eglcore.so.515.65.01(+0xecc69b)[0x7f25eeacc69b] /lib/x86_64-linux-gnu/libnvidia-eglcore.so.515.65.01(+0xe82a35)[0x7f25eea82a35] /lib/x86_64-linux-gnu/libnvidia-eglcore.so.515.65.01(+0xb47ba5)[0x7f25ee747ba5] ./Cemu[0x80e85d] ./Cemu[0x81225a] ./Cemu[0x62e36f] /lib/x86_64-linux-gnu/libstdc++.so.6(+0xdc2c3)[0x7f2732be72c3] /lib/x86_64-linux-gnu/libc.so.6(+0x94b43)[0x7f2732dcbb43] /lib/x86_64-linux-gnu/libc.so.6(+0x126a00)[0x7f2732e5da00] terminate called without an active exception Abortado (imagem do núcleo gravada)

Lithium64 avatar Aug 24 '22 10:08 Lithium64

i hope we see AUR support soon

amayra avatar Aug 24 '22 13:08 amayra

@Anuskuss I'm going through almost identical steps as you and getting the same issues more or less. I am, however, trying to avoid modifying source. One thing I'm curious about, are you sure downgrade is actually downgrading to clang-12? I'm suspecting issues with clang-14.

tinyzimmer avatar Aug 24 '22 13:08 tinyzimmer

I attempting to compile on Arch Linux as well, although still on clang 14, and I saw these same issues. For others looking to try, it should be noted that I also needed the vulkan-headers package installed and needed to set up the environment variable via export VULKAN_SDK=/usr in order to get that far.

aquova avatar Aug 24 '22 14:08 aquova

@aquova The alternative to that (which would also be more cross-platform if to be added to documentation) is just downloading the headers:

sudo mkdir -p /opt/vulkansdk
curl -JLO https://sdk.lunarg.com/sdk/download/1.3.224.0/linux/vulkansdk-linux-x86_64-1.3.224.0.tar.gz
sudo tar -C /opt/vulkansdk/ -xf vulkansdk-linux-x86_64-1.3.224.0.tar.gz
rm vulkansdk-linux-x86_64-1.3.224.0.tar.gz

Then you can set VULKAN_SDK to /opt/vulkansdk/1.3.224.0/x86_64/.

However, it is definitely easier to use pacman on Arch.

tinyzimmer avatar Aug 24 '22 14:08 tinyzimmer

Tried to compile it here on ubuntu 22.04, but i'm getting a error on the final of the build

error2.txt

Lithium64 avatar Aug 24 '22 14:08 Lithium64

Also-- Is there a reason vcpkg is used on linux? vcpkg is, no matter what microsoft says, designed for windows, and it doesn't make a ton of sense to have to compile all of the dependencies when they are already available in the various package managers.

It's not unheard of; blender-git ships siloed library trees (although via optional script, not a hard dependency) as they aren't shy about deploying fixes ahead of upstream. For code with frequent releases it's also helps avoid the packaging delay. Vulkan-headers are a month behind on Gentoo, for example.

ToddAWalter avatar Aug 24 '22 14:08 ToddAWalter

't been involved in Cemu before, if you approve of it, wouldn't that make it official? Also, when it's ready for

saying it is allowed does not mean they want to provide support thus it is not official, just put community build or unofficial build in the name on flathub. You can also always submit your work back to the official project so they can choose weather to use some of your work in the official build or not.

Jhackler avatar Aug 24 '22 14:08 Jhackler

Fedora is stuck here

`CMake Warning at buildtrees/versioning_/versions/openssl/557ff31f9a64f01cd0d98dd44793ce3c7fd32893/portfile.cmake:7 (message): openssl currently requires the following library from the system package manager:

  linux-headers

It can be installed on alpine systems via apk add linux-headers. Call Stack (most recent call first): scripts/ports.cmake:147 (include)

-- Using cached openssl-openssl-openssl-3.0.5.tar.gz. -- Cleaning sources at /home/matt/Cemu/dependencies/vcpkg/buildtrees/openssl/src/nssl-3.0.5-30ecfd0d02.clean. Use --editable to skip cleaning for the packages you specify. -- Extracting source /home/matt/Cemu/dependencies/vcpkg/downloads/openssl-openssl-openssl-3.0.5.tar.gz -- Using source at /home/matt/Cemu/dependencies/vcpkg/buildtrees/openssl/src/nssl-3.0.5-30ecfd0d02.clean -- Configuring x64-linux -- Building x64-linux-dbg CMake Error at scripts/cmake/vcpkg_execute_build_process.cmake:129 (message): Command failed: /home/matt/Cemu/dependencies/vcpkg/downloads/tools/cmake-3.24.0-linux/cmake-3.24.0-linux-x86_64/bin/cmake --build . --config Debug --target install -- -v -j13 Working Directory: /home/matt/Cemu/dependencies/vcpkg/buildtrees/openssl/x64-linux-dbg See logs for more information: /home/matt/Cemu/dependencies/vcpkg/buildtrees/openssl/install-x64-linux-dbg-out.log

Call Stack (most recent call first): /home/matt/Cemu/build/vcpkg_installed/x64-linux/share/vcpkg-cmake/vcpkg_cmake_build.cmake:74 (vcpkg_execute_build_process) /home/matt/Cemu/build/vcpkg_installed/x64-linux/share/vcpkg-cmake/vcpkg_cmake_install.cmake:16 (vcpkg_cmake_build) buildtrees/versioning_/versions/openssl/557ff31f9a64f01cd0d98dd44793ce3c7fd32893/unix/portfile.cmake:21 (vcpkg_cmake_install) buildtrees/versioning_/versions/openssl/557ff31f9a64f01cd0d98dd44793ce3c7fd32893/portfile.cmake:39 (include) scripts/ports.cmake:147 (include)

error: building openssl:x64-linux failed with: BUILD_FAILED Please ensure you're using the latest port files with git pull and vcpkg update. Then check for known issues at: https://github.com/microsoft/vcpkg/issues?q=is%3Aissue+is%3Aopen+in%3Atitle+openssl You can submit a new issue at: https://github.com/microsoft/vcpkg/issues/new?template=report-package-build-failure.md&title=[openssl]+Build+error Include '[openssl] Build error' in your bug report title, the following version information in your bug description, and attach any relevant failure logs from above. vcpkg-tool version: 2022-07-21-a0e87e227afb536c62188c11ad029954f28fdb22 vcpkg-scripts version: 1b0252ca 2022-08-22 (2 days ago)

You can also use the prefilled template from /home/matt/Cemu/build/vcpkg_installed/vcpkg/issue_body.md.

-- Running vcpkg install - failed CMake Error at dependencies/vcpkg/scripts/buildsystems/vcpkg.cmake:860 (message): vcpkg install failed. See logs for more information: /home/matt/Cemu/build/vcpkg-manifest-install.log Call Stack (most recent call first): /usr/share/cmake/Modules/CMakeDetermineSystem.cmake:124 (include) CMakeLists.txt:18 (project) ` small note vcpkg is installed and so are the kernel-headers

ryzendew avatar Aug 24 '22 15:08 ryzendew

Having the same issue on Fedora aswell.

WryOpussum avatar Aug 24 '22 15:08 WryOpussum

@RyzenDew @WryOpussum

What's the output of cat $HOME/Cemu/dependencies/vcpkg/buildtrees/openssl/install-x64-linux-dbg-out.log and cat $HOME/Cemu/build/vcpkg-manifest-install.log?

bbaster avatar Aug 24 '22 15:08 bbaster

So, I am writing a PKGBUILD for the Arch Linux AUR, and I am currently getting errors linking to wxwidgets and imgui.

/home/hurricane/cemu/src/Cemu/src/imgui/imgui_impl_vulkan.cpp:45:10: fatal error: 'imgui.h' file not found
#include "imgui.h"
         ^~~~~~~~~
/home/hurricane/cemu/src/Cemu/src/imgui/imgui_impl_opengl3.cpp:68:10: fatal error: 'imgui.h' file not found
#include "imgui.h"
         ^~~~~~~~~
In file included from /home/hurricane/cemu/src/Cemu/src/input/emulated/EmulatedController.cpp:1:
In file included from /home/hurricane/cemu/src/Cemu/src/input/../input/emulated/EmulatedController.h:6:
In file included from /home/hurricane/cemu/src/Cemu/src/input/../input/motion/MotionSample.h:3:
In file included from /home/hurricane/cemu/src/Cemu/src/input/../util/math/quaternion.h:4:
In file included from /usr/include/wx-3.2/wx/math.h:16:
In file included from /usr/include/wx-3.2/wx/defs.h:45:
/usr/include/wx-3.2/wx/platform.h:159:10: fatal error: 'wx/setup.h' file not found
#include "wx/setup.h"
         ^~~~~~~~~~~~

So I looked and say Arch Linux installs its headers for the package wxwidgets-common at /usr/include/wx-3.2/, so I added to my CMake command -DCMAKE_CXX_FLAGS="$CXXFLAGS -I/usr/include/wx-3.2", but then that leads to another error and so forth.

So, is this an issue with how Arch packages its headers for wxwidgets, or what?

Also, it looks y'all didn't set your C++ and C standard cause I had to manually set them as I had problems with some things being missing from the std.

	-DCMAKE_CXX_STANDARD=20 
	-DCMAKE_C_STANDARD=17 

Here is my cmake command btw

	cmake \
	../src \
	-DCMAKE_BUILD_TYPE=Release \
	-DCMAKE_MAKE_PROGRAM=/usr/bin/make \
	-DCMAKE_C_COMPILER=clang \
	-DCMAKE_CXX_COMPILER=clang++ \
	-DCMAKE_CXX_STANDARD=20 \
	-DCMAKE_C_STANDARD=17 \
	-DCMAKE_CXX_FLAGS="$CXXFLAGS -I/usr/include/wx" \
	-DCMAKE_C_FLAGS="$CFLAGS -I/usr/include/wx"

And, here are the build dependencies and make dependencies

depends=('vulkan-driver' 'opengl-driver' 'gtk3' 'libsecret' 'libgcrypt' 'freeglut' 'glibc' 'openssl' 'zlib' 'curl' 'pugixml' 'glslang' 'x264' 'libzip')
makedepends=('cmake' 'vulkan-headers' 'spirv-tools' 'vulkan-validation-layers' 'nasm' 'boost' 'glm' 'wxwidgets-common')

HurricanePootis avatar Aug 24 '22 15:08 HurricanePootis

So, I am writing a PKGBUILD for the Arch Linux AUR, and I am currently getting errors linking to wxwidgets and imgui.

/home/hurricane/cemu/src/Cemu/src/imgui/imgui_impl_vulkan.cpp:45:10: fatal error: 'imgui.h' file not found
#include "imgui.h"
         ^~~~~~~~~
/home/hurricane/cemu/src/Cemu/src/imgui/imgui_impl_opengl3.cpp:68:10: fatal error: 'imgui.h' file not found
#include "imgui.h"
         ^~~~~~~~~
In file included from /home/hurricane/cemu/src/Cemu/src/input/emulated/EmulatedController.cpp:1:
In file included from /home/hurricane/cemu/src/Cemu/src/input/../input/emulated/EmulatedController.h:6:
In file included from /home/hurricane/cemu/src/Cemu/src/input/../input/motion/MotionSample.h:3:
In file included from /home/hurricane/cemu/src/Cemu/src/input/../util/math/quaternion.h:4:
In file included from /usr/include/wx-3.2/wx/math.h:16:
In file included from /usr/include/wx-3.2/wx/defs.h:45:
/usr/include/wx-3.2/wx/platform.h:159:10: fatal error: 'wx/setup.h' file not found
#include "wx/setup.h"
         ^~~~~~~~~~~~

So I looked and say Arch Linux installs its headers for the package wxwidgets-common at /usr/include/wx-3.2/, so I added to my CMake command -DCMAKE_CXX_FLAGS="$CXXFLAGS -I/usr/include/wx-3.2", but then that leads to another error and so forth.

So, is this an issue with how Arch packages its headers for wxwidgets, or what?

Also, it looks y'all didn't set your C++ and C standard cause I had to manually set them as I had problems with some things being missing from the std.

	-DCMAKE_CXX_STANDARD=20 
	-DCMAKE_C_STANDARD=17 

Here is my cmake command btw

	cmake \
	../src \
	-DCMAKE_BUILD_TYPE=Release \
	-DCMAKE_MAKE_PROGRAM=/usr/bin/make \
	-DCMAKE_C_COMPILER=clang \
	-DCMAKE_CXX_COMPILER=clang++ \
	-DCMAKE_CXX_STANDARD=20 \
	-DCMAKE_C_STANDARD=17 \
	-DCMAKE_CXX_FLAGS="$CXXFLAGS -I/usr/include/wx" \
	-DCMAKE_C_FLAGS="$CFLAGS -I/usr/include/wx"

And, here are the build dependencies and make dependencies

depends=('vulkan-driver' 'opengl-driver' 'gtk3' 'libsecret' 'libgcrypt' 'freeglut' 'glibc' 'openssl' 'zlib' 'curl' 'pugixml' 'glslang' 'x264' 'libzip')
makedepends=('cmake' 'vulkan-headers' 'spirv-tools' 'vulkan-validation-layers' 'nasm' 'boost' 'glm' 'wxwidgets-common')

I am not a member of the cemu team, however I imagine reporting issues with other peoples packages is not helpful. I would comment on the aur package

Jhackler avatar Aug 24 '22 15:08 Jhackler

@RyzenDew @WryOpussum

What's the output of cat $HOME/Cemu/dependencies/vcpkg/buildtrees/openssl/install-x64-linux-dbg-out.log and cat $HOME/Cemu/build/vcpkg-manifest-install.log?

I got it fixed by installing the openssl build dependencies.

WryOpussum avatar Aug 24 '22 15:08 WryOpussum

@Jhackler

HurricanePootis is having errors with creating an AUR package, not with someone else's package

bbaster avatar Aug 24 '22 15:08 bbaster

is having errors with creating an AUR package, not with someone else's package

ah ok got it lol.

Jhackler avatar Aug 24 '22 15:08 Jhackler

So, I am writing a PKGBUILD for the Arch Linux AUR, and I am currently getting errors linking to wxwidgets and imgui.

/home/hurricane/cemu/src/Cemu/src/imgui/imgui_impl_vulkan.cpp:45:10: fatal error: 'imgui.h' file not found
#include "imgui.h"
         ^~~~~~~~~
/home/hurricane/cemu/src/Cemu/src/imgui/imgui_impl_opengl3.cpp:68:10: fatal error: 'imgui.h' file not found
#include "imgui.h"
         ^~~~~~~~~
In file included from /home/hurricane/cemu/src/Cemu/src/input/emulated/EmulatedController.cpp:1:
In file included from /home/hurricane/cemu/src/Cemu/src/input/../input/emulated/EmulatedController.h:6:
In file included from /home/hurricane/cemu/src/Cemu/src/input/../input/motion/MotionSample.h:3:
In file included from /home/hurricane/cemu/src/Cemu/src/input/../util/math/quaternion.h:4:
In file included from /usr/include/wx-3.2/wx/math.h:16:
In file included from /usr/include/wx-3.2/wx/defs.h:45:
/usr/include/wx-3.2/wx/platform.h:159:10: fatal error: 'wx/setup.h' file not found
#include "wx/setup.h"
         ^~~~~~~~~~~~

So I looked and say Arch Linux installs its headers for the package wxwidgets-common at /usr/include/wx-3.2/, so I added to my CMake command -DCMAKE_CXX_FLAGS="$CXXFLAGS -I/usr/include/wx-3.2", but then that leads to another error and so forth.

So, is this an issue with how Arch packages its headers for wxwidgets, or what?

Also, it looks y'all didn't set your C++ and C standard cause I had to manually set them as I had problems with some things being missing from the std.

	-DCMAKE_CXX_STANDARD=20 
	-DCMAKE_C_STANDARD=17 

Here is my cmake command btw

	cmake \
	../src \
	-DCMAKE_BUILD_TYPE=Release \
	-DCMAKE_MAKE_PROGRAM=/usr/bin/make \
	-DCMAKE_C_COMPILER=clang \
	-DCMAKE_CXX_COMPILER=clang++ \
	-DCMAKE_CXX_STANDARD=20 \
	-DCMAKE_C_STANDARD=17 \
	-DCMAKE_CXX_FLAGS="$CXXFLAGS -I/usr/include/wx" \
	-DCMAKE_C_FLAGS="$CFLAGS -I/usr/include/wx"

And, here are the build dependencies and make dependencies

depends=('vulkan-driver' 'opengl-driver' 'gtk3' 'libsecret' 'libgcrypt' 'freeglut' 'glibc' 'openssl' 'zlib' 'curl' 'pugixml' 'glslang' 'x264' 'libzip')
makedepends=('cmake' 'vulkan-headers' 'spirv-tools' 'vulkan-validation-layers' 'nasm' 'boost' 'glm' 'wxwidgets-common')

Any reason you are using make instead of ninja?

tinyzimmer avatar Aug 24 '22 15:08 tinyzimmer

So, is this an issue with how Arch packages its headers for wxwidgets, or what?

It looks like the filepath for setup.h is /usr/include/wx-3.2/wx/gtk/setup.h (seen by running pacman -Fl wxwidgets-common | grep setup.h).

aquova avatar Aug 24 '22 15:08 aquova

So, I am writing a PKGBUILD for the Arch Linux AUR, and I am currently getting errors linking to wxwidgets and imgui.

/home/hurricane/cemu/src/Cemu/src/imgui/imgui_impl_vulkan.cpp:45:10: fatal error: 'imgui.h' file not found
#include "imgui.h"
         ^~~~~~~~~
/home/hurricane/cemu/src/Cemu/src/imgui/imgui_impl_opengl3.cpp:68:10: fatal error: 'imgui.h' file not found
#include "imgui.h"
         ^~~~~~~~~
In file included from /home/hurricane/cemu/src/Cemu/src/input/emulated/EmulatedController.cpp:1:
In file included from /home/hurricane/cemu/src/Cemu/src/input/../input/emulated/EmulatedController.h:6:
In file included from /home/hurricane/cemu/src/Cemu/src/input/../input/motion/MotionSample.h:3:
In file included from /home/hurricane/cemu/src/Cemu/src/input/../util/math/quaternion.h:4:
In file included from /usr/include/wx-3.2/wx/math.h:16:
In file included from /usr/include/wx-3.2/wx/defs.h:45:
/usr/include/wx-3.2/wx/platform.h:159:10: fatal error: 'wx/setup.h' file not found
#include "wx/setup.h"
         ^~~~~~~~~~~~

So I looked and say Arch Linux installs its headers for the package wxwidgets-common at /usr/include/wx-3.2/, so I added to my CMake command -DCMAKE_CXX_FLAGS="$CXXFLAGS -I/usr/include/wx-3.2", but then that leads to another error and so forth. So, is this an issue with how Arch packages its headers for wxwidgets, or what? Also, it looks y'all didn't set your C++ and C standard cause I had to manually set them as I had problems with some things being missing from the std.

	-DCMAKE_CXX_STANDARD=20 
	-DCMAKE_C_STANDARD=17 

Here is my cmake command btw

	cmake \
	../src \
	-DCMAKE_BUILD_TYPE=Release \
	-DCMAKE_MAKE_PROGRAM=/usr/bin/make \
	-DCMAKE_C_COMPILER=clang \
	-DCMAKE_CXX_COMPILER=clang++ \
	-DCMAKE_CXX_STANDARD=20 \
	-DCMAKE_C_STANDARD=17 \
	-DCMAKE_CXX_FLAGS="$CXXFLAGS -I/usr/include/wx" \
	-DCMAKE_C_FLAGS="$CFLAGS -I/usr/include/wx"

And, here are the build dependencies and make dependencies

depends=('vulkan-driver' 'opengl-driver' 'gtk3' 'libsecret' 'libgcrypt' 'freeglut' 'glibc' 'openssl' 'zlib' 'curl' 'pugixml' 'glslang' 'x264' 'libzip')
makedepends=('cmake' 'vulkan-headers' 'spirv-tools' 'vulkan-validation-layers' 'nasm' 'boost' 'glm' 'wxwidgets-common')

Any reason you are using make instead of ninja?

Honestly, I just use make to have one less dependency (as it shouldn't change anything with CMake), but I will try with ninja to see if it changes everything

HurricanePootis avatar Aug 24 '22 15:08 HurricanePootis