Replies: 4 comments 1 reply
-
Thanks for raising this @mwtoews, we have seen similar |
Beta Was this translation helpful? Give feedback.
-
Took a brief look at HBB. It is a Docker image which allows defining a tightly controlled build environment independently of the build host. GitHub allows jobs to run in a user-specified Docker image, so the HBB image could be subbed for Ubuntu 22.04. However the HBB image would need to be modified to install Meson, compilers, etc. I noticed HBB mentions Meson in the README. There seems to be overlap in scope. Their respective developers have had some interaction. Meson's recommendation to avoid glibc incompatibility is to build on a system at least as old as the systems to be supported. The easiest option for wider Linux compatibility may just be building on an earlier Ubuntu (unless e.g. CentOS provides broader support) If this is done, is it worthwhile to keep a canary build on the latest Ubuntu release? May help avoid surprises when it comes time to update |
Beta Was this translation helpful? Give feedback.
-
Found a partial workaround from Ubuntu 20.04. Step one. Download and install newer glibc-2.34: cd /tmp
wget http://ftp.gnu.org/gnu/libc/glibc-2.34.tar.bz2
tar xfj glibc-2.34.tar.bz2
mkdir glibc-2.34-build
cd glibc-2.34-build
../glibc-2.34/configure --prefix=/opt/glibc-2.34
make -j
sudo make install Step two. Install PatchELF to modify the binary: sudo apt install patchelf Step three. Modify the patchelf --set-interpreter /opt/glibc-2.34/lib/ld-linux-x86-64.so.2 --set-rpath /opt/glibc-2.34/lib:/usr/lib64 $(which mf6) Unfortunately, patchelf --set-rpath /opt/glibc-2.34/lib:/usr/lib64 /path/to/libmf6.so
python -c "from ctypes import CDLL; CDLL('/path/to/libmf6.so')"
# OSError: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.34' not found (required by /path/to/libmf6.so) and this is related to RPATH priorities and how Python was compiled (ref). |
Beta Was this translation helpful? Give feedback.
-
with 753fdf7 the nightly linux build should be more broadly compatible (last night's tested on ubuntu 18.04) |
Beta Was this translation helpful? Give feedback.
-
Hi, checking to see if anyone else has experienced issues using modflow6-nightly-build for Linux using a recent (neither latest or old) Ubuntu 20.04. This can be replicated using docker:
with these commands:
which raises:
similar with
ldd $(which mf6)
There are no issues using the latest Ubuntu 22.04 (docker image
ubuntu:22.04
), which has GLIBC 2.35. And there are no issues with the default executables (releases).I'm not sure how modflow6-nightly-build works, but it should be modified to compile Linux executables that are more backwards compatible. There are many projects out there that aim to provide this, e.g. https://phusion.github.io/holy-build-box/ (used for PESTPP), or https://github.com/pypa/manylinux (used for Python binary wheels distributed on PyPI).
Beta Was this translation helpful? Give feedback.
All reactions