FEniCS/basix

basix binary wheels

Closed this issue · 2 comments

jhale commented

Some notes about building wheels for basix.

git clone https://github.com/FEniCS/basix.git
docker run -ti --rm -v $(pwd):/shared -w /shared/basix quay.io/pypa/manylinux2014_x86_64
yum -y update
yum -y install openblas-devel ninja-build
cmake -G Ninja -DCMAKE_BUILD_TYPE=Release -B build/ -S cpp/
cmake --build build/
cmake --install build/
cd python
python3.9 -m pip wheel .
auditwheel repair fenics_basix-0.3.1.dev0-cp39-cp39-linux_x86_64.whl
cd wheelhouse
unzip fenics_basix-0.3.1.dev0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Should see libgfortran, libbasix, libquadmath and libopenblas amongst the other extracted files.

Only the two-stage install works re: auditwheel repair .... With a one-stage install from the root directory the repair exists complaining that it cannot find libbasix.so.

jhale commented

Slightly hacky workaround:

git clone https://github.com/FEniCS/basix.git
docker run -ti --rm -v $(pwd):/shared -w /shared/basix quay.io/pypa/manylinux2014_x86_64
yum -y update
yum -y install openblas-devel ninja-build
python3.9 -m pip wheel .
unzip fenics_basix-0.3.1.dev0-cp39-cp39-linux_x86_64.whl -d tmp/
export LD_LIBRARY_PATH=$(pwd)/tmp/basix/lib64
auditwheel repair fenics_basix-0.3.1.dev0-cp39-cp39-linux_x86_64.whl
cd wheelhouse
unzip fenics_basix-0.3.1.dev0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
jhale commented

The above can be installed into one our clean development environment images and a complete FEniCS stack can be built on top. There is an open issue regarding DOLFINx CMake finding the basix cmake configuration files.