indygreg / indygreg/PyOxidizer
ImportError: libffi-806b1a9d.so.6.0.4: cannot open shared object file
- Dominant language
- Rust
- Stars
- 6.2k
- Forks
- 256
- PR merge metrics
- No merged PRs in 30d
Description
Just discovered this great project and I been trying to build [pkp](https://github.com/pschmitt/pkp) which relies on [pykeepass](https://github.com/libkeepass/pykeepass).
The binary builds fine with `pyoxidizer build` but at runtime I get the following:
```
Traceback (most recent call last):
File "", line 1, in
File "pkp", line 12, in
File "pykeepass", line 2, in
File "pykeepass.pykeepass", line 23, in
File "pykeepass.kdbx_parsing", line 1, in
File "pykeepass.kdbx_parsing.kdbx", line 4, in
File "pykeepass.kdbx_parsing.kdbx4", line 6, in
File "argon2", line 5, in
File "argon2.low_level", line 17, in
ImportError: libffi-806b1a9d.so.6.0.4: cannot open shared object file: No such file or directory
```
I'm just starting so I may have overlooked something obvious in the docs. Thanks for your work on this!
pyoxidizer.bzl
```
def make_dist():
return default_python_distribution()
def make_exe(dist):
policy = dist.make_python_packaging_policy()
policy.resources_location = "filesystem-relative:lib"
python_config = dist.make_python_interpreter_config()
python_config.run_mode = "eval:from pkp import cli_main; cli_main()"
exe = dist.to_python_executable(
name="pkp-oxy",
packaging_policy=policy,
config=python_config,
)
exe.add_python_resources(exe.pip_install(["pkp==0.6.3"]))
return exe
def make_embedded_resources(exe):
return exe.to_embedded_resources()
def make_install(exe):
files = FileManifest()
files.add_python_resource(".", exe)
return files
register_target("dist", make_dist)
register_target("exe", make_exe, depends=["dist"])
register_target("resources", make_embedded_resources, depends=["exe"], default_build_script=True)
register_target("install", make_install, depends=["exe"], default=True)
resolve_targets()
PYOXIDIZER_VERSION = "0.9.0"
PYOXIDIZER_COMMIT = "UNKNOWN"
```
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with pyoxidizer.bzl, especially resources_location and exe.add_python_resources, then reproduce with pyoxidizer build and the shown pkp runtime traceback. Done means the generated pkp-oxy executable can import pykeepass and argon2 and run without the missing libffi shared-library error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, rust
- Domain
- build-system, devtools
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 32/100