NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
17.63k stars 13.78k forks source link

Build failure: teck-programmer #292529

Open bbjubjub2494 opened 7 months ago

bbjubjub2494 commented 7 months ago

Steps To Reproduce

Steps to reproduce the behavior:

  1. build teck-programmer

Build log

@nix { "action": "setPhase", "phase": "unpackPhase" }
Running phase: unpackPhase
@nix { "action": "setPhase", "phase": "patchPhase" }
Running phase: patchPhase
@nix { "action": "setPhase", "phase": "updateAutotoolsGnuConfigScriptsPhase" }
Running phase: updateAutotoolsGnuConfigScriptsPhase
@nix { "action": "setPhase", "phase": "configurePhase" }
Running phase: configurePhase
no configure script, doing nothing
@nix { "action": "setPhase", "phase": "buildPhase" }
Running phase: buildPhase
@nix { "action": "setPhase", "phase": "installPhase" }
Running phase: installPhase
unpacking source archive /nix/store/c5pwfvci9ag1cy9alz6fmal8vsg82ch2-teck-programmer-1.1.1.tgz
unpacking source archive /nix/store/m05h86qxlfbg73xn40m8w8b8xjlprx0x-node-addon-api-4.3.0.tgz
unpacking source archive /nix/store/jw7b8b413skkb5jib0dl1z2ff1ga4bh7-node-gyp-build-4.8.0.tgz
unpacking source archive /nix/store/nbsqm17x64h6x92gxrbl4p4a1zjwkqv2-q-1.5.1.tgz
unpacking source archive /nix/store/bl3mdlpl5i8zz2r1ks4xfb8kxls2bqq2-usb-1.9.2.tgz
pinpointing versions of dependencies...
patching script interpreter paths in .
./teck-programmer/cli.js: interpreter directive changed from "#!/usr/bin/env node" to "/nix/store/vz13mi0w75q96sfjxz2y>
./teck-programmer/node_modules/node-addon-api/tools/conversion.js: interpreter directive changed from "#! /usr/bin/env>
./teck-programmer/node_modules/usb/libusb/bootstrap.sh: interpreter directive changed from "#!/bin/sh" to "/nix/store/>
./teck-programmer/node_modules/usb/libusb/autogen.sh: interpreter directive changed from "#!/bin/sh" to "/nix/store/08>
./teck-programmer/node_modules/usb/libusb/travis-autogen.sh: interpreter directive changed from "#!/bin/bash" to "/nix>
./teck-programmer/node_modules/usb/libusb/.private/pre-commit.sh: interpreter directive changed from "#!/bin/sh" to "/>
./teck-programmer/node_modules/usb/libusb/.private/post-rewrite.sh: interpreter directive changed from "#!/bin/sh" to >
./teck-programmer/node_modules/node-gyp-build/bin.js: interpreter directive changed from "#!/usr/bin/env node" to "/ni>
./teck-programmer/node_modules/node-gyp-build/build-test.js: interpreter directive changed from "#!/usr/bin/env node" >
./teck-programmer/node_modules/node-gyp-build/optional.js: interpreter directive changed from "#!/usr/bin/env node" to>
No package-lock.json file found, reconstructing...
Adding metadata fields to: node_modules/node-addon-api/package.json
Adding metadata fields to: node_modules/node-gyp-build/package.json
Adding metadata fields to: node_modules/q/package.json
Adding metadata fields to: node_modules/usb/package.json
npm WARN config production Use `--omit=dev` instead.
npm ERR! code 1
npm ERR! path /nix/store/whxlgj4369slg3xx5w9z7rzd8ryiamrv-teck-programmer-1.1.1/lib/node_modules/teck-programmer/node_>
npm ERR! command failed
npm ERR! command sh -c node-gyp-build
npm ERR! make: Entering directory '/nix/store/whxlgj4369slg3xx5w9z7rzd8ryiamrv-teck-programmer-1.1.1/lib/node_modules/>
npm ERR!   CC(target) Release/obj.target/libusb/libusb/libusb/core.o
npm ERR!   CC(target) Release/obj.target/libusb/libusb/libusb/descriptor.o
npm ERR!   CC(target) Release/obj.target/libusb/libusb/libusb/hotplug.o
npm ERR!   CC(target) Release/obj.target/libusb/libusb/libusb/io.o
npm ERR!   CC(target) Release/obj.target/libusb/libusb/libusb/strerror.o
npm ERR!   CC(target) Release/obj.target/libusb/libusb/libusb/sync.o
npm ERR!   CC(target) Release/obj.target/libusb/libusb/libusb/os/poll_posix.o
npm ERR!   CC(target) Release/obj.target/libusb/libusb/libusb/os/threads_posix.o
npm ERR!   CC(target) Release/obj.target/libusb/libusb/libusb/os/linux_usbfs.o
npm ERR!   CC(target) Release/obj.target/libusb/libusb/libusb/os/linux_udev.o
npm ERR! rm -f Release/obj.target/usb.a Release/obj.target/usb.a.ar-file-list; mkdir -p `dirname Release/obj.target/us>
npm ERR! ar crs Release/obj.target/usb.a @Release/obj.target/usb.a.ar-file-list
npm ERR!   COPY Release/usb.a
npm ERR!   CXX(target) Release/obj.target/usb_bindings/src/node_usb.o
npm ERR! make: Leaving directory '/nix/store/whxlgj4369slg3xx5w9z7rzd8ryiamrv-teck-programmer-1.1.1/lib/node_modules/t>
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using node-gyp@10.0.1
npm ERR! gyp info using node@20.11.1 | linux | x64
npm ERR! gyp info find Python using Python version 3.11.8 found at "/nix/store/sxr2igfkwhxbagri49b8krmcqz168sim-python>
npm ERR! gyp WARN read config.gypi ENOENT: no such file or directory, open '/nix/store/86r9krkcjgrcrvvrcc8mamg5il4d50c>
npm ERR! gyp info spawn /nix/store/sxr2igfkwhxbagri49b8krmcqz168sim-python3-3.11.8/bin/python3
npm ERR! gyp info spawn args [
npm ERR! gyp info spawn args '/nix/store/vz13mi0w75q96sfjxz2ylnv8812hvf34-nodejs-20.11.1/lib/node_modules/npm/node_mod>
npm ERR! gyp info spawn args 'binding.gyp',
npm ERR! gyp info spawn args '-f',
npm ERR! gyp info spawn args 'make',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args '/nix/store/whxlgj4369slg3xx5w9z7rzd8ryiamrv-teck-programmer-1.1.1/lib/node_modules/teck->
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args '/nix/store/vz13mi0w75q96sfjxz2ylnv8812hvf34-nodejs-20.11.1/lib/node_modules/npm/node_mod>
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args '/nix/store/86r9krkcjgrcrvvrcc8mamg5il4d50cc-node-sources/common.gypi',
npm ERR! gyp info spawn args '-Dlibrary=shared_library',
npm ERR! gyp info spawn args '-Dvisibility=default',
npm ERR! gyp info spawn args '-Dnode_root_dir=/nix/store/86r9krkcjgrcrvvrcc8mamg5il4d50cc-node-sources',
npm ERR! gyp info spawn args '-Dnode_gyp_dir=/nix/store/vz13mi0w75q96sfjxz2ylnv8812hvf34-nodejs-20.11.1/lib/node_modul>
npm ERR! gyp info spawn args '-Dnode_lib_file=/nix/store/86r9krkcjgrcrvvrcc8mamg5il4d50cc-node-sources/$(Configuration>
npm ERR! gyp info spawn args '-Dmodule_root_dir=/nix/store/whxlgj4369slg3xx5w9z7rzd8ryiamrv-teck-programmer-1.1.1/lib/>
npm ERR! gyp info spawn args '-Dnode_engine=v8',
npm ERR! gyp info spawn args '--depth=.',
npm ERR! gyp info spawn args '--no-parallel',
npm ERR! gyp info spawn args '--generator-output',
npm ERR! gyp info spawn args 'build',
npm ERR! gyp info spawn args '-Goutput_dir=.'
npm ERR! gyp info spawn args ]
npm ERR! gyp info spawn make
npm ERR! gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
npm ERR! In file included from /nix/store/86r9krkcjgrcrvvrcc8mamg5il4d50cc-node-sources/deps/v8/include/v8-object.h:9,
npm ERR!                  from /nix/store/86r9krkcjgrcrvvrcc8mamg5il4d50cc-node-sources/deps/v8/include/v8-array-buffe>
npm ERR!                  from /nix/store/86r9krkcjgrcrvvrcc8mamg5il4d50cc-node-sources/deps/v8/include/v8.h:24,
npm ERR!                  from /nix/store/86r9krkcjgrcrvvrcc8mamg5il4d50cc-node-sources/src/node.h:73,
npm ERR!                  from /nix/store/86r9krkcjgrcrvvrcc8mamg5il4d50cc-node-sources/src/node_buffer.h:25,
npm ERR!                  from ../src/node_usb.h:14,
npm ERR!                  from ../src/node_usb.cc:1:
npm ERR! /nix/store/86r9krkcjgrcrvvrcc8mamg5il4d50cc-node-sources/deps/v8/include/v8-maybe.h:106:45: error: 'is_lvalue>
npm ERR!   106 |   template <class U, std::enable_if_t<!std::is_lvalue_reference_v<U>>*>
npm ERR!       |                                             ^~~~~~~~~~~~~~~~~~~~~
npm ERR!       |                                             is_lvalue_reference
npm ERR! /nix/store/86r9krkcjgrcrvvrcc8mamg5il4d50cc-node-sources/deps/v8/include/v8-maybe.h:106:66: warning: logical >
npm ERR!   106 |   template <class U, std::enable_if_t<!std::is_lvalue_reference_v<U>>*>
npm ERR!       |                                                                  ^
npm ERR! /nix/store/86r9krkcjgrcrvvrcc8mamg5il4d50cc-node-sources/deps/v8/include/v8-maybe.h:106:67: error: template a>
npm ERR!   106 |   template <class U, std::enable_if_t<!std::is_lvalue_reference_v<U>>*>
npm ERR!       |                                                                   ^
npm ERR! /nix/store/86r9krkcjgrcrvvrcc8mamg5il4d50cc-node-sources/deps/v8/include/v8-maybe.h:106:71: error: expected u>
npm ERR!   106 |   template <class U, std::enable_if_t<!std::is_lvalue_reference_v<U>>*>
npm ERR!       |                                                                       ^
npm ERR! /nix/store/86r9krkcjgrcrvvrcc8mamg5il4d50cc-node-sources/deps/v8/include/v8-maybe.h:123:43: error: 'is_lvalue>
npm ERR!   123 | template <class T, std::enable_if_t<!std::is_lvalue_reference_v<T>>* = nullptr>
npm ERR!       |                                           ^~~~~~~~~~~~~~~~~~~~~
npm ERR!       |                                           is_lvalue_reference
npm ERR! /nix/store/86r9krkcjgrcrvvrcc8mamg5il4d50cc-node-sources/deps/v8/include/v8-maybe.h:123:64: warning: logical >
npm ERR!   123 | template <class T, std::enable_if_t<!std::is_lvalue_reference_v<T>>* = nullptr>
npm ERR!       |                                                                ^
npm ERR! /nix/store/86r9krkcjgrcrvvrcc8mamg5il4d50cc-node-sources/deps/v8/include/v8-maybe.h:123:65: error: template a>
npm ERR!   123 | template <class T, std::enable_if_t<!std::is_lvalue_reference_v<T>>* = nullptr>
npm ERR!       |                                                                 ^
npm ERR! /nix/store/86r9krkcjgrcrvvrcc8mamg5il4d50cc-node-sources/deps/v8/include/v8-maybe.h:123:70: error: expected u>
npm ERR!   123 | template <class T, std::enable_if_t<!std::is_lvalue_reference_v<T>>* = nullptr>
npm ERR!       |                                                                      ^
npm ERR! /nix/store/86r9krkcjgrcrvvrcc8mamg5il4d50cc-node-sources/src/node.h:711:28: error: 'std::string_view' has not>
npm ERR!   711 |     Environment* env, std::string_view main_script_source_utf8);
npm ERR!       |                            ^~~~~~~~~~~
npm ERR! ../src/node_usb.cc: In function 'Napi::Value SetDebugLevel(const Napi::CallbackInfo&)':
npm ERR! ../src/node_usb.cc:118:25: warning: 'void libusb_set_debug(libusb_context*, int)' is deprecated: Use libusb_s>
npm ERR!   118 |         libusb_set_debug(usb_context, info[0].As<Napi::Number>().Int32Value());
npm ERR!       |         ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
npm ERR! In file included from ../src/node_usb.h:11:
npm ERR! ../libusb/libusb/libusb.h:1325:18: note: declared here
npm ERR!  1325 | void LIBUSB_CALL libusb_set_debug(libusb_context *ctx, int level);
npm ERR!       |                  ^~~~~~~~~~~~~~~~
npm ERR! make: *** [usb_bindings.target.mk:115: Release/obj.target/usb_bindings/src/node_usb.o] Error 1
npm ERR! gyp ERR! build error 
npm ERR! gyp ERR! stack Error: `make` failed with exit code: 2
npm ERR! gyp ERR! stack at ChildProcess.<anonymous> (/nix/store/vz13mi0w75q96sfjxz2ylnv8812hvf34-nodejs-20.11.1/lib/no>
npm ERR! gyp ERR! System Linux 6.1.78
npm ERR! gyp ERR! command "/nix/store/vz13mi0w75q96sfjxz2ylnv8812hvf34-nodejs-20.11.1/bin/node" "/nix/store/vz13mi0w75>
npm ERR! gyp ERR! cwd /nix/store/whxlgj4369slg3xx5w9z7rzd8ryiamrv-teck-programmer-1.1.1/lib/node_modules/teck-programm>
npm ERR! gyp ERR! node -v v20.11.1
npm ERR! gyp ERR! node-gyp -v v10.0.1
npm ERR! gyp ERR! not ok

npm ERR! A complete log of this run can be found in: /build/.npm/_logs/2024-03-01T10_43_48_416Z-debug-0.log

Additional context

Since c4b3cc031e051233d7dfa6f124db215d0fb31224, nodejs 20. Might be an upstream incompatibility I don't know nodejs internals too well.

Notify maintainers

@bbjubjub2494

Metadata

Please run nix-shell -p nix-info --run "nix-info -m" and paste the result.

 - system: `"x86_64-linux"`
 - host os: `Linux 6.1.78, NixOS, 23.11 (Tapir), 23.11.20240220.526d051`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.18.1`
 - nixpkgs: `/etc/nix/channels/nixos`

Add a :+1: reaction to issues you find important.

eflanagan0 commented 6 months ago

I'm curious about the build failure as I've recently packaged native node.js packages.

I'm able to reproduce with:

nix build ./#nodePackages.teck-programmer
eflanagan0 commented 6 months ago

teck-programmer last release was 9 years ago. That project specifies usb@1.

From what I understand of the error, the node-usb dependency requires native bindings to OS USB libraries. libusb for GNU/Linux. The C++ errors look like header file incompatibilities.

Thus, it does seem like an upstream incompatibility.

Perhaps we mark the package as broken?

bbjubjub2494 commented 6 months ago

That's fair.