indygreg / indygreg/PyOxidizer
uvloop fails to build (incorrect search path?)
- Dominant language
- Rust
- Stars
- 6.2k
- Forks
- 256
- PR merge metrics
- No merged PRs in 30d
Description
I apologize in advance for how little information I'm about to give you, I'm very unfamiliar with Rust. I received this error when building a fresh project with just the following addition:
```
[[packaging_rule]]
type = "pip-install-simple"
package = "uvloop==0.11.2"
```
Here's a snippet of the error during `pyoxidizer build` ([the full output is here](https://gist.github.com/lithp/ec797b98c93e35c407f8523af3feb0b6)), there are a lot of undefined references
```
Compiling hello v0.1.0 (/tmp/tmp.12A0mm7S8g/hello)
error: linking with `cc` failed: exit code: 1
|
= [a very, very long command]
= note: /tmp/tmp.12A0mm7S8g/hello/build/target/x86_64-unknown-linux-gnu/debug/deps/libpyembed-6db96b47e95650bd.rlib(uvloop.loop.0.o): In function `__pyx_f_6uvloop_4loop_8UVHandle__close':
/tmp/pip-install-41hhka6_/uvloop/uvloop/loop.c:71955: undefined reference to `uv_close'
/tmp/pip-install-41hhka6_/uvloop/uvloop/loop.c:71955: undefined reference to `uv_close'
/tmp/tmp.12A0mm7S8g/hello/build/target/x86_64-unknown-linux-gnu/debug/deps/libpyembed-6db96b47e95650bd.rlib(uvloop.loop.0.o): In function `__pyx_f_6uvloop_4loop_14UVSocketHandle__fileno':
/tmp/pip-install-41hhka6_/uvloop/uvloop/loop.c:72392: undefined reference to `uv_fileno'
[a lot more lines like this, all complaining about undefined references]
```
This is despite the fact that I've installed `libuv1` and `libuv1-dev` (ubuntu packages which include headers and even a static library), and it occurs even when I pass `STATIC_DEPS=true`, [as suggested here](https://github.com/indygreg/PyOxidizer/issues/103#issuecomment-514878694).
I'm not sure what to try next, it seems like `pip` is building the library but cargo is never adding the library to the search path?
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reproducing the fresh project with the shown packaging_rule and uvloop==0.11.2, then inspect the full linker command in the linked build output. Check whether the libuv dependency is present in the generated build and linker search paths; done means pyoxidizer build completes without the undefined uv_close and uv_fileno references.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, rust
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100