doc2dash Linux binary does not support older operating systems
pquentin opened this issue · comments
Here is the current OS where you run pyoxidizer:
doc2dash/.github/workflows/pyoxidizer.yml
Line 20 in 46bba9b
On GitHub Actions, ubuntu-latest is currently being updated to point to ubuntu-22.04, which uses glibc 2.35. Since your binary is not compiled statically, this means for the next doc2dash release you won't support Ubuntu 20.04 and other systems with an older glibc.
And the current release does not support Ubuntu 18.04, as shown by pyoxidizer analyze
:
$ pyoxidizer analyze doc2dash
...
glibc
-----
Minimum Version: 2.29
Minimum Distro Versions:
Debian 11
Fedora 30
OpenSUSE 15.3
RHEL 9
Ubuntu 19.04
See more details in the documentation: https://pyoxidizer.readthedocs.io/en/stable/pyoxidizer_distributing_linux.html#managing-binary-portability-on-linux
This might not be a problem, but I thought you would like to know.
I'm glad you reported this issue, as it's helping me learn about doc2dash and pyoxidizer 🙂 I copied Hynek's pattern for my own experimenting with a project called "moosecli". I hope to evolve my project into something more useful eventually, but for now it's basically a small (dummy) project. My project is here: https://github.com/b-long/moosecli
I found that my project seemed to work just fine on macOS (ARM and Intel), Windows, and usually Linux. However, in some scenarios (e.g. CentOS 8) my project didn't work (see b-long/moosecli#5).
I'm wondering if there's a generally accepted/best practice solution to this problem. Is it easy to compile statically?
I'm also wondering if there are other high quality projects, like Hynek's, that can be used as an educational/learning resource in this area.
Here's some debugging output with doc2dash
on CentOS 8:
[vagrant@localhost vagrant_data]$ ./doc2dash --help
./doc2dash: /lib64/libm.so.6: version `GLIBC_2.29' not found (required by ./doc2dash)
./doc2dash: /lib64/libc.so.6: version `GLIBC_2.29' not found (required by ./doc2dash)
[vagrant@localhost vagrant_data]$ cat /etc/*release
CentOS Stream release 8
NAME="CentOS Stream"
VERSION="8"
ID="centos"
ID_LIKE="rhel fedora"
VERSION_ID="8"
PLATFORM_ID="platform:el8"
PRETTY_NAME="CentOS Stream 8"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:centos:centos:8"
HOME_URL="https://centos.org/"
BUG_REPORT_URL="https://bugzilla.redhat.com/"
REDHAT_SUPPORT_PRODUCT="Red Hat Enterprise Linux 8"
REDHAT_SUPPORT_PRODUCT_VERSION="CentOS Stream"
CentOS Stream release 8
CentOS Stream release 8
Also, here's a Vagrantfile that you might use for debugging/reproducing:
Vagrant.configure("2") do |config|
config.vm.box = "bento/centos-stream-8"
config.vm.network "private_network", ip: "192.168.33.10"
config.vm.synced_folder "./data", "/vagrant_data"
config.vm.provider "virtualbox" do |vb|
# Display the VirtualBox GUI when booting the machine
vb.gui = true
# Customize the amount of memory on the VM:
vb.memory = "4096"
vb.cpus = 2
end
end
I guess that's a topic for the pyoxidizer project?
Briefly googling for the error show there might be a way to build fully-static binaries: http://www.dlab.ninja/2021/09/how-to-create-python-executables-with.html
I'm leaving for vacation tomorrow tho, but I'm curious to learn I y'all can make it work.
So, I've spent the better half of my afternoon trying to figure out static Linux builds over at #203 and I'm afraid I just can't get it working.
When I finally got it built, its fails when trying to run with:
thread 'main' panicked at 'already borrowed: BorrowMutError', /home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/pyo3-0.17.3/src/gil.rs:433:45
note: run withRUST_BACKTRACE=1
environment variable to display a backtrace
https://github.com/hynek/doc2dash/actions/runs/7520388856/job/20470180574
Given there's been precious little activity on the PyOxidizer repo, I'm not sure if this whole thing is worth pursuing at all, to be honest. Maybe the best way forward is just dropping a Dockerfile.