Compatibility with CMake < 3.5 has been removed from CMake.
5.562 Collecting python-olm~=3.2 (from matrix-nio[e2e])
5.575 Downloading python-olm-3.2.16.tar.gz (2.7 MB)
5.592 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 2.7/2.7 MB 192.7 MB/s eta 0:00:00
5.780 Installing build dependencies: started
8.007 Installing build dependencies: finished with status 'done'
8.011 Getting requirements to build wheel: started
8.234 Getting requirements to build wheel: finished with status 'error'
8.240 error: subprocess-exited-with-error
8.240
8.240 × Getting requirements to build wheel did not run successfully.
8.240 │ exit code: 1
8.240 ╰─> [70 lines of output]
8.240 CMake Error at CMakeLists.txt:1 (cmake_minimum_required):
8.240 Compatibility with CMake < 3.5 has been removed from CMake.
8.240
8.240 Update the VERSION argument <min> value. Or, use the <min>...<max> syntax
8.240 to tell CMake that the project requires at least <min> but has been updated
8.240 to work with policies introduced by <max> or earlier.
8.240
8.240 Or, add -DCMAKE_POLICY_VERSION_MINIMUM=3.5 to try configuring anyway.
To reproduce
FROM archlinux:latest
RUN pacman -Syu --noconfirm git openbsd-netcat python python-pip python-pydantic python-toml make cmake
RUN pip install matrix-nio[e2e] --break-system-packages
The documentation does not mention it yet, but there is now (as of two months ago, commit 33856b1d62e5311f456c458295ccc900eb9a38f0, should be in any CMAKE >= 4.0) an environment variable you can use:
CMAKE_POLICY_VERSION_MINIMUM=3.5 pip install matrix-nio[e2e]
That worked for me.
Hi,
just for reference, I was able to build python-olm on my mac with this patch applied. The warning doesn't seems to cause the failure here, but the compilation error that is fixed with that change (sorry, I'm a complete ignorant, so I may be wrong, but for sure the library/bindings - or whatever that repo is - built ok here).
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=281497 , AKA:
diff --git a/include/olm/list.hh b/include/olm/list.hh
index 6906c87..e8f3b7c 100644
--- a/include/olm/list.hh
+++ b/include/olm/list.hh
@@ -99,7 +99,7 @@ public:
return *this;
}
T * this_pos = _data;
- T * const other_pos = other._data;
+ T const * other_pos = other._data;
while (other_pos != other._end) {
*this_pos = *other;
++this_pos;
Note I don't know how that can be fixed within matrix-nio or, maybe, it needs an issue o merge request in the upstream repo.
Also, I've seen @ #518 that the libolm usage is officially deprecated and something else (vodozemac) should be used instead. So, really, I'm a little bit lost with all these problems, ongoing changes... and how everything is going to affect to all us. I would love to know more and help, but all that stuff is far away from my abilities.
Ciao :-)
I would say the main issue here is that this project uses a library that's:
IMPORTANT: libolm is now deprecated.
Yeah the effort to bring in Vodozemac has at least already started via vodozemac-python... Trying to do stuff with olm is just going to be a losing battle.