Skip to content

Conversation

JanWielemaker
Copy link
Contributor

Updates RocksDB package as well. This updates RocksDB itself and hopefully fixes #16167 (comment).

Updates RocksDB package as well.
@JanWielemaker JanWielemaker requested a review from a team as a code owner October 11, 2025 14:09

This comment has been minimized.

@yosifkit
Copy link
Member

Unfortunately, the rocksdb bump wasn't enough; it is still getting build errors (I think related to avx512): https://doi-janky.infosiftr.net/job/wip/job/test-pr/157/console

@tianon
Copy link
Member

tianon commented Oct 13, 2025

Looks like maybe https://github.com/facebook/rocksdb/blob/04c085a3faab360747615fb9975495bfa5a3360a/INSTALL.md?plain=1#L23-L31 is relevant?

  • By default the binary we produce is optimized for the CPU you're compiling on
    (-march=native or the equivalent). To build a binary compatible with the most
    general architecture supported by your CPU and compiler, set PORTABLE=1 for
    the build, but performance will suffer as many operations benefit from newer
    and wider instructions. In addition to PORTABLE=0 (default) and PORTABLE=1,
    it can be set to an architecture name recognized by your compiler. For example,
    on 64-bit x86, a reasonable compromise is PORTABLE=haswell which supports
    many or most of the available optimizations while still being compatible with
    most processors made since roughly 2013.

Copy link

Diff for 632414f:
diff --git a/_bashbrew-cat b/_bashbrew-cat
index db2146b..aba3cbf 100644
--- a/_bashbrew-cat
+++ b/_bashbrew-cat
@@ -1,10 +1,10 @@
 Maintainers: Jan Wielemaker <[email protected]> (@JanWielemaker), Dave Curylo <[email protected]> (@ninjarobot)
 Architectures: amd64, arm32v7, arm64v8
 GitRepo: https://github.com/SWI-Prolog/docker-swipl.git
-GitCommit: 51e839d7ea84489bbbcfb48c51e13ee9d5621340
+GitCommit: d4411aa88faba036ab47f95f744f77b4fec6749d
 
-Tags: latest, 9.3.31
-Directory: 9.3.31/bookworm
+Tags: latest, 9.3.32
+Directory: 9.3.32/bookworm
 
 Tags: stable, 9.2.9
 Directory: 9.2.9/bookworm
diff --git a/_bashbrew-list b/_bashbrew-list
index a33aba4..9feb517 100644
--- a/_bashbrew-list
+++ b/_bashbrew-list
@@ -1,4 +1,4 @@
 swipl:9.2.9
-swipl:9.3.31
+swipl:9.3.32
 swipl:latest
 swipl:stable
diff --git a/_bashbrew-list-build-order b/_bashbrew-list-build-order
index 372eb8f..e592ba5 100644
--- a/_bashbrew-list-build-order
+++ b/_bashbrew-list-build-order
@@ -1,2 +1,2 @@
 swipl:9.2.9
-swipl:9.3.31
+swipl:9.3.32
diff --git a/swipl_9.3.31/Dockerfile b/swipl_9.3.32/Dockerfile
similarity index 91%
rename from swipl_9.3.31/Dockerfile
rename to swipl_9.3.32/Dockerfile
index 1ed0f7d..dad86af 100644
--- a/swipl_9.3.31/Dockerfile
+++ b/swipl_9.3.32/Dockerfile
@@ -27,8 +27,8 @@ RUN apt-get update && \
     rm -rf /var/lib/apt/lists/*
 ENV LANG=C.UTF-8
 RUN set -eux; \
-    SWIPL_VER=9.3.31; \
-    SWIPL_CHECKSUM=15f7f55349a16dff685c0f67a9722fefdab70e86bf6296d11e792f387d1877b1; \
+    SWIPL_VER=9.3.32; \
+    SWIPL_CHECKSUM=e10dfa5814f7b01c123f7dc2b360873cd588ba93816ae1106e05f2bc93bdac4f; \
     # Removed libgeos-dev libspatialindex-dev because the space pack cannot be built
     BUILD_DEPS='make cmake ninja-build gcc g++ wget git pkg-config m4 libtool automake autoconf libarchive-dev libgmp-dev libossp-uuid-dev libpcre2-dev libreadline-dev libedit-dev libssl-dev zlib1g-dev libdb-dev unixodbc-dev libsqlite3-dev libserd-dev libraptor2-dev libyaml-dev libgoogle-perftools-dev libpython3-dev'; \
     dpkgArch="$(dpkg --print-architecture)"; \
@@ -52,13 +52,15 @@ RUN set -eux; \
     rm -rf /tmp/src; \
     mkdir -p /usr/share/swi-prolog/pack; \
     cd /usr/share/swi-prolog/pack; \
+    echo ":- multifile prolog:build_environment/2." > env.pl; \
+    echo "prolog:build_environment('PORTABLE', '1')." >> env.pl; \
     # usage: install_addin addin-name git-url git-commit
     install_addin () { \
         git clone "$2" "$1"; \
         git -C "$1" checkout -q "$3"; \
         # the prosqlite plugin lib directory must be removed?
         if [ "$1" = 'prosqlite' ]; then rm -rf "$1/lib"; fi; \
-        swipl -g "pack_rebuild($1)" -t halt; \
+        swipl -g "pack_rebuild($1)" -t halt env.pl; \
         find "$1" -mindepth 1 -maxdepth 1 ! -name lib ! -name prolog ! -name pack.pl -exec rm -rf {} +; \
         find "$1" -name .git -exec rm -rf {} +; \
         find "$1" -name '*.so' -exec strip {} +; \
@@ -68,7 +70,7 @@ RUN set -eux; \
     # C++ packages are currently incompatible with 32 bit.  Must be upgraded to SWI-cpp2.h when stable.
     # libgeos-dev of Debian bookworm is broken: the library does not define the Coordinate constructors nor the inline code to avoid calling these.
     # [ "$dpkgArch" = 'armhf' ] || [ "$dpkgArch" = 'armel' ] || install_addin space https://github.com/JanWielemaker/space.git 097687c7b67902704b03f095cc2f1e943181e700; \
-    [ "$dpkgArch" = 'armhf' ] || [ "$dpkgArch" = 'armel' ] || install_addin rocksdb https://github.com/JanWielemaker/rocksdb.git a63f1f5650e44c7d40401ed5a8b689aa1caca635; \
+    [ "$dpkgArch" = 'armhf' ] || [ "$dpkgArch" = 'armel' ] || install_addin rocksdb https://github.com/JanWielemaker/rocksdb.git 2b232e7fd445a380e1731b5a5a38c6e6dfe5ad7d; \
     [ "$dpkgArch" = 'armhf' ] || [ "$dpkgArch" = 'armel' ] || install_addin hdt https://github.com/JanWielemaker/hdt.git 7f2221747ea751a20ad0d7b95aebfd2c99649c1f; \
     [ "$dpkgArch" = 'armhf' ] || [ "$dpkgArch" = 'armel' ] || install_addin rserve_client https://github.com/JanWielemaker/rserve_client.git bdf8962264d65dd8ef6eedf5f00ff0c0f6c52c2f; \
     apt-get purge -y --auto-remove $BUILD_DEPS

Relevant Maintainers:

@JanWielemaker
Copy link
Contributor Author

Thanks. Looked at another recent RocksDB Dockerfile. They pass PORTABLE=1, so I think that is the next thing to try. Pushed a commit for that. Note this is relatively complicated as the Prolog package builder creates a clean environment, so we have to hook into the package builder.

Fingers crossed ...

@yosifkit
Copy link
Member

swipl:9.3.32 (aka latest) works! And swipl:9.2.9 (stable) will need the change too.

@JanWielemaker
Copy link
Contributor Author

swipl:9.2.9 (stable) will need the change too.

I expect 9.4.0 (or maybe 10.0.0, haven't decided yet) to be out in a couple of weeks. That will fix this issue 😄

@yosifkit yosifkit merged commit 221970b into docker-library:master Oct 14, 2025
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants