revert: clean up failed Linux build fix attempts (PR #157-#192)

Reverts all changes from PR #157 through #192 which were attempts
to fix the Linux build (graphite2 hidden symbols, ICU version
mismatch, linker compatibility).

Restores main to the state after PR #156 (tauri API version fix).
The Linux build issue will be addressed separately with a proper
solution.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Hanjin Bae 2026-06-09 23:27:57 +09:00
parent 5795e694ed
commit 958b4b39e5
8 changed files with 856 additions and 699 deletions

View file

@ -1,48 +0,0 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 496712d..3df05c7 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -82,10 +82,12 @@ if (BUILD_SHARED_LIBS)
endif()
add_subdirectory(src)
-add_subdirectory(tests)
-add_subdirectory(doc)
-if (NOT GRAPHITE2_NFILEFACE)
- add_subdirectory(gr2fonttest)
+if(NOT DISABLE_TESTS)
+ add_subdirectory(tests)
+ add_subdirectory(doc)
+ if (NOT GRAPHITE2_NFILEFACE)
+ add_subdirectory(gr2fonttest)
+ endif()
endif()
set(version 3.0.1)
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index b6ac26b..851a97f 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -127,9 +127,9 @@ if (${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
endif ()
endif()
include(Graphite)
- if (BUILD_SHARED_LIBS)
+ if (NOT DISABLE_TESTS)
nolib_test(stdc++ $<TARGET_SONAME_FILE:graphite2>)
- endif ()
+ endif()
set(CMAKE_CXX_IMPLICIT_LINK_LIBRARIES "")
CREATE_LIBTOOL_FILE(graphite2 "/lib${LIB_SUFFIX}")
endif()
@@ -144,7 +144,9 @@ if (${CMAKE_SYSTEM_NAME} STREQUAL "Darwin")
endif()
target_link_libraries(graphite2 c)
include(Graphite)
- nolib_test(stdc++ $<TARGET_SONAME_FILE:graphite2>)
+ if (NOT DISABLE_TESTS)
+ nolib_test(stdc++ $<TARGET_SONAME_FILE:graphite2>)
+ endif()
set(CMAKE_CXX_IMPLICIT_LINK_LIBRARIES "")
CREATE_LIBTOOL_FILE(graphite2 "/lib${LIB_SUFFIX}")
endif()

View file

@ -1,40 +0,0 @@
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO silnrsi/graphite
REF 92f59dcc52f73ce747f1cdc831579ed2546884aa # 1.3.14
SHA512 011855576124b2f9ae9d7d3a0dfc5489794cf82b81bebc02c11c9cca350feb9fbb411844558811dff1ebbacac58a24a7cf56a374fc2c27e97a5fb4795a01486e
HEAD_REF master
PATCHES disable-tests.patch
)
# Fix symbol visibility for static builds:
# 1. Remove -fvisibility=hidden from COMPILE_FLAGS (target property overrides CMAKE_*_FLAGS)
# 2. Add GRAPHITE2_EXPORTING so GR2_API = visibility("default") even in static builds
file(READ "${SOURCE_PATH}/src/CMakeLists.txt" _src_cmake)
string(REPLACE "-fvisibility=hidden" "" _src_cmake "${_src_cmake}")
string(REPLACE "-fvisibility-inlines-hidden" "" _src_cmake "${_src_cmake}")
string(REPLACE "add_definitions(-DGRAPHITE2_STATIC)" "add_definitions(-DGRAPHITE2_STATIC)\n add_definitions(-DGRAPHITE2_EXPORTING)" _src_cmake "${_src_cmake}")
file(WRITE "${SOURCE_PATH}/src/CMakeLists.txt" "${_src_cmake}")
vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
OPTIONS
-DDISABLE_TESTS=ON
)
vcpkg_cmake_install()
vcpkg_copy_pdbs()
vcpkg_cmake_config_fixup()
vcpkg_fixup_pkgconfig()
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
# Do NOT replace with "1" keep the original check so GRAPHITE2_EXPORTING
# takes effect and GR2_API = visibility("default")
message(STATUS "graphite2 overlay: keeping GRAPHITE2_STATIC check in Types.h (GRAPHITE2_EXPORTING overrides)")
endif()
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
file(REMOVE "${CURRENT_PACKAGES_DIR}/lib/libgraphite2.la" "${CURRENT_PACKAGES_DIR}/debug/lib/libgraphite2.la")
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/COPYING" "${SOURCE_PATH}/LICENSE")

View file

@ -1,11 +0,0 @@
{
"name": "graphite2",
"version": "1.3.14",
"port-version": 100,
"description": "Graphite2 with default symbol visibility (overlay port)",
"homepage": "https://github.com/silnrsi/graphite",
"dependencies": [
{ "name": "vcpkg-cmake", "host": true },
{ "name": "vcpkg-cmake-config", "host": true }
]
}

View file

@ -436,7 +436,7 @@ jobs:
# Linux
# ──────────────────────────────────────────────
build-linux:
runs-on: ubuntu-24.04
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
with:
@ -449,29 +449,22 @@ jobs:
libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf \
autoconf autoconf-archive automake libtool pkg-config
# Static linking via vcpkg with overlay port for graphite2.
# The overlay rebuilds graphite2 with -fvisibility=default so symbols
# are exported properly in static libs (fixes rust-lld hidden symbol errors).
# Static linking via vcpkg — avoids runtime dependency on system ICU/harfbuzz.
# Without this, the binary links against the build host's libicuuc.so.70
# (Ubuntu 22.04) and fails on distros shipping newer ICU (e.g. Ubuntu 25.10
# with libicuuc.so.76). Mirrors the macOS approach (commit 9566956).
- name: Setup vcpkg
run: |
git clone --depth 1 https://github.com/microsoft/vcpkg $HOME/vcpkg
$HOME/vcpkg/bootstrap-vcpkg.sh
echo "VCPKG_ROOT=$HOME/vcpkg" >> $GITHUB_ENV
# Create custom static triplet for Linux
cat > $HOME/vcpkg/triplets/community/x64-linux-static.cmake <<'TRIPLET'
set(VCPKG_TARGET_ARCHITECTURE x64)
set(VCPKG_CRT_LINKAGE dynamic)
set(VCPKG_LIBRARY_LINKAGE static)
set(VCPKG_CMAKE_SYSTEM_NAME Linux)
TRIPLET
- name: Restore vcpkg cache
id: vcpkg-cache
uses: actions/cache/restore@v4
with:
path: ~/vcpkg/installed
key: vcpkg-linux-static-overlay-v1
key: vcpkg-linux-x64-v1
- name: Install Linux dependencies (vcpkg)
if: steps.vcpkg-cache.outputs.cache-hit != 'true'
@ -479,18 +472,17 @@ jobs:
VCPKG_BINARY_SOURCES: "clear"
run: |
$HOME/vcpkg/vcpkg install \
--overlay-ports=$GITHUB_WORKSPACE/.github/vcpkg-overlays \
"harfbuzz[graphite2]:x64-linux-static" \
fontconfig:x64-linux-static \
freetype:x64-linux-static \
icu:x64-linux-static
"harfbuzz[graphite2]:x64-linux" \
fontconfig:x64-linux \
freetype:x64-linux \
icu:x64-linux
- name: Save vcpkg cache
if: steps.vcpkg-cache.outputs.cache-hit != 'true'
uses: actions/cache/save@v4
with:
path: ~/vcpkg/installed
key: vcpkg-linux-static-overlay-v1
key: vcpkg-linux-x64-v1
- uses: dtolnay/rust-toolchain@stable
with:
@ -508,27 +500,12 @@ jobs:
- run: pnpm install
- name: Debug ICU symbols
run: |
echo "=== ICU version in headers ==="
grep U_ICU_VERSION_SUFFIX $HOME/vcpkg/installed/x64-linux-static/include/unicode/uvernum.h || echo "NOT FOUND in static"
grep U_ICU_VERSION_SUFFIX $HOME/vcpkg/installed/x64-linux/include/unicode/uvernum.h 2>/dev/null || echo "NOT FOUND in dynamic"
echo "=== Symbols in static libicuuc.a ==="
nm $HOME/vcpkg/installed/x64-linux-static/lib/libicuuc.a 2>/dev/null | grep "T ubrk_open" | head -5 || echo "NO ubrk_open in static"
echo "=== Symbols in static libicui18n.a ==="
nm $HOME/vcpkg/installed/x64-linux-static/lib/libicui18n.a 2>/dev/null | grep "T ubidi" | head -5 || echo "NO ubidi in static"
echo "=== U_DISABLE_RENAMING ==="
grep -r "U_DISABLE_RENAMING" $HOME/vcpkg/installed/x64-linux-static/include/unicode/uconfig.h | head -3 || echo "NOT FOUND"
echo "=== All ICU static libs ==="
ls -la $HOME/vcpkg/installed/x64-linux-static/lib/libicu* 2>/dev/null || echo "NO LIBS"
- name: Build Tauri app
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
ZOTERO_CONSUMER_KEY: ${{ secrets.ZOTERO_CONSUMER_KEY }}
ZOTERO_CONSUMER_SECRET: ${{ secrets.ZOTERO_CONSUMER_SECRET }}
TECTONIC_DEP_BACKEND: vcpkg
VCPKGRS_TRIPLET: x64-linux-static
CXXFLAGS: "-std=c++17"
CFLAGS: ""
run: pnpm --filter @claude-prism/desktop tauri build --target x86_64-unknown-linux-gnu

1
.gitignore vendored
View file

@ -31,6 +31,7 @@ tsconfig.tsbuildinfo
*.tsbuildinfo
# Rust
Cargo.lock
apps/desktop/src-tauri/.cargo/config.toml
# Tauri auto-generated schemas

File diff suppressed because it is too large Load diff

View file

@ -35,10 +35,7 @@
"serialize-javascript": ">=6.0.3",
"undici": ">=7.24.0",
"flatted": ">=3.4.0",
"hono": ">=4.12.7",
"ws": ">=8.20.1",
"postcss": ">=8.5.10",
"uuid": ">=11.1.1"
"hono": ">=4.12.7"
}
}
}

48
pnpm-lock.yaml generated
View file

@ -10,9 +10,6 @@ overrides:
undici: '>=7.24.0'
flatted: '>=3.4.0'
hono: '>=4.12.7'
ws: '>=8.20.1'
postcss: '>=8.5.10'
uuid: '>=11.1.1'
importers:
@ -2753,8 +2750,8 @@ packages:
resolution: {integrity: sha512-WWdIxpyjEn+FhQJQQv9aQAYlHoNVdzIzUySNV1gHUPDSdZJ3yZn7pAAbQcV7B56Mvu881q9FZV+0Vx2xC44VWA==}
engines: {node: ^18.17.0 || >=20.5.0}
nanoid@3.3.12:
resolution: {integrity: sha512-ZB9RH/39qpq5Vu6Y+NmUaFhQR6pp+M2Xt76XBnEwDaGcVAqhlvxrl3B2bKS5D3NH3QR76v3aSrKaF/Kiy7lEtQ==}
nanoid@3.3.11:
resolution: {integrity: sha512-N8SpfPUnUp1bK+PMYW8qSWdl9U+wwNWI4QKxOYDy9JAro3WMX7p2OeVRF9v+347pnakNevPmiHhNmZ2HbFA76w==}
engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1}
hasBin: true
@ -2795,8 +2792,12 @@ packages:
resolution: {integrity: sha512-QP88BAKvMam/3NxH6vj2o21R6MjxZUAd6nlwAS/pnGvN9IVLocLHxGYIzFhg6fUQ+5th6P4dv4eW9jX3DSIj7A==}
engines: {node: '>=12'}
postcss@8.5.15:
resolution: {integrity: sha512-FfR8sjd4em2T6fb3I2MwAJU7HWVMr9zba+enmQeeWFfCbm+UOC/0X4DS8XtpUTMwWMGbjKYP7xjfNekzyGmB3A==}
postcss@8.5.6:
resolution: {integrity: sha512-3Ybi1tAuwAP9s0r1UQ2J4n5Y0G05bJkpUIO0/bI9MhwmD70S5aTWbXGBwxHrelT+XM1k6dM0pk+SwNkpTRN7Pg==}
engines: {node: ^10 || ^12 || >=14}
postcss@8.5.8:
resolution: {integrity: sha512-OW/rX8O/jXnm82Ey1k44pObPtdblfiuWnrd8X7GJ7emImCOstunGbXUpp7HdBrFQX6rJzn3sPT397Wp5aCwCHg==}
engines: {node: ^10 || ^12 || >=14}
property-information@7.1.0:
@ -3147,8 +3148,9 @@ packages:
peerDependencies:
react: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0
uuid@14.0.0:
resolution: {integrity: sha512-Qo+uWgilfSmAhXCMav1uYFynlQO7fMFiMVZsQqZRMIXp0O7rR7qjkj+cPvBHLgBqi960QCoo/PH2/6ZtVqKvrg==}
uuid@10.0.0:
resolution: {integrity: sha512-8XkAphELsDnEGrDxUOHB3RGvXz6TeuYSGEZBOjtTtPm2lwhGBjLgOzLHB63IUWfBpNucQjND6d3AOudO+H3RWQ==}
deprecated: uuid@10 and below is no longer supported. For ESM codebases, update to uuid@latest. For CommonJS codebases, use uuid@11 (but be aware this version will likely be deprecated in 2028).
hasBin: true
vaul@1.1.2:
@ -3286,8 +3288,8 @@ packages:
resolution: {integrity: sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==}
engines: {node: '>=10'}
ws@8.21.0:
resolution: {integrity: sha512-Vsp28b7DRcimFQvrqu2Wek3z1iYxDCWqHYB8Qsnk/S4RfaCQzPGPyBNuVjJV3cd6UiKtUtp6sNM77gWvzcCH+g==}
ws@8.19.0:
resolution: {integrity: sha512-blAT2mjOEIi0ZzruJfIhb3nps74PRWTCz1IjglWEEpQl5XS/UNama6u2/rjFkDDouqr4L67ry+1aGIALViWjDg==}
engines: {node: '>=10.0.0'}
peerDependencies:
bufferutil: ^4.0.1
@ -4923,7 +4925,7 @@ snapshots:
'@alloc/quick-lru': 5.2.0
'@tailwindcss/node': 4.1.18
'@tailwindcss/oxide': 4.1.18
postcss: 8.5.15
postcss: 8.5.6
tailwindcss: 4.1.18
'@tauri-apps/api@2.11.0': {}
@ -5551,7 +5553,7 @@ snapshots:
whatwg-encoding: 3.1.1
whatwg-mimetype: 4.0.0
whatwg-url: 14.2.0
ws: 8.21.0
ws: 8.19.0
xml-name-validator: 5.0.0
transitivePeerDependencies:
- bufferutil
@ -6032,7 +6034,7 @@ snapshots:
mute-stream@2.0.0:
optional: true
nanoid@3.3.12: {}
nanoid@3.3.11: {}
next-themes@0.4.6(react-dom@19.2.3(react@19.2.3))(react@19.2.3):
dependencies:
@ -6071,9 +6073,15 @@ snapshots:
picomatch@4.0.4: {}
postcss@8.5.15:
postcss@8.5.6:
dependencies:
nanoid: 3.3.12
nanoid: 3.3.11
picocolors: 1.1.1
source-map-js: 1.2.1
postcss@8.5.8:
dependencies:
nanoid: 3.3.11
picocolors: 1.1.1
source-map-js: 1.2.1
@ -6539,7 +6547,7 @@ snapshots:
dependencies:
react: 19.2.3
uuid@14.0.0: {}
uuid@10.0.0: {}
vaul@1.1.2(@types/react-dom@19.2.3(@types/react@19.2.10))(@types/react@19.2.10)(react-dom@19.2.3(react@19.2.3))(react@19.2.3):
dependencies:
@ -6570,7 +6578,7 @@ snapshots:
'@rollup/plugin-virtual': 3.0.2(rollup@4.60.1)
'@swc/core': 1.15.21
'@swc/wasm': 1.15.21
uuid: 14.0.0
uuid: 10.0.0
vite: 6.4.2(@types/node@25.0.10)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.16.9)(tsx@4.21.0)(yaml@2.8.2)
transitivePeerDependencies:
- '@swc/helpers'
@ -6581,7 +6589,7 @@ snapshots:
esbuild: 0.25.12
fdir: 6.5.0(picomatch@4.0.4)
picomatch: 4.0.4
postcss: 8.5.15
postcss: 8.5.8
rollup: 4.60.1
tinyglobby: 0.2.15
optionalDependencies:
@ -6661,7 +6669,7 @@ snapshots:
strip-ansi: 6.0.1
optional: true
ws@8.21.0: {}
ws@8.19.0: {}
xml-name-validator@5.0.0: {}