RetroPie / EmulationStation

A Fork of Emulation Station for RetroPie. Emulation Station is a flexible emulator front-end supporting keyboardless navigation and custom system themes.
Other
858 stars 344 forks source link

Could NOT find Freetype (missing: FREETYPE_LIBRARY FREETYPE_INCLUDE_DIRS) #869

Closed julianoBRL closed 6 months ago

julianoBRL commented 6 months ago

I'm following the windows tutorial

My computer: 32 RAM Intel(R) Core(TM) i3-9100F CPU @ 3.60GHz 3.60 GHz RTX 4060 + GTX 1050 TI

Command i'm trying to use:

cmake . -B build -A Win32 ^
-DRAPIDJSON_INCLUDE_DIRS=%RAPIDJSON_INCLUDE_DIRS% ^
-DCURL_INCLUDE_DIR=%CURL_INCLUDE_DIR% ^
-DSDL2_INCLUDE_DIR=%SDL2_INCLUDE_DIR% ^
-DVLC_INCLUDE_DIR=%VLC_INCLUDE_DIR% ^
-DCURL_LIBRARY=%CURL_LIBRARY% ^
-DSDL2_LIBRARY=%SDL2_LIBRARY% ^
-DVLC_LIBRARIES=%VLC_LIBRARIES% ^
-DVLC_VERSION=%VLC_VERSION% ^
-DCMAKE_EXE_LINKER_FLAGS=/SAFESEH:NO`

Error:

CMake Deprecation Warning at CMakeLists.txt:1 (cmake_minimum_required):
  Compatibility with CMake < 3.5 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 CMakeLists.txt:21 (cmake_policy):
  The OLD behavior for policy CMP0072 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.

-- Selecting Windows SDK version 10.0.22621.0 to target Windows 10.0.19045.
CMake Error at D:/Programas/CMake/share/cmake-3.29/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
  Could NOT find Freetype (missing: FREETYPE_LIBRARY FREETYPE_INCLUDE_DIRS)
Call Stack (most recent call first):
  D:/Programas/CMake/share/cmake-3.29/Modules/FindPackageHandleStandardArgs.cmake:600 (_FPHSA_FAILURE_MESSAGE)
  D:/Programas/CMake/share/cmake-3.29/Modules/FindFreetype.cmake:162 (find_package_handle_standard_args)
  CMakeLists.txt:99 (find_package)

-- Configuring incomplete, errors occurred!

I tried:

Freetype is installed: D:\Projetos\RetroPie\vcpkg\installed\x86-windows-static-md\lib\freetype.lib D:\Projetos\RetroPie\vcpkg\installed\x86-windows-static-md\include\freetype

I dont know what else to try, it is my first time using cmake and stuff like that.

cmitu commented 6 months ago

Did you forget to set FREETYPE_DIR in the previous step ?

julianoBRL commented 6 months ago

@cmitu nop, i'm sure that i set it right

cmitu commented 6 months ago

I just triggered the action to build ES using the instructions from the Readme - see here. I don't see an issue there and for now I can only suggest to double check whether you mirrored correctly the instructions given.

cmitu commented 6 months ago

@julianoBRL Did you manage to re-test of fix this error ?

julianoBRL commented 6 months ago

@cmitu yes, i tested several times even on diferent terminals, same problem

cmitu commented 6 months ago

Can you try to manually add the paths to the include/library folders in the cmake invocation ? Make sure you're starting from an empty cmake build folder.

cmake ...
...
 -DFREETYPE_INCLUDE_DIRS=<PATH_TO_>/freetype/include -DFREETYPE_LIBRARY=<PATH_TO>/freetype/freetype.lib
...
julianoBRL commented 6 months ago

it seems like te resolved but now it is FreeImage that is giving an error: Full terminal output here

CMake Error at CMake/Utils/FindPkgMacros.cmake:123 (message):
  Required library FreeImage not found! Install the library (including dev
  packages) and try again.  If the library is already installed, set the
  missing variables manually in cmake.
cmitu commented 6 months ago

Can you try running the build commands from a CMD prompt and not from a PowerShell session ?

julianoBRL commented 6 months ago

Got a new error on CMD now. I did all the other steps of vcpkg and nuget

CMake Warning at external/CMakeLists.txt:6 (find_package):
  By not providing "Findpugixml.cmake" in CMAKE_MODULE_PATH this project has
  asked CMake to find a package configuration file provided by "pugixml", but
  CMake did not find one.

  Could not find a package configuration file provided by "pugixml" with any
  of the following names:

    pugixmlConfig.cmake
    pugixml-config.cmake

  Add the installation prefix of "pugixml" to CMAKE_PREFIX_PATH or set
  "pugixml_DIR" to a directory containing one of the above files.  If
  "pugixml" provides a separate development package or SDK, be sure it has
  been installed.

CMake Error at external/CMakeLists.txt:9 (add_subdirectory):
  The source directory

    C:/src/EmulationStation/external/pugixml

  does not contain a CMakeLists.txt file.

-- Configuring incomplete, errors occurred!

pugixml is empty.

cmitu commented 6 months ago

pugixml is empty.

You forgot to clone the submodules present in the repository. You can either clone with git --recursive ... etc... or, on your existing repository clone, run

git submodule init
git submodule update

These steps are outlined in the Readme.

julianoBRL commented 6 months ago

oh i didnt saw that, they are on the fedora section that i skiped it, thanks, it seems to de all good now, right? the visual studio files are all in the build folder.

CMake Warning at external/CMakeLists.txt:6 (find_package):
  By not providing "Findpugixml.cmake" in CMAKE_MODULE_PATH this project has
  asked CMake to find a package configuration file provided by "pugixml", but
  CMake did not find one.

  Could not find a package configuration file provided by "pugixml" with any
  of the following names:

    pugixmlConfig.cmake
    pugixml-config.cmake

  Add the installation prefix of "pugixml" to CMAKE_PREFIX_PATH or set
  "pugixml_DIR" to a directory containing one of the above files.  If
  "pugixml" provides a separate development package or SDK, be sure it has
  been installed.

CMake Deprecation Warning at external/pugixml/CMakeLists.txt:1 (cmake_minimum_required):
  Compatibility with CMake < 3.5 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.

-- Configuring done (8.7s)
-- Generating done (0.2s)
-- Build files have been written to: D:/Projetos/RetroPie/EmulationStation/build
cmitu commented 6 months ago

oh i didnt saw that, they are on the Fedora section that i skiped it ...

Hm, that's not specific to Fedora Linux. We'll make that clearer in the Readme.

julianoBRL commented 6 months ago

okay, thanks for all your help and sorry for the inconvenience