question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Nuitka resolves prebuilt module from watchfiles lib on macOS wrong

See original GitHub issue

Problem: compilation of app in which watchiles library is used(just import is enough) fails on macOS. Nuitka resolves a module to _rust_notify.cpython-310-darwin.so, but library file is _rust_notify.abi3.so. If I create a copy of _rust_notify.abi3.so with file name _rust_notify.cpython-310-darwin.so before compilation, it doesn’t fail anymore, and the app works.

Watchfiles is a library implemented in Rust, and its distribution includes the prebuilt module _rust_notify.

On Linux and Windows, the compilation is successful, and the app works as expected.

Repository with minimal example and CI: https://github.com/Aksem/nuitka_compile_watchfiles_bug

Environment:

1.1.5
Commercial: None
Python: 3.10.7 (main, Sep  6 2022, 15:18:47) [Clang 12.0.0 (clang-1200.0.32.29)]
Flavor: Unknown
Executable: /Users/runner/Library/Caches/pypoetry/virtualenvs/nuitka-load-module-regression-cKtR2lP0-py3.10/bin/python
OS: Darwin
Arch: x86_64

Nuitka version: tested both 1.1.5 and factory versions. Installed in pyenv environment via poetry.

Compilation error:

FATAL: Error, failed to find path @rpath/_rust_notify.cpython-310-darwin.so (resolved DLL to /Users/runner/Library/Caches/pypoetry/virtualenvs/nuitka-load-module-regression-cKtR2lP0-py3.10/lib/python3.10/site-packages/watchfiles/_rust_notify.cpython-310-darwin.so) for /Users/runner/Library/Caches/pypoetry/virtualenvs/nuitka-load-module-regression-cKtR2lP0-py3.10/lib/python3.10/site-packages/watchfiles/_rust_notify.abi3.so, please report the bug.

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:9 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
Aksemcommented, Oct 23, 2022

Fixed in maturin(rust toolset) as well: https://github.com/PyO3/maturin/pull/1208

0reactions
kayhayencommented, Oct 23, 2022

This is part of the hotfix release 1.1.6 that I just made.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error finding parent package of win32com sub-module on ...
Error during nuitka standalone compilation: Nuitka-Plugins:INFO: pkg-resources: Injecting post-module load code for module 'pkg_resources':
Read more >
Nuitka - compiling module including precompiled .so libraries
I need to use both nuitka (code obfuscation) and numba (code optimization), but nuitka crashes when executing @njit (understandable).
Read more >
Portage -> Browse Portage - Gentoo Linux Howtos
Details of dev-python/nuitka: Description: Python to native compiler. Homepage: https://www.nuitka.net. available versions: releases, alpha, amd64, arm ...
Read more >
dev-lang/python Package Details - Gentoo Browse
dev-libs / libpy : Utilities for writing C++ extension modules ... dev-python / cfgv : Validate configuration and produce human-readable error messages.
Read more >
开发工具 - 超级架构师
node-video-lib - Pure JavaScript library for working with MP4 and FLV video files and creating MPEG-TS chunks for HLS streaming. basic-ftp – FTP/FTPS...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found