merryhime/dynarmic

can't find libfmt when building vita3k on Ubuntu

cobalt2727 opened this issue · 3 comments

ubuntu@oracle-vm:~/vita3k$ ./format.sh && cmake --preset linux-ninja-clang14
+ find vita3k tools/gen-modules tools/native-tool '(' -name '*.cpp' -o -name '*.h' ')'
+ xargs clang-format -i
Preset CMake variables:

  CMAKE_CXX_COMPILER="clang++-14"
  CMAKE_C_COMPILER="clang-14"
  USE_DISCORD_RICH_PRESENCE:BOOL="FALSE"

Preset environment variables:

  LDFLAGS="-fuse-ld=lld"

CMake Deprecation Warning at external/capstone/CMakeLists.txt:1 (cmake_minimum_required):
  Compatibility with CMake < 2.8.12 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value or use a ...<max> suffix to tell
  CMake that the project does not need compatibility with older versions.


CMake Deprecation Warning at external/capstone/CMakeLists.txt:18 (cmake_policy):
  The OLD behavior for policy CMP0048 will be removed from a future version
  of CMake.

  The cmake-policies(7) manual explains that the OLD behaviors of all
  policies are deprecated and that a policy should be set to OLD only under
  specific short-term circumstances.  Projects should be ported to the NEW
  behavior and not rely on setting a policy to OLD.


Enabling CAPSTONE_ARM_SUPPORT
-- Module support is disabled.
-- Version: 8.1.1
-- Build type: Release
-- CXX_STANDARD: 20
-- Required features: cxx_variadic_templates
-- Build spdlog: 1.9.2
-- Build type: Release
-- Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE)

ERROR: pthread check failed
       Make sure to have the pthread libs and headers installed.

-- Target architecture: arm64
-- Found Boost: /usr/include (found suitable version "1.65.1", minimum required is "1.57")
-- SPIRV-Cross: Finding Git version for SPIRV-Cross.
-- SPIRV-Cross: Git hash: e9cc6403
psvpfsparser
OpenSSL include dir: /usr/include
OpenSSL libraries: /usr/lib/aarch64-linux-gnu/libssl.so;/usr/lib/aarch64-linux-gnu/libcrypto.so
nfd Platform: PLATFORM_LINUX
nfd Compiler: COMPILER_GNU
Using DBUS version: 1.12.2
configuring boost
-- Found Boost: /usr/include (found version "1.65.1") found components: filesystem system
Using Boost_VERSION: 106501
Using Boost_INCLUDE_DIRS: /usr/include
Using Boost_LIBRARY_DIRS: /usr/lib/aarch64-linux-gnu
-- Configuring done
CMake Error: install(EXPORT "dynarmicTargets" ...) includes target "dynarmic" which requires target "fmt" that is not in any export set.
-- Generating done
CMake Generate step failed.  Build files cannot be regenerated correctly.

System specs:

                                      ubuntu@oracle-vm
      `-/+++++++++++++++++/-.`        ----------------
   `/syyyyyyyyyyyyyyyyyyyyyyys/.      OS: Ubuntu 18.04.6 LTS aarch64
  :yyyyo/-...............-/oyyyy/     Host: KVM Virtual Machine virt-4.2
 /yyys-                     .oyyy+    Kernel: 5.4.0-1092-oracle
.yyyy`                       `syyy-   Uptime: 17 days, 18 hours, 31 mins
:yyyo                         /yyy/   Packages: 1920 (dpkg), 5 (flatpak), 3 (snap)
.yyyy`                       `syyy-   Shell: bash 4.4.20
 /yyys.                     .oyyyo    Resolution: 1024x768
  /yyyyo:-...............-:oyyyy/`    Terminal: /dev/pts/0
   `/syyyyyyyyyyyyyyyyyyyyyyys+.      CPU: (4)
     `.:/+ooooooooooooooo+/:.`        GPU: Red Hat, Inc. Virtio GPU
                                      Memory: 1008MiB / 23997MiB

I'm fully aware this is a very weird setup, and I might end up having to create an issue on Vita3K's repo instead - but would anyone have any ideas on why it's not finding pthread or fmt? The pthread issue is likely just because the apt packages are too old, but I'm a bit stumped on fmt - I did compile a newer version of that from source and removed libfmt-dev from apt to avoid the compiler getting confused:

ubuntu@oracle-vm:~/vita3k$ pkg-config --libs --cflags fmt
-I/usr/local/include -L/usr/local/lib -lfmt

I do have newer versions of other system libraries installed, for what it's worth:

ubuntu@oracle-vm:~/vita3k$ cmake --version; clang-14 --version
cmake version 3.25.2

CMake suite maintained and supported by Kitware (kitware.com/cmake).
Ubuntu clang version 14.0.6
Target: aarch64-unknown-linux-gnu
Thread model: posix
InstalledDir: /usr/bin

Change

add_subdirectory(dynarmic)

to

add_subdirectory(dynarmic EXCLUDE_FROM_ALL)

in Vita3k's externals/CMakeLists.txt

Oddly enough, that didn't change anything...
image

(and yeah, I did remove the ./build/ folder first)