Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove the superbuild and the external projects. #5021

Open
wants to merge 24 commits into
base: dev
Choose a base branch
from

Conversation

teo-tsirpanis
Copy link
Member

@teo-tsirpanis teo-tsirpanis commented May 29, 2024

SC-36913

Historically, the Core's build system has been using CMake external projects to download and build external dependencies, and a "superbuild" architecture to ensure a build order. With the advent of vcpkg, we have stopped building the dependencies ourselves and instead rely on vcpkg (or the "system" in general) to provide them for us. The superbuild has thus became a relic of the past, consisting of only the inner tiledb project when the new system is enabled (formerly by specifying -DTILEDB_VCPKG=ON, now always).

This PR removes the superbuild. TileDB became a regular CMake project, whose targets can be built directly without first building the outer project, and then building the build/tiledb subdirectory. The CI scripts were updated accordingly to not use the subdirectory.

This is inevitably a breaking change in the build system. For starters, local development environment will certainly need to make a clean build after this change. Furthermore, there will need to be changes in build scripts to not build again on the tiledb subdirectory.

For examples of downstream migrations, TileDB-Inc/TileDB-Go#316 uses a make invocation that has a similar effect both with and without the superbuild, and conda-forge/tiledb-feedstock#290 uses a semi-documented CMake option to disable the superbuild (which will have no effect after the superbuild gets removed).

The majority of first-party downstreams (VCF, SOMA, MariaDB, Vector Search, the Python and Java APIs) use the install-tiledb target, which currently is defiend on the superbuild and builds the install target in the inner tiledb project. With this PR the install-tiledb target will be kept for compatibility, but alias to install.

I tried to build VCF with a TileDB external project from this branch, but it fails with an error that will be fixed with #4989. I will try again once that PR gets merged. Never mind, VCF builds with the latest changes.


TYPE: BUILD
DESC: The superbuild architecture of the build system has been removed and TileDB is a regular CMake project. Build commands of the form make && make -C tiledb <targets> will have to be replaced by make <targets>.

@KiterLuc
Copy link
Contributor

Was the breaking change announced in any way?

@teo-tsirpanis
Copy link
Member Author

The change will be announced in the release notes. There is unfortunately no way to gradually introduce it (proposals to first make the superbuild off by default and then remove it were rejected), but at the same time the change is quite simple to migrate.

@teo-tsirpanis teo-tsirpanis force-pushed the teo/remove-superbuild branch 2 times, most recently from ae47237 to ceeb0f5 Compare May 29, 2024 14:15
@KiterLuc
Copy link
Contributor

The change will be announced in the release notes. There is unfortunately no way to gradually introduce it (proposals to first make the superbuild off by default and then remove it were rejected), but at the same time the change is quite simple to migrate.

We probably need to announce removal and then actually do the removal in a couple releases. We cannot ship a release that will break dependencies and then expect them to fix it.

@teo-tsirpanis

This comment was marked as resolved.

@teo-tsirpanis teo-tsirpanis marked this pull request as ready for review May 31, 2024 18:00
@teo-tsirpanis
Copy link
Member Author

Undrafting, regardless of when we will take it, it is finished and ready for review.


Also just built successfully1 libtiledbsoma with just the following change:

diff --git a/libtiledbsoma/cmake/Modules/FindTileDB_EP.cmake b/libtiledbsoma/cmake/Modules/FindTileDB_EP.cmake
index 910fc4e..62bd32a 100644
--- a/libtiledbsoma/cmake/Modules/FindTileDB_EP.cmake
+++ b/libtiledbsoma/cmake/Modules/FindTileDB_EP.cmake
@@ -113,8 +113,8 @@ else()
     else() # Build from source
         ExternalProject_Add(ep_tiledb
           PREFIX "externals"
-          URL "https://github.com/TileDB-Inc/TileDB/archive/2.23.0.zip"
-          URL_HASH SHA1=2acca37618f0a6192ca648930138231476422b96
+          GIT_REPOSITORY "https://github.com/TileDB-Inc/TileDB.git"
+          GIT_TAG teo/remove-superbuild
           DOWNLOAD_NAME "tiledb.zip"
           CMAKE_ARGS
             -DCMAKE_INSTALL_PREFIX=${EP_INSTALL_PREFIX}

Footnotes

  1. With some compile errors because Windows, but configuring has been successful.

With vcpkg this step is unnecessary.
There is little value in doing this, and the configuring with tests disabled is tested in the release worklow.
It handles variations in the target name, and the possibility that no CMake package is available (like in Conda, which should make that Conda patch unnecessary).
It uses the unified `zstd::libzstd` target if available, otherwise a generator expression that chooses between the shared or the static library (in vcpkg only one of them will be available).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants