Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
uses: actions/cache@v4
with:
path: deps/occt-install
key: occt-8.0.0-rc5-windows-x64-${{ hashFiles('scripts/build-occt-deps.sh') }}
key: occt-8.0.0-windows-x64-${{ hashFiles('scripts/build-occt-deps.sh') }}

- name: Build OCCT dependencies
if: steps.cache-occt.outputs.cache-hit != 'true'
Expand Down Expand Up @@ -59,7 +59,7 @@ jobs:
uses: actions/cache@v4
with:
path: deps/occt-install
key: occt-8.0.0-rc5-macos-arm64-${{ hashFiles('scripts/build-occt-deps.sh') }}
key: occt-8.0.0-macos-arm64-${{ hashFiles('scripts/build-occt-deps.sh') }}

- name: Build OCCT dependencies
if: steps.cache-occt.outputs.cache-hit != 'true'
Expand Down Expand Up @@ -100,7 +100,7 @@ jobs:
uses: actions/cache@v4
with:
path: deps/occt-install
key: occt-8.0.0-rc5-linux-x64-${{ hashFiles('scripts/build-occt-deps.sh') }}
key: occt-8.0.0-linux-x64-${{ hashFiles('scripts/build-occt-deps.sh') }}

- name: Build OCCT dependencies
if: steps.cache-occt.outputs.cache-hit != 'true'
Expand Down
4 changes: 2 additions & 2 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,9 @@ On headless Linux the viewer test needs `xvfb-run ctest …`. CI on all three pl

## OCCT dependency

`scripts/build-occt-deps.sh` clones OCCT at tag `V8_0_0_beta1` from `Open-Cascade-SAS/OCCT` and builds it as **static** libraries with a curated module subset (DataExchange, FoundationClasses, ModelingAlgorithms, ModelingData, Visualization). FreeType, FreeImage, RapidJSON, TBB, VTK, Draco, FFmpeg, OpenVR, Tcl are all disabled to keep the dependency minimal. Linux builds add `USE_XLIB=ON`. The script tolerates executable-link failures (`|| true`) because we only need the static `.a`/`.lib` files.
`scripts/build-occt-deps.sh` clones OCCT at tag `V8_0_0` from `Open-Cascade-SAS/OCCT` and builds it as **static** libraries with a curated module subset (DataExchange, FoundationClasses, ModelingAlgorithms, ModelingData, Visualization). FreeType, FreeImage, RapidJSON, TBB, VTK, Draco, FFmpeg, OpenVR, Tcl are all disabled to keep the dependency minimal. Linux builds add `USE_XLIB=ON`. The script tolerates executable-link failures (`|| true`) because we only need the static `.a`/`.lib` files.

**Known build quirk (rc5/beta1):** OCCT 8.0.0's generated Makefiles intermittently skip the `mkdir` for object subdirectories (e.g. `TKShHealing.dir/ShapeAlgo/`, `ShapeProcessAPI/`) under high `-j` parallelism, causing `error: unable to open output file ... 'No such file or directory'`. Workaround: re-run `cmake --build . --parallel N` from inside `deps/occt-build` until it converges, or pre-create the missing subdirs with `mkdir -p`. The script does not yet auto-recover from this, so a fresh clean build may need 1–2 retries.
**Known build quirk (rc5/beta1/final):** OCCT 8.0.0's generated Makefiles intermittently skip the `mkdir` for object subdirectories (e.g. `TKShHealing.dir/ShapeAlgo/`, `ShapeProcessAPI/`) under high `-j` parallelism, causing `error: unable to open output file ... 'No such file or directory'`. Workaround: re-run `cmake --build . --parallel N` from inside `deps/occt-build` until it converges, or pre-create the missing subdirs with `mkdir -p`. The script does not yet auto-recover from this, so a fresh clean build may need 1–2 retries.

`CMakeLists.txt` searches `${OCCT_INSTALL_DIR}` for headers under `include/opencascade`, `include`, or Windows-style `inc/`; libraries under `lib/` or `win64/vc14/lib/`. The required toolkit list is hand-maintained at `OCCT_LIBS`. **Linux linking** wraps these archives in `-Wl,--start-group … -Wl,--end-group` because OCCT's static archives have circular dependencies — adding a new `TK*` toolkit on Linux often surfaces as an unresolved-symbol error rather than a missing-library error; check the OCCT_LIBS list first. macOS/Windows do not need the group wrapping.

Expand Down
13 changes: 3 additions & 10 deletions scripts/build-occt-deps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,7 @@
set -e

OCCT_VERSION="8.0.0"
# Use beta1 (feature-frozen 2026-04-30; final 8.0.0 planned 2026-05-07).
# Switch to "" once the final V8_0_0 tag is published.
OCCT_RC="beta1"
OCCT_RC=""
# Pre-release tags use format V8_0_0_rc5 / V8_0_0_beta1; release uses V8_0_0
if [ -n "$OCCT_RC" ]; then
OCCT_TAG="V${OCCT_VERSION//./_}_${OCCT_RC}"
Expand Down Expand Up @@ -74,13 +72,8 @@ cd "$DEPS_DIR"

if [ ! -d "occt-src" ]; then
echo ">>> Downloading OCCT source..."
if [ -n "$OCCT_RC" ]; then
git clone --depth 1 --branch "$OCCT_TAG" \
https://github.com/Open-Cascade-SAS/OCCT.git occt-src
else
git clone --depth 1 --branch "$OCCT_TAG" \
https://git.dev.opencascade.org/repos/occt.git occt-src
fi
git clone --depth 1 --branch "$OCCT_TAG" \
https://github.com/Open-Cascade-SAS/OCCT.git occt-src
else
echo ">>> OCCT source already exists, skipping download"
fi
Expand Down
Loading