YunoHost-Apps / synapse_ynh

Matrix server (synapse) package for YunoHost
https://matrix.org/
GNU General Public License v3.0
79 stars 42 forks source link

Fresh install fails on pip wheel trying to install rust on arm64 #347

Closed jukefr closed 1 year ago

jukefr commented 1 year ago

Describe the bug

Fresh install on a fresh ynh instance fails.

Context

Steps to reproduce

Warning:   error: subprocess-exited-with-error
Warning:   × Building wheel for matrix-synapse (pyproject.toml) did not run successfully.
Warning:   │ exit code: 1
Warning:   ╰─> [36 lines of output]
Warning:       A setup.py file already exists. Using it.
Warning:       running build
Warning:       running build_py
Warning:       running build_ext
Warning:       running build_rust
Warning:       error: can't find Rust compiler
Warning:       If you are using an outdated pip version, it is possible a prebuilt wheel is available for this package but pip is not able to install from it. Installing from the wheel would avoid the need for a Rust compiler.
Warning:       To update pip, run:
Warning:           pip install --upgrade pip
Warning:       and then retry package installation.
Warning:       If you did intend to build this package from source, try installing a Rust compiler from your system package manager and ensure it is on the PATH during installation. Alternatively, rustup (available at https://rustup.rs) is the recommended way to download and update the Rust compiler toolchain.
Warning:       Traceback (most recent call last):
Warning:         File "/opt/yunohost/matrix-synapse/lib/python3.9/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 351, in <module>
Warning:           main()
Warning:         File "/opt/yunohost/matrix-synapse/lib/python3.9/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 333, in main
Warning:           json_out['return_val'] = hook(**hook_input['kwargs'])
Warning:         File "/opt/yunohost/matrix-synapse/lib/python3.9/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 249, in build_wheel
Warning:           return _build_backend().build_wheel(wheel_directory, config_settings,
Warning:         File "/tmp/pip-build-env-rtc6jzn7/overlay/lib/python3.9/site-packages/poetry/core/masonry/api.py", line 67, in build_wheel
Warning:           return WheelBuilder.make_in(poetry, Path(wheel_directory))
Warning:         File "/tmp/pip-build-env-rtc6jzn7/overlay/lib/python3.9/site-packages/poetry/core/masonry/builders/wheel.py", line 80, in make_in
Warning:           wb.build(target_dir=directory)
Warning:         File "/tmp/pip-build-env-rtc6jzn7/overlay/lib/python3.9/site-packages/poetry/core/masonry/builders/wheel.py", line 114, in build
Warning:           self._build(zip_file)
Warning:         File "/tmp/pip-build-env-rtc6jzn7/overlay/lib/python3.9/site-packages/poetry/core/masonry/builders/wheel.py", line 168, in _build
Warning:           self._run_build_command(setup)
Warning:         File "/tmp/pip-build-env-rtc6jzn7/overlay/lib/python3.9/site-packages/poetry/core/masonry/builders/wheel.py", line 206, in _run_build_command
Warning:           subprocess.check_call(
Warning:         File "/usr/lib/python3.9/subprocess.py", line 373, in check_call
Warning:           raise CalledProcessError(retcode, cmd)
Warning:       subprocess.CalledProcessError: Command '['/opt/yunohost/matrix-synapse/bin/python3', '/tmp/pip-install-k24fc2of/matrix-synapse_5e1fe2cd90b644339c78414c78d0c06d/setup.py', 'build', '-b', '/tmp/pip-install-k24fc2of/matrix-synapse_5e1fe2cd90b644339c78414c78d0c06d/build']' returned non-zero exit status 1.
Warning:       [end of output]
Warning:   note: This error originates from a subprocess, and is likely not a problem with pip.
Warning:   ERROR: Failed building wheel for matrix-synapse
Warning: ERROR: Could not build wheels for matrix-synapse, which is required to install pyproject.toml-based projects
Error: Unable to install synapse: An error occurred inside the app installation script
Info: The operation 'Install the 'synapse' app' could not be completed. Please share the full log of this operation using the command 'yunohost log share 20221031-022101-app_install-synapse' to get help
Warning: Here's an extract of the logs before the crash. It might help debugging the error:
Info: WARNING -         File "/tmp/pip-build-env-rtc6jzn7/overlay/lib/python3.9/site-packages/poetry/core/masonry/api.py", line 67, in build_wheel
Info: WARNING -           return WheelBuilder.make_in(poetry, Path(wheel_directory))
Info: WARNING -         File "/tmp/pip-build-env-rtc6jzn7/overlay/lib/python3.9/site-packages/poetry/core/masonry/builders/wheel.py", line 80, in make_in
Info: WARNING -           wb.build(target_dir=directory)
Info: WARNING -         File "/tmp/pip-build-env-rtc6jzn7/overlay/lib/python3.9/site-packages/poetry/core/masonry/builders/wheel.py", line 114, in build
Info: WARNING -           self._build(zip_file)
Info: WARNING -         File "/tmp/pip-build-env-rtc6jzn7/overlay/lib/python3.9/site-packages/poetry/core/masonry/builders/wheel.py", line 168, in _build
Info: WARNING -           self._run_build_command(setup)
Info: WARNING -         File "/tmp/pip-build-env-rtc6jzn7/overlay/lib/python3.9/site-packages/poetry/core/masonry/builders/wheel.py", line 206, in _run_build_command
Info: WARNING -           subprocess.check_call(
Info: WARNING -         File "/usr/lib/python3.9/subprocess.py", line 373, in check_call
Info: WARNING -           raise CalledProcessError(retcode, cmd)
Info: WARNING -       subprocess.CalledProcessError: Command '['/opt/yunohost/matrix-synapse/bin/python3', '/tmp/pip-install-k24fc2of/matrix-synapse_5e1fe2cd90b644339c78414c78d0c06d/setup.py', 'build', '-b', '/tmp/pip-install-k24fc2of/matrix-synapse_5e1fe2cd90b644339c78414c78d0c06d/build']' returned non-zero exit status 1.
Info: WARNING -       [end of output]
Info: DEBUG -
Info: WARNING -   note: This error originates from a subprocess, and is likely not a problem with pip.
Info: WARNING -   ERROR: Failed building wheel for matrix-synapse
Info: DEBUG - Failed to build matrix-synapse
Info: WARNING - ERROR: Could not build wheels for matrix-synapse, which is required to install pyproject.toml-based projects
Info: DEBUG - + ynh_exit_properly
Warning: Removing the app after installation failure...

Expected behavior

A clear and concise description of what you expected to happen. You can remove this section if the command above is enough to understand your intent.

Logs

When an operation fails, YunoHost provides a simple way to share the logs.

After sharing the log, please copypaste directly the link provided by YunoHost (to help readability, no need to copypaste the entire content of the log here, just the link is enough...)

If applicable and useful, add screenshots to help explain your problem.

jukefr commented 1 year ago

tried to pip3 install --upgrade pip same issue

tried CRYPTOGRAPHY_DONT_BUILD_RUST=1 yunohost ... same issue

jukefr commented 1 year ago

(did not notice the fix_arm64_install branch, trying right now)

jukefr commented 1 year ago

i installed rustup manually via the script and the install worked the fix_arm64_install didnt work sadly

Josue-T commented 1 year ago

Duplicate: #343