Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build fails with python 3.12 #1633

Open
selfisekai opened this issue Apr 22, 2024 · 4 comments
Open

build fails with python 3.12 #1633

selfisekai opened this issue Apr 22, 2024 · 4 comments
Labels
T-Task Tasks for the team like planning

Comments

@selfisekai
Copy link
Contributor

Steps to reproduce

  1. build element-desktop with keytar hak

Outcome

What did you expect?

keytar hak being built successfully

What happened instead?

gyp info it worked if it ends with ok
gyp info using node-gyp@8.4.1
gyp info using node@20.12.2 | linux | x64
gyp info find Python using Python version 3.12.3 found at "/usr/bin/python3"
gyp info spawn /usr/bin/python3
gyp info spawn args [
gyp info spawn args   '/builds/selfisekai/aports/testing/element-desktop/src/element-desktop-1.11.64/.hak/keytar/x86_64-alpine-linux-musl/build/node_modules/node-gyp/gyp/gyp_main.py',
gyp info spawn args   'binding.gyp',
gyp info spawn args   '-f',
gyp info spawn args   'make',
gyp info spawn args   '-I',
gyp info spawn args   '/builds/selfisekai/aports/testing/element-desktop/src/element-desktop-1.11.64/.hak/keytar/x86_64-alpine-linux-musl/build/build/config.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/builds/selfisekai/aports/testing/element-desktop/src/element-desktop-1.11.64/.hak/keytar/x86_64-alpine-linux-musl/build/node_modules/node-gyp/addon.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/usr/include/electron/node_headers/include/node/common.gypi',
gyp info spawn args   '-Dlibrary=shared_library',
gyp info spawn args   '-Dvisibility=default',
gyp info spawn args   '-Dnode_root_dir=/usr/include/electron/node_headers',
gyp info spawn args   '-Dnode_gyp_dir=/builds/selfisekai/aports/testing/element-desktop/src/element-desktop-1.11.64/.hak/keytar/x86_64-alpine-linux-musl/build/node_modules/node-gyp',
gyp info spawn args   '-Dnode_lib_file=/usr/include/electron/node_headers/$(Configuration)/node.lib',
gyp info spawn args   '-Dmodule_root_dir=/builds/selfisekai/aports/testing/element-desktop/src/element-desktop-1.11.64/.hak/keytar/x86_64-alpine-linux-musl/build',
gyp info spawn args   '-Dnode_engine=v8',
gyp info spawn args   '--depth=.',
gyp info spawn args   '--no-parallel',
gyp info spawn args   '--generator-output',
gyp info spawn args   'build',
gyp info spawn args   '-Goutput_dir=.'
gyp info spawn args ]
Traceback (most recent call last):
  File "/builds/selfisekai/aports/testing/element-desktop/src/element-desktop-1.11.64/.hak/keytar/x86_64-alpine-linux-musl/build/node_modules/node-gyp/gyp/gyp_main.py", line 42, in <module>
    import gyp  # noqa: E402
    ^^^^^^^^^^
  File "/builds/selfisekai/aports/testing/element-desktop/src/element-desktop-1.11.64/.hak/keytar/x86_64-alpine-linux-musl/build/node_modules/node-gyp/gyp/pylib/gyp/__init__.py", line 9, in <module>
    import gyp.input
  File "/builds/selfisekai/aports/testing/element-desktop/src/element-desktop-1.11.64/.hak/keytar/x86_64-alpine-linux-musl/build/node_modules/node-gyp/gyp/pylib/gyp/input.py", line 19, in <module>
    from distutils.version import StrictVersion
ModuleNotFoundError: No module named 'distutils'
gyp ERR! configure error 
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onCpExit (/builds/selfisekai/aports/testing/element-desktop/src/element-desktop-1.11.64/.hak/keytar/x86_64-alpine-linux-musl/build/node_modules/node-gyp/lib/configure.js:259:16)
gyp ERR! stack     at ChildProcess.emit (node:events:518:28)
gyp ERR! stack     at ChildProcess._handle.onexit (node:internal/child_process:294:12)
gyp ERR! System Linux 6.1.41-0-lts
gyp ERR! command "/usr/bin/node" "/builds/selfisekai/aports/testing/element-desktop/src/element-desktop-1.11.64/.hak/keytar/x86_64-alpine-linux-musl/build/node_modules/.bin/node-gyp" "rebuild" "--arch" "x64"
gyp ERR! cwd /builds/selfisekai/aports/testing/element-desktop/src/element-desktop-1.11.64/.hak/keytar/x86_64-alpine-linux-musl/build
gyp ERR! node -v v20.12.2
gyp ERR! node-gyp -v v8.4.1
gyp ERR! not ok 
1
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Operating system

Alpine Linux edge

Application version

1.11.64

How did you install the app?

No response

Homeserver

No response

Will you send logs?

No

@hardfalcon
Copy link

hardfalcon commented Apr 24, 2024

On Archlinux, I could solve this by adding the python-setuptools package to the makedepends array in the PKGBUILD. Therefore I think that you can probably solve this on Alpine by adding the py3-setuptools package to the makedepends array in the APKBUILD file.

//EDIT: Also, see commit b2b7bcb

@t3chguy
Copy link
Member

t3chguy commented Apr 25, 2024

Yeah this is a breaking change in Python 3.12 which we also had to workaround as per the commit @hardfalcon identified. Not sure what this issue is asking for?

@t3chguy t3chguy added the X-Needs-Info This issue is blocked awaiting information from the reporter label Apr 25, 2024
@selfisekai
Copy link
Contributor Author

forcing node-gyp 10 in keytar hak, which will bring this change: nodejs/gyp-next@874233e#diff-1ca01eae7eba1639aa26c577cf7693539f8423a7b3a979c944f4b44ff55922fc

@t3chguy
Copy link
Member

t3chguy commented Apr 25, 2024

Which we can't do without either the upstream making that change or something like #1634

@t3chguy t3chguy removed the X-Needs-Info This issue is blocked awaiting information from the reporter label Apr 25, 2024
@MidhunSureshR MidhunSureshR added T-Task Tasks for the team like planning and removed T-Defect labels May 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T-Task Tasks for the team like planning
Projects
None yet
Development

No branches or pull requests

4 participants