Comments (16)
Can you please try rebuilding with one of the variant options? https://ofek.dev/pyapp/latest/config/#cpython
from pyapp.
Let me give it a try
from pyapp.
@ofek it doesn't work too. now the command change to:
clang -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -march=x86-64-v4 -fPIC -fPIC -I/root/.local/share/pyapp/myapp/15114544842415842793/2.0.5/python/include/python3.11 -I/tmp/pip-build-env-d572aapz/overlay/lib/python3.11/site-packages/numpy/core/include -c hdbscan/_hdbscan_tree.c -o build/temp.linux-x86_64-cpython-311/hdbscan/_hdbscan_tree.o
Notice the -march
now became x86-64-v4
.
from pyapp.
Try v1
from pyapp.
@ofek v1 does not have -march=x86-64-v1
issue, however, it still does not detect gcc and still requires clang. I tried v2 v3 v4, will have both issues.
from pyapp.
I think it might be an issue with that particular package:
As far as why that first error is gone, it's related to the CPU architecture https://gregoryszorc.com/docs/python-build-standalone/main/running.html
I don't know exactly what's happening in your case but would it help if you could set runtime environment variables at build time?
from pyapp.
hi @ofek , I'm not sure what do you mean by setting runtime env var at build time?
I don't think the problem is with that particular package because I was able to install it using normal python, not python from the python distribution. I also tried external pip, but it still does not work. I guess I will need to keep using the CC=gcc flag?
from pyapp.
Can you please give me more details about your environment?
What I meant was would it be useful to you if you could inject environment variables into the binary such that they would be available at runtime like CC
?
from pyapp.
@ofek oh, I see. I'm building docker image like the example above. So you mean I can use:
ENV CC=gcc
To set the env var? That does not fix the issue that python from distribution does not detect gcc automatically, and I will have to use cpu v1 for the portability. I'm not sure if it will affect performance.
from pyapp.
Hi, now I got another error:
No default distribution source found
I'm using aarch64 linux, so it should be supported.
from pyapp.
Show the full error?
from pyapp.
Caused by:
process didn't exit successfully: `/tmp/cargo-installSIy4m9/release/build/pyapp-ce661a8f58de8e66/build-script-build` (exit status: 101)
--- stdout
cargo:rustc-env=PYAPP_PROJECT_DEPENDENCY_FILE=
cargo:rustc-env=PYAPP__PROJECT_DEPENDENCY_FILE_NAME=
cargo:rustc-env=PYAPP_PROJECT_NAME=wovey
cargo:rustc-env=PYAPP_PROJECT_VERSION=2.0.5
cargo:rustc-env=PYAPP__PROJECT_EMBED_FILE_NAME=wovey-2.0.5-py3-none-any.whl
--- stderr
thread 'main' panicked at /usr/local/cargo/registry/src/index.crates.io-6f17d22bba15001f/pyapp-0.16.0/build.rs:364:5:
No default distribution source found
Python version: 3.11
Platform: linux
Architecture: aarch64
ABI: gnu
Variant: v1
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish...
error: failed to compile `pyapp v0.16.0`, intermediate artifacts can be found at `/tmp/cargo-installSIy4m9`.
To reuse those artifacts with a future compilation, set the environment variable `CARGO_TARGET_DIR` to that path.
Traceback (most recent call last):
File "<frozen runpy>", line 198, in _run_module_as_main
File "<frozen runpy>", line 88, in _run_code
File "/root/.local/share/hatch/env/virtual/wovey/9TtSrW0h/wovey-build/lib/python3.11/site-packages/hatchling/__main__.py", line 6, in <module>
sys.exit(hatchling())
^^^^^^^^^^^
File "/root/.local/share/hatch/env/virtual/wovey/9TtSrW0h/wovey-build/lib/python3.11/site-packages/hatchling/cli/__init__.py", line 26, in hatchling
command(**kwargs)
File "/root/.local/share/hatch/env/virtual/wovey/9TtSrW0h/wovey-build/lib/python3.11/site-packages/hatchling/cli/build/__init__.py", line 82, in build_impl
for artifact in builder.build(
File "/root/.local/share/hatch/env/virtual/wovey/9TtSrW0h/wovey-build/lib/python3.11/site-packages/hatchling/builders/plugin/interface.py", line 155, in build
artifact = version_api[version](directory, **build_data)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/root/.local/share/hatch/env/virtual/wovey/9TtSrW0h/wovey-build/lib/python3.11/site-packages/hatchling/builders/binary.py", line 163, in build_bootstrap
self.cargo_build(install_command, cwd=context_dir, env=env)
File "/root/.local/share/hatch/env/virtual/wovey/9TtSrW0h/wovey-build/lib/python3.11/site-packages/hatchling/builders/binary.py", line 195, in cargo_build
raise OSError(message)
OSError: Compilation failed (code 101)
Error: building at STEP "RUN PYAPP_PROJECT_PATH=/app/dist/wovey-$(rye version)-py3-none-any.whl hatch build --target binary": while running runtime: exit status 1
from pyapp.
The same dockerfile built on x86_64, but failed locally on aarch64
from pyapp.
The variant environment variable I think is the issue for ARM, can you try removing that?
from pyapp.
@ofek , yeah, it looks like variant v1 does not exist for aarch64. It works when I use v3 default. However, v3 make the wheel build error on x86_64, and require CFLAGS. But the CFLAGS does not work on aarch64. :(
from pyapp.
Ended up setting CFLAGS for now.
from pyapp.
Related Issues (20)
- Cannot use `PYAPP_DISTRIBUTION_PATH` (at least with locally embedded projects) HOT 5
- Notebook execution mode HOT 3
- Incorrect exit code HOT 4
- How to add `optional-dependencies` HOT 3
- Python version support - docs and code are inconsistent
- CPython 3.7 unaccessible from `x86_64` linux
- Build failure on Windows (whl METADATA containing CRLF) HOT 1
- Offline installation with local archive file
- can this lib work with streamlit? HOT 2
- PyApp with GUI program - disable console on Windows HOT 4
- Can not just copy binary to docker and run. HOT 1
- Cache pyapp build on GHA
- Support for gui-scripts HOT 5
- Management command for deleting installation files HOT 9
- Missing glibc when building an app on ubuntu and running on centos HOT 1
- No network HOT 9
- feature: management command to open a shell HOT 1
- Tcl error using Tk HOT 3
- Newer PyApp releases are using a yanked version of zip, compilation fails HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pyapp.