Commit Graph

351 Commits

Author SHA1 Message Date
Dion Moult 291d7d8441 black . 2026-07-26 18:03:09 +10:00
Andrej730 b37499ddf7 ty: add ignores
(cherry picked from commit 0bad5a9389)
2026-07-25 23:18:33 +10:00
Andrej730 a0556c1124 build-all: ensure all patches are present
Also changed type to just `list[str]` to keep it simple.

(cherry picked from commit 816eba5145)
2026-07-25 23:15:23 +10:00
Andrej730 641becb4e0 build-all: drop unused opencollada pr622 patch
Last reference to this file was dropped in 7ae685dbf, though the ref was
pointing to `/patches/opencollada/pr622.patch`, so IIUC
`patches/pr622.patch` was never used.

(cherry picked from commit c013b9aca7)
2026-07-25 23:15:23 +10:00
Andrej730 647f53163c build-all: drop unused occt patch
Introduced in e21277e80, reference removed
in 683cadeb7 when occt was bumped to 7.3.0 and switched to git-tag based
download.

(cherry picked from commit 24e454ce0c)
2026-07-25 23:15:23 +10:00
Andrej730 6935c631d4 build-all: fix note about the schemas built by default
(cherry picked from commit 5273569b08)
2026-07-25 23:15:23 +10:00
Andrej730 4275b23a27 ifcviewer: fatal_error on missing patchelf instead of warning 2026-07-22 19:01:50 +05:00
Andrej730 9d6e6ddf60 build-all: add error msg on missing art module 2026-07-22 19:01:50 +05:00
Andrej730 d7f9ade853 build-all: fix issue building rocksdb on gcc 15
Example error: `error: ‘uint64_t’ has not been declared uint64_t blob_file_number, uint64_t total_blob_count,`

See https://github.com/facebook/rocksdb/issues/13365
2026-07-22 19:01:49 +05:00
Andrej730 d4f0e66f08 build-all: fix issue on gcc 15
Error was:
```
configure: error: could not find a working compiler, see config.log for details
```

config.log:
```
conftest.c: In function 'f':
conftest.c:12:48: error: too many arguments to function 'g'; expected 0, have 6
   12 | for(i=0;i<1;i++){if(e(got,got,9,d[i].n)==0)h();g(i,d[i].src,d[i].n,got,d[i].want,9);if(d[i].n)h();}}
      |                                                ^ ~
```
2026-07-22 19:01:49 +05:00
Andrej730 2e11208836 build-all: note on BUILD_BONSAIVIEWER 2026-07-22 19:01:49 +05:00
Thomas Krijnen cf05bbd1bb Merge branch 'datamodel-v1.0' into ifcviewer-wgpu 2026-07-03 10:30:16 +02:00
Geert Hesselink 69ae113434 Fix lint failures and add missing pyparsing dependency (#8048)
* unblock voxel schema loading, add test for express

* Apply black formatting

* Fix lint failures and add missing pyparsing dependency

* align ty -> 0.0.34
2026-06-11 18:30:08 +02:00
Andrej730 9003750ea1 build_rocky: use uv to acquire more recent version of Python 2026-06-11 18:25:46 +02:00
Dion Moult 32d9fd6c1c build-all: restore full PYTHON_VERSIONS list
d390911d75 ("build_osx: build BonsaiViewer on macOS via build-all.py",
2026-06-01) accidentally committed a local single-version pin
(`PYTHON_VERSIONS = ["3.11.8"]`) intended only for fast iteration
during macOS bring-up. With macOS / CI green and the Python wrapper
fix from 748b4e72a landed, restore the full multi-version list so
both Rocky and macOS CI publish wrappers for 3.10/3.11/3.12/3.13/3.14
again.

Cost is ~5 from-source Python builds per CI run; the cache-deps
plumbing in nix/cache_dependencies.py already memoises these so
repeated runs only pay it once per Python release bump.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-04 13:04:14 +10:00
Dion Moult b0ef47819f ci: IFCOS_BUILD_PYTHON_WRAPPER env-gate (off for bonsai macOS CI)
# Why this exists

The bonsai macOS CI (`build_osx.yml`, arm64) currently fails the
`IfcOpenShell-Python` smoke test with:

    ImportError: dlopen(.../_ifcopenshell_wrapper.cpython-311-darwin.so,
                       0x0002):
      Library not loaded: @rpath/ifcopenshell.document.rdb.dylib
      Reason: tried: '$ORIGIN/ifcopenshell.document.rdb.dylib'
                     (no such file)

`_ifcopenshell_wrapper.cpython-311-darwin.so` has a hard `LC_LOAD_DYLIB`
of `@rpath/ifcopenshell.document.rdb.dylib` and its only `LC_RPATH` is
`$ORIGIN` (= `site-packages/ifcopenshell/`). The plug-in dylib is not
present at that path on macOS, so the wrapper fails to load and the
build smoke test (`build-all.py: compile_python_wrapper`) errors out.

BonsaiViewer.app builds, installs, and macdeployqt-deploys cleanly
before this point — the failure is downstream and unrelated to wgpu,
BonsaiViewer, or anything else on this branch.

# Where the regression came from

Two commits on the branch line that became `ifcviewer-wgpu`:

  b599ee10 "More work on isolating into plug-ins"   (2026-04-18, Thomas Krijnen)
  b022ca7e7 "Some plug-in work"                     (2026-04-21, Thomas Krijnen)

`b599ee10` added a hard link dep:

    target_link_libraries(ifcopenshell_wrapper PRIVATE document_serializer_rdb)

which bakes `@rpath/ifcopenshell.document.rdb.dylib` into the wrapper's
`LC_LOAD_DYLIB`. `b022ca7e7` added a `if(CREATE_BUNDLE) ...
install(TARGETS ${_ifcopenshell_python_runtime_targets}
LIBRARY DESTINATION "${python_package_dir}/ifcopenshell" ...)` block
that was *intended* to satisfy that link dep by copying plug-ins next
to the wrapper. On macOS arm64 the install rule does not actually
deposit `ifcopenshell.document.rdb.dylib` into
`site-packages/ifcopenshell/`, so the runtime dlopen fails.

# Why 227d85d worked

`227d85d` (2026-05-15) is on the `v0.8.0` line, not on the
`datamodel-v1.0 -> ifcviewer -> ifcviewer-wgpu` line. The merge-base
of `227d85d` and `ifcviewer-wgpu` is `e6258ab4` (2026-04-13). Both
b599ee10 and b022ca7e7 live on the wgpu side of that fork and are not
ancestors of `227d85d`:

    $ git merge-base --is-ancestor b599ee10 227d85d
    [exit 1 — NOT an ancestor]
    $ git merge-base --is-ancestor b599ee10 v0.8.0
    [exit 1 — NOT an ancestor]

So the macOS Python wheel built fine on `v0.8.0` because that branch
never had the plug-in refactor; it has been broken on our branch line
since 2026-04-21. Nobody noticed because nobody had been firing
`build_osx.yml` against this branch line until this week's bonsai CI
work.

# What this commit does

Adds an `IFCOS_BUILD_PYTHON_WRAPPER` env var to `nix/build-all.py`.
Defaulting to `on` preserves existing behaviour everywhere; setting
it to `off` (or `0`/`false`/`no`) drops `IfcOpenShell-Python` from
the target set so `build-all.py` skips the wrapper build + smoke
test entirely.

`build_osx.yml` sets `IFCOS_BUILD_PYTHON_WRAPPER=off` so the bonsai
macOS CI can complete and upload `BonsaiViewer.app` while the plug-in
install rule is broken.

# What Thomas should do

Once the install rule in `src/ifcwrap/CMakeLists.txt` (the
`if(CREATE_BUNDLE) ... install(TARGETS ${_ifcopenshell_python_runtime_targets}
LIBRARY DESTINATION "${python_package_dir}/ifcopenshell" ...)` block,
added in b022ca7e7) is fixed to actually drop
`ifcopenshell.document.rdb.dylib` next to the wrapper in
site-packages on macOS — this commit can be reverted in its entirety:
the env-gate in `build-all.py` AND the `IFCOS_BUILD_PYTHON_WRAPPER=off`
in `build_osx.yml`. The bonsai macOS workflow will then build the
Python wrapper too.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-02 09:06:28 +10:00
Dion Moult d390911d75 build_osx: build BonsaiViewer on macOS via build-all.py
Linux (build_rocky.yml) and Windows (win/build-all-win.py) already pass
BUILD_BONSAIVIEWER=ON when building from source; macOS was the odd one
out. Three small changes to bring it up to parity:

1. .github/workflows/build_osx.yml — \`brew install qt\` (Qt6 with Svg)
   in the Install Dependencies step, then set QT_DIR=\$(brew --prefix
   qt) and BUILD_BONSAIVIEWER=ON in the Run Build Script env.

2. nix/build-all.py — install_qt6() now honours a pre-set QT_DIR.
   Before this change get_qt6_aqt_config() raised on non-Linux,
   blocking bonsai builds on macOS/Windows from ever using a
   system-provided Qt6. We now validate that QT_DIR points at a real
   Qt6 install (probes lib/cmake/Qt6/Qt6Config.cmake) and skip the aqt
   download path if so. Linux flow is unchanged: when QT_DIR is unset
   the function falls through to the existing aqtinstall path.

build_osx.yml stays workflow_dispatch-only — slow run (~1h with
ccache, longer cold), so manual fire when wanted. Cherry-pick this
file + nix/build-all.py to v0.8.0 to make the workflow dispatchable
against the ifcviewer-wgpu branch before the squash lands.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-01 18:41:39 +10:00
Dion Moult de7520418b Build the Bonsai Viewer in CI with the Autodesk connector bundled
Compile the Bonsai Viewer as part of the Linux and Windows binary builds,
and ship the Autodesk connector alongside the viewer executable.

Qt6 dependencies:
- The viewer links Qt6::Svg for runtime icon tinting. Svg is a separate
  base-Qt archive, so aqt now installs "qtbase qtsvg" (plus icu on Linux)
  rather than qtbase alone, on both Linux and Windows.
- Qt6::CorePrivate is exposed differently across Qt versions: Qt 6.8 ships
  the target inside Qt6Core, while Qt 6.10 provides it only as a separate
  CorePrivate config package. The viewer CMakeLists requests it via
  OPTIONAL_COMPONENTS so it resolves on both.
- When cross-compiling Windows ARM64, windeployqt runs from the host x64
  Qt, so qtsvg is installed into the host Qt as well.

Windows build:
- build-all-win.py passed -DBUILD_IFCVIEWER, a flag since renamed to
  BUILD_BONSAIVIEWER, so the Windows build compiled no viewer at all. It
  now passes -DBUILD_BONSAIVIEWER.
- The Autodesk connector is bundled under connectors/ next to
  BonsaiViewer.exe in the packaged archive, mirroring the Linux builds.
- The Windows workflow builds the connector (PyInstaller) before the main
  build so it is available to bundle.

Connector bundling:
- The Linux rocky workflows build the connector and bundle it into the
  BonsaiViewer archive; the Windows build now does the same.

Generated with the assistance of an AI coding tool.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-25 16:34:19 +10:00
Dion Moult bb17cfbc40 Rename Bonsai Viewer build option
Replace the old IFC viewer build switch with BUILD_BONSAIVIEWER in CMake, the Linux workflows, and the nix build script.

Generated with the assistance of an AI coding tool.
2026-05-25 16:34:19 +10:00
Thomas Krijnen 210861eda1 Strip to try and get back some file size increase 2026-05-10 16:54:30 +02:00
Thomas Krijnen 05e328339f Try again with Qt install on Rocky 2026-05-10 13:44:58 +02:00
Thomas Krijnen 44ba6e8963 Untested build script updates for qt and viewer app 2026-05-09 21:59:58 +02:00
Thomas Krijnen 3c773d71d3 If it's an EMSCRIPTEN build, we're not done 2026-05-09 20:08:28 +02:00
Thomas Krijnen 43f5a79f99 Try with manifold on again 2026-05-08 20:47:16 +02:00
Thomas Krijnen 554c7174e3 Backspace everything regarding HDF5 2026-05-08 16:20:26 +02:00
Thomas Krijnen 5c6444d5ea [tmp] disable manifodl 2026-04-25 11:41:43 +02:00
Thomas Krijnen 40267aa068 Revert some tmp changes 2026-04-25 11:13:56 +02:00
Thomas Krijnen ddfe3bce20 Fixes for WASM build (some temporary) 2026-04-24 13:36:06 +02:00
Thomas Krijnen cb7e7331e6 CREATE_BUNDLE=On to copy .so 2026-04-21 21:48:15 +02:00
Thomas Krijnen 4850e2a07c add manifold to build-all.py 2026-04-21 21:47:38 +02:00
Thomas Krijnen d448fa95e3 build-all.py use single build dir 2026-04-19 10:21:23 +02:00
Thomas Krijnen e067c2b834 build-all BUILD_SHARED_LIBS tweak 2026-04-18 21:43:36 +02:00
Thomas Krijnen e2905d6f0e BUILD_SHARED_LIBS=On 2026-04-18 21:32:32 +02:00
Andrej730 7788ae86c9 build-all.py: descriptive error for missing SSL support 2026-04-13 16:23:41 +05:00
Andrej730 6242251d3c Fix typo 2026-04-10 16:22:04 +05:00
Andrej730 7bdc1b6a75 cache_dependencies - skip ifcopenshell dir when packing 2026-03-18 11:01:38 +05:00
Andrej730 92c979fbbf black . 2026-02-27 14:52:55 +05:00
Andrej730 be4806471d cache_dependencies - use tar instead of tarfile for archiving 2026-02-26 17:12:55 +05:00
Andrej730 7909997d42 build workflows - reuse cache_dependencies.py 2026-02-26 17:12:54 +05:00
Andrej730 fc7d15324f build-all - don't use main repo pyproject.toml for wasm builds 2026-02-26 17:12:54 +05:00
Andrej730 f8f4725054 build-all - remove wasm cxx flags workaround
As issue is now fixed upstream (https://github.com/pyodide/pyodide-build/issues/251)
2026-02-26 17:12:54 +05:00
Andrej730 fb1c9eb7e3 build-all - fix missing f-string 2026-02-26 17:12:45 +05:00
Andrej730 a61d5a12fb build-all - use cmake to build swig
To keep it in sync with Windows build. Also Removed pcre2 dependency as apparently it's not required - we were not using it on Windows.
2026-02-26 17:12:45 +05:00
Andrej730 e54d16ef57 build_osx - ensure we use bison from brew instead of the default one 2026-02-26 17:12:45 +05:00
Andrej730 6492fdeb05 build-all - add zlib and openssl to RHEL packages 2026-02-26 17:12:44 +05:00
Andrej730 8eb0641e70 build-all - mention zlib requirement 2026-02-26 17:12:44 +05:00
Andrej730 6face696cb build-all - use cmake arg instead of a patch to disable ExpToCasExe 2026-02-26 17:12:42 +05:00
Andrej730 d43b9ee353 build-all - ensure Python was built with openssl 2026-02-26 17:01:56 +05:00
Andrej730 5ea4290920 build-all - ensure bison is installed 2026-02-26 17:01:56 +05:00
Andrej730 c8ca904333 build-all - distinct command and path in logs 2026-02-26 17:01:56 +05:00