Cemu: Cemu does not build on Ubuntu 22.04.1 LTS
OS: Ubuntu 22.04.1 LTS Steps:
$ sudo apt install -y git curl cmake ninja-build nasm libgtk-3-dev libsecret-1-dev libgcrypt20-dev libsystemd-dev freeglut3-dev libpulse-dev
$ git clone --recursive https://github.com/cemu-project/Cemu
$ cd Cemu
$ git rev-parse HEAD
cf598e38c171e20d2d7b250f3a4c180004c0d029
$ cmake -S . -B build -DCMAKE_BUILD_TYPE=release -DCMAKE_C_COMPILER=/usr/bin/gcc -DCMAKE_CXX_COMPILER=/usr/bin/g++ -G Ninja
The package zstd provides CMake targets:
find_package(zstd CONFIG REQUIRED)
target_link_libraries(main PRIVATE $<IF:$<TARGET_EXISTS:zstd::libzstd_shared>,zstd::libzstd_shared,zstd::libzstd_static>)
-- Running vcpkg install - done
-- The C compiler identification is GNU 11.2.0
-- The CXX compiler identification is GNU 11.2.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/gcc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/g++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE
-- Found OpenSSL: /home/user/Cemu/build/vcpkg_installed/x64-linux/lib/libcrypto.a (found suitable version "3.0.5", minimum required is "3")
-- Found ZLIB: optimized;/home/user/Cemu/build/vcpkg_installed/x64-linux/lib/libz.a;debug;/home/user/Cemu/build/vcpkg_installed/x64-linux/debug/lib/libz.a (found suitable version "1.2.12", minimum required is "1")
-- RapidJSON found. Headers: /home/user/Cemu/build/vcpkg_installed/x64-linux/share/rapidjson/../../include
CMake Error at dependencies/vcpkg/scripts/buildsystems/vcpkg.cmake:826 (_find_package):
Could not find a package configuration file provided by
"boost_program_options" (requested version 1.74.0) with any of the
following names:
boost_program_optionsConfig.cmake
boost_program_options-config.cmake
Add the installation prefix of "boost_program_options" to CMAKE_PREFIX_PATH
or set "boost_program_options_DIR" to a directory containing one of the
above files. If "boost_program_options" provides a separate development
package or SDK, be sure it has been installed.
Call Stack (most recent call first):
/usr/lib/x86_64-linux-gnu/cmake/Boost-1.74.0/BoostConfig.cmake:141 (find_package)
/usr/lib/x86_64-linux-gnu/cmake/Boost-1.74.0/BoostConfig.cmake:258 (boost_find_component)
build/vcpkg_installed/x64-linux/share/boost/vcpkg-cmake-wrapper.cmake:11 (_find_package)
dependencies/vcpkg/scripts/buildsystems/vcpkg.cmake:780 (include)
CMakeLists.txt:85 (find_package)
-- Configuring incomplete, errors occurred!
See also "/home/user/Cemu/build/CMakeFiles/CMakeOutput.log".
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 32 (1 by maintainers)
I found out that if I erase line 18 (“sdl2”,) from “vcpkg.json”, I can build cemu on ubuntu 22.04 successfully with -DENABLE_VCPKG=ON.
I have fixed it after installing the following packages:
Currently getting the same issue as OP trying to build on Ubuntu 23.10. Seems like
libboost-program-options1.74-dev
andlibboost-nowide1.74-dev
are required but missing. After installing those two packages in addition to BUILD.md’s recommended packages, I am able to finish the build.nowide error (same basic error as program-options):
Since Ubuntu 22.10 is out 22.04.* is deprecated so I’m closing this issue.
Hi guys,
I built it successfully on ubuntu 22.04.1 installing all missing dependecies, and building fmt, glslang and wxwidgets from source that are outdated on ubunut and using the argument “-DENABLE_VCPKG=OFF” .
It worked until PR c40466f3a8d12a34ca1a82b596af18dd56a3ec2b
After PR 028b3f79926a280b1a6fc5abbd438cc875079b89 it fail with the log bellow:
FAILED: src/input/CMakeFiles/CemuInput.dir/api/Keyboard/KeyboardController.cpp.o /usr/bin/clang+±12 -DBOOST_ALL_NO_LIB -DBOOST_PROGRAM_OPTIONS_DYN_LINK -DENABLE_DISCORD_RPC -DHAS_CUBEB=1 -DPORTABLE -DVK_NO_PROTOTYPES -DVK_USE_PLATFORM_XCB_KHR -DVK_USE_PLATFORM_XLIB_KHR -DWXUSINGDLL -D_FILE_OFFSET_BITS=64 -D__WXGTK__ -I/home/pedrohenrique/build/Cemu/build/src/input -I/home/pedrohenrique/build/Cemu/src/input -I/home/pedrohenrique/build/Cemu/dependencies/Vulkan-Headers/include -I/home/pedrohenrique/build/Cemu/src/input/… -I/home/pedrohenrique/build/Cemu/src/Cafe/… -I/home/pedrohenrique/build/Cemu/src/Common/… -I/home/pedrohenrique/build/Cemu/src/config/… -I/home/pedrohenrique/build/Cemu/src/gui/… -I/home/pedrohenrique/build/Cemu/src/util/… -isystem /home/pedrohenrique/build/fmt/install/include -isystem /home/pedrohenrique/build/wxWidgets/install/lib/wx/include/gtk3-unicode-3.2 -isystem /home/pedrohenrique/build/wxWidgets/install/include/wx-3.2 -isystem /usr/lib -isystem /usr/include/SDL2 -O3 -DNDEBUG -flto=thin -maes -Wno-ambiguous-reversed-operator -Wno-multichar -Wno-invalid-offsetof -Wno-switch -Wno-ignored-attributes -Wno-deprecated-enum-enum-conversion -pthread -std=gnu++20 -Winvalid-pch -Xclang -include-pch -Xclang /home/pedrohenrique/build/Cemu/build/src/input/CMakeFiles/CemuInput.dir/cmake_pch.hxx.pch -Xclang -include -Xclang /home/pedrohenrique/build/Cemu/build/src/input/CMakeFiles/CemuInput.dir/cmake_pch.hxx -MD -MT src/input/CMakeFiles/CemuInput.dir/api/Keyboard/KeyboardController.cpp.o -MF src/input/CMakeFiles/CemuInput.dir/api/Keyboard/KeyboardController.cpp.o.d -o src/input/CMakeFiles/CemuInput.dir/api/Keyboard/KeyboardController.cpp.o -c /home/pedrohenrique/build/Cemu/src/input/api/Keyboard/KeyboardController.cpp /home/pedrohenrique/build/Cemu/src/input/api/Keyboard/KeyboardController.cpp:57:36: error: no viable conversion from ‘boost::container::small_vector<uint32, 16>’ (aka ‘small_vector<unsigned int, 16>’) to ‘std::span<uint32>’ (aka ‘span<unsigned int>’) result.buttons.SetPressedButtons(pressedKeys); ^~~~~~~~~~~ /usr/bin/…/lib/gcc/x86_64-linux-gnu/12/…/…/…/…/include/c++/12/span:223:7: note: candidate constructor not viable: no known conversion from ‘boost::container::small_vector<uint32, 16>’ (aka ‘small_vector<unsigned int, 16>’) to ‘const std::span<unsigned int, 18446744073709551615> &’ for 1st argument span(const span&) noexcept = default; ^ /usr/bin/…/lib/gcc/x86_64-linux-gnu/12/…/…/…/…/include/c++/12/span:185:2: note: candidate template ignored: could not match ‘type_identity_t<std::span<unsigned int, 18446744073709551615>::element_type> [_ArrayExtent]’ against ‘boost::container::small_vector<uint32, 16>’ (aka ‘small_vector<unsigned int, 16>’) span(type_identity_t<element_type> (&__arr)[_ArrayExtent]) noexcept ^ /usr/bin/…/lib/gcc/x86_64-linux-gnu/12/…/…/…/…/include/c++/12/span:192:2: note: candidate template ignored: could not match ‘array’ against ‘small_vector’ span(array<_Tp, _ArrayExtent>& __arr) noexcept ^ /usr/bin/…/lib/gcc/x86_64-linux-gnu/12/…/…/…/…/include/c++/12/span:199:2: note: candidate template ignored: could not match ‘array’ against ‘small_vector’ span(const array<_Tp, _ArrayExtent>& __arr) noexcept ^ /usr/bin/…/lib/gcc/x86_64-linux-gnu/12/…/…/…/…/include/c++/12/span:211:2: note: candidate template ignored: constraints not satisfied [with _Range = boost::container::small_vector<unsigned int, 16> &] span(_Range&& __range) ^ /usr/bin/…/lib/gcc/x86_64-linux-gnu/12/…/…/…/…/include/c++/12/span:207:15: note: because ‘boost::container::small_vector<unsigned int, 16> &’ does not satisfy ‘contiguous_range’ && ranges::contiguous_range<_Range> && ranges::sized_range<_Range> ^ /usr/bin/…/lib/gcc/x86_64-linux-gnu/12/…/…/…/…/include/c++/12/bits/ranges_base.h:681:37: note: because ‘iterator_t<boost::container::small_vector<unsigned int, 16> &>’ (aka ‘boost::container::vec_iterator<unsigned int *, false>’) does not satisfy ‘contiguous_iterator’ = random_access_range<_Tp> && contiguous_iterator<iterator_t<_Tp>> ^ /usr/bin/…/lib/gcc/x86_64-linux-gnu/12/…/…/…/…/include/c++/12/bits/iterator_concepts.h:679:10: note: because ‘derived_from<__detail::__iter_concept<vec_iterator<unsigned int *, false> >, std::contiguous_iterator_tag>’ evaluated to false && derived_from<__detail::__iter_concept<_Iter>, contiguous_iterator_tag> ^ /usr/bin/…/lib/gcc/x86_64-linux-gnu/12/…/…/…/…/include/c++/12/concepts:67:28: note: because ‘__is_base_of(std::contiguous_iterator_tag, std::random_access_iterator_tag)’ evaluated to false concept derived_from = __is_base_of(_Base, _Derived) ^ /usr/bin/…/lib/gcc/x86_64-linux-gnu/12/…/…/…/…/include/c++/12/span:231:2: note: candidate template ignored: could not match ‘span’ against ‘small_vector’ span(const span<_OType, _OExtent>& _s) noexcept ^ /home/pedrohenrique/build/Cemu/src/input/…/input/api/ControllerState.h:36:43: note: passing argument to parameter ‘buttonList’ here void SetPressedButtons(std::span<uint32> buttonList) ^ 1 error generated. [218/248] Building CXX object src/input/CMakeFiles/CemuInput.dir/emulated/EmulatedController.cpp.o ninja: build stopped: subcommand failed. (reverse-i-search)`VC’: cmake -S …/ -B ./ -DCMAKE_BUILD_TYPE=release -DCMAKE_C_COMPILER=/usr/bin/clang-12 -DCMAKE_CXX_COMPILER=/usr/bin/clang+±12 -DENABLE^CPKG=OFF -G Ninja -DCMAKE_MAKE_PROGRAM=/usr/bin/ninja
I also needed to install
libcubeb-dev
package to make audio work.That did it. Please somebody update README to include this.