Skip to content

build fails with python 3.12 #1633

@selfisekai

Description

@selfisekai

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 [email protected]
gyp info using [email protected] | 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    T-TaskTasks for the team like planning

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions