You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
cmake fails to find hunspell when RSTUDIO_USE_SYSTEM_DEPENDENCIES is set #15965
RStudio Edition : Desktop
RStudio Version : 2024.12.1+563-348-g85132dda1e
OS Version : FreeBSD 14.2
Steps to reproduce the problem
Configure with -DRSTUDIO_USE_SYSTEM_DEPENDENCIES=ON
Describe the problem in detail
CMake Error at src/cpp/ext/CMakeLists.txt:185 (find_package):
By not providing "Findhunspell.cmake" in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by "hunspell",
but CMake did not find one.
Could not find a package configuration file provided by "hunspell"
(requested version 1.7.2) with any of the following names:
hunspellConfig.cmake
hunspell-config.cmake
Add the installation prefix of "hunspell" to CMAKE_PREFIX_PATH or set
"hunspell_DIR" to a directory containing one of the above files. If
"hunspell" provides a separate development package or SDK, be sure it has
been installed.
Call Stack (most recent call first):
src/cpp/ext/CMakeLists.txt:222 (fetch)
The latest version 1.7.2 of hunspell doesn't install cmake files.
It only installs a .pc file.
PkgConfig should be used to find it.
@kevinushey , @gtritchie
This is related to the fix for this issue: #15927
It wasn't completely fixed, at least hunspell is outstanding.
#19239 partially addresses this. With it, RSTUDIO_USE_SYSTEM_DEPENDENCIES=ON no longer calls find_package(hunspell): Hunspell is always built from source, as are dtl and websocketpp, since an installed package can't satisfy them either. Using an installed Hunspell (e.g. via pkg-config) still isn't supported, so this issue stays open.
For builds that can't download during configure, FetchContent can be pointed at pre-fetched sources:
Activity
kevinushey commentedon May 5, 2025
To fix this, I think we'll need to include
Findhunspell.cmakefile in RStudio, as the issue suggests.Pass system package include dirs out of fetch()
Report always-fetched dependencies as STATUS, not WARNING
Add NEWS entry for RSTUDIO_USE_SYSTEM_DEPENDENCIES fixes
gtritchie commentedon Oct 24, 2026
#19239 partially addresses this. With it,
RSTUDIO_USE_SYSTEM_DEPENDENCIES=ONno longer callsfind_package(hunspell): Hunspell is always built from source, as are dtl and websocketpp, since an installed package can't satisfy them either. Using an installed Hunspell (e.g. via pkg-config) still isn't supported, so this issue stays open.For builds that can't download during configure, FetchContent can be pointed at pre-fetched sources:
Each directory should hold the sources at the
REVISIONpinned for that dependency insrc/cpp/ext/CMakeLists.txt. Note that websocketpp comes from the fork at https://github.com/amini-allight/websocketpp, not upstream.This needs #19239. On current main,
RSTUDIO_USE_SYSTEM_DEPENDENCIES=ONstill fails atfind_package(hunspell)before these settings take effect.Alias gtest to an installed GTest::gtest
Alias libgit2package to an installed libgit2::libgit2package
Narrow the system-dependencies NEWS entry to what changed
Fix `RSTUDIO_USE_SYSTEM_DEPENDENCIES` (#19239)