Closed sid-agrawal closed 10 months ago
I don't think I've run into this error before. Do you mind reporting what Linux distro you are using (and version) and what pyoxidzier version you upgraded in order to fix the issue?
Ubuntu 22.04
./pyenv/bin/python3 -m pip show pyoxidizer
Name: pyoxidizer
Version: 0.24.0
Summary: Package self-contained Python applications
Home-page: https://github.com/indygreg/PyOxidizer
Author: Gregory Szorc <gregory.szorc@gmail.com>
Author-email: Gregory Szorc <gregory.szorc@gmail.com>
License: MPL-2.0
Location: /home/siagraw/OSmosis/sel4cp/pyenv/lib/python3.9/site-packages
Requires:
Required-by:
Okay it looks like https://github.com/indygreg/PyOxidizer/issues/673 is the appropriate bug report in PyOxidizer. Will have to take a closer look, but it looks like we might have to upgrade PyOxidizer versions.
So just to confirm, it didn't work with the current version of PyOxidizer (0.17.0), but did work with version 0.24.0?
No, sorry about the confusion.
It did not work with 0.17.0 for a different issue #13. This was a compile failure.
To fix #13 , I upgraded to 0.24.0, which is what happens when I do ./pyenv/bin/python3 -m pip install --upgrade pyoxidizer
. The compile fails, but I get an error reported in this issue at runtime.
Now I downgraded the pyoxidizer package to 0.23.0, and trying again.
Please see this comment: https://github.com/BreakawayConsulting/sel4cp/issues/13#issuecomment-1510565071. The issue comes from installing musl-tools
from apt
on Ubuntu 22.04. If you build from source you won't have that issue. Do you mind building musl 1.2.2 as specified in the README without upgrading PyOxidizer and reporting the results?
Sure. I can try that next. btw, switching the pyoxidizer package to 0.23.0 also fixes it.
The following commands should work:
wget https://musl.libc.org/releases/musl-1.2.2.tar.gz
tar xvf musl-1.2.2.tar.gz
cd musl-1.2.2
./configure
make -j$(nproc)
sudo make install
Note you'll probably have to do sudo apt remove musl-tools
first.
The default make install
location for musl is /usr/local/musl/bin/
so make sure to have that in your PATH as well.
I can confirm that the sel4cp
tool compiles and run with:
musl-1.2.2
and pyoxidizer
package to 0.17.0 Great, the only thing to do now is document this process so that anyone else on Ubuntu 22.04 (or some other distro) does not run into this.
The compilation worked fine after two hick-ups (I wasn't sure where to install the arm toolchain and had to upgrade pyoxidizer, both are sorted).