Skip to content

Commit 4c951b7

Browse files
Fix native CI: let cmake find system libs with leanc sysroot
leanc's custom sysroot prevents cmake from finding system libraries like libuuid, causing FetchContent'd libzmq to fail. Add CMAKE_FIND_ROOT_PATH_MODE_*=BOTH so cmake searches both the sysroot and standard system paths.
1 parent e7d236a commit 4c951b7

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

.github/workflows/ci.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@ jobs:
2626
run: |
2727
sudo apt-get update
2828
sudo apt-get install -y cmake build-essential nlohmann-json3-dev \
29-
libzmq3-dev uuid-dev libssl-dev python3 python3-pip
29+
libzmq3-dev uuid-dev libssl-dev python3 python3-pip \
30+
clang libc++-dev libc++abi-dev
3031
3132
- name: Install Lean via elan
3233
run: |
@@ -44,7 +45,10 @@ jobs:
4445
cmake -S . -B build-cmake \
4546
-DCMAKE_C_COMPILER=leanc \
4647
-DCMAKE_CXX_COMPILER=leanc \
47-
-DCMAKE_TRY_COMPILE_TARGET_TYPE=STATIC_LIBRARY
48+
-DCMAKE_TRY_COMPILE_TARGET_TYPE=STATIC_LIBRARY \
49+
-DCMAKE_FIND_ROOT_PATH_MODE_LIBRARY=BOTH \
50+
-DCMAKE_FIND_ROOT_PATH_MODE_INCLUDE=BOTH \
51+
-DCMAKE_FIND_ROOT_PATH_MODE_PACKAGE=BOTH
4852
cmake --build build-cmake
4953
5054
- name: Build Lean kernel

0 commit comments

Comments
 (0)