All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [Bug 15826] New: nodejs modules with native extensions fail to install
@ 2023-10-25 20:46 bugzilla
  2023-10-25 20:50 ` [Buildroot] [Bug 15826] " bugzilla
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: bugzilla @ 2023-10-25 20:46 UTC (permalink / raw)
  To: buildroot

https://bugs.busybox.net/show_bug.cgi?id=15826

            Bug ID: 15826
           Summary: nodejs modules with native extensions fail to install
           Product: buildroot
           Version: unspecified
          Hardware: All
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P5
         Component: Other
          Assignee: unassigned@buildroot.uclibc.org
          Reporter: marcus.hoffmann@othermo.de
                CC: buildroot@uclibc.org
  Target Milestone: ---

On current master installing a nodejs module with native extionsion (i.e.
serialport) fails with some node-gyp errors. I suspect this got broken by the
nodejs-src/nodejs-bin split.

I'm building the the raspberrypi4_64_defconfig with the following
changes/additions:

```
BR2_CCACHE=y
BR2_PACKAGE_NODEJS=y
BR2_PACKAGE_NODEJS_MODULES_ADDITIONAL="serialport"
BR2_TARGET_ROOTFS_EXT2_SIZE="300M"
```

Error is the following:
```
# If you're having trouble with module installation, adding -d to the
# npm install call below and setting npm_config_rollback=false can both
# help in diagnosing the problem.
PATH="/home/marcus/repos/buildroot-upstream/output/host/bin:/home/marcus/repos/buildroot-upstream/output/host/sbin:/home/marcus/.local/bin:/home/marcus/bin:/home/marcus/.pyenv/shims:/home/marcus/.cargo/bin:/home/marcus/.pyenv/bin:/home/marcus/bin:/home/marcus/.local/bin:/home/marcus/.local/bin:/home/marcus/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin"
AR="/home/marcus/repos/buildroot-upstream/output/host/bin/aarch64-buildroot-linux-gnu-gcc-ar"
AS="/home/marcus/repos/buildroot-upstream/output/host/bin/aarch64-buildroot-linux-gnu-as"
LD="/home/marcus/repos/buildroot-upstream/output/host/bin/aarch64-buildroot-linux-gnu-ld"
NM="/home/marcus/repos/buildroot-upstream/output/host/bin/aarch64-buildroot-linux-gnu-gcc-nm"
CC="/home/marcus/repos/buildroot-upstream/output/host/bin/aarch64-buildroot-linux-gnu-gcc"
GCC="/home/marcus/repos/buildroot-upstream/output/host/bin/aarch64-buildroot-linux-gnu-gcc"
CPP="/home/marcus/repos/buildroot-upstream/output/host/bin/aarch64-buildroot-linux-gnu-cpp"
CXX="/home/marcus/repos/buildroot-upstream/output/host/bin/aarch64-buildroot-linux-gnu-g++"
FC="/home/marcus/repos/buildroot-upstream/output/host/bin/aarch64-buildroot-linux-gnu-gfortran"
F77="/home/marcus/repos/buildroot-upstream/output/host/bin/aarch64-buildroot-linux-gnu-gfortran"
RANLIB="/home/marcus/repos/buildroot-upstream/output/host/bin/aarch64-buildroot-linux-gnu-gcc-ranlib"
READELF="/home/marcus/repos/buildroot-upstream/output/host/bin/aarch64-buildroot-linux-gnu-readelf"
STRIP="/home/marcus/repos/buildroot-upstream/output/host/bin/aarch64-buildroot-linux-gnu-strip"
OBJCOPY="/home/marcus/repos/buildroot-upstream/output/host/bin/aarch64-buildroot-linux-gnu-objcopy"
OBJDUMP="/home/marcus/repos/buildroot-upstream/output/host/bin/aarch64-buildroot-linux-gnu-objdump"
AR_FOR_BUILD="/usr/bin/ar" AS_FOR_BUILD="/usr/bin/as"
CC_FOR_BUILD="/home/marcus/repos/buildroot-upstream/output/host/bin/ccache
/usr/bin/gcc"
GCC_FOR_BUILD="/home/marcus/repos/buildroot-upstream/output/host/bin/ccache
/usr/bin/gcc"
CXX_FOR_BUILD="/home/marcus/repos/buildroot-upstream/output/host/bin/ccache
/usr/bin/g++" LD_FOR_BUILD="/usr/bin/ld"
CPPFLAGS_FOR_BUILD="-I/home/marcus/repos/buildroot-upstream/output/host/include"
CFLAGS_FOR_BUILD="-O2
-I/home/marcus/repos/buildroot-upstream/output/host/include"
CXXFLAGS_FOR_BUILD="-O2
-I/home/marcus/repos/buildroot-upstream/output/host/include"
LDFLAGS_FOR_BUILD="-L/home/marcus/repos/buildroot-upstream/output/host/lib
-Wl,-rpath,/home/marcus/repos/buildroot-upstream/output/host/lib"
FCFLAGS_FOR_BUILD=""
DEFAULT_ASSEMBLER="/home/marcus/repos/buildroot-upstream/output/host/bin/aarch64-buildroot-linux-gnu-as"
DEFAULT_LINKER="/home/marcus/repos/buildroot-upstream/output/host/bin/aarch64-buildroot-linux-gnu-ld"
CPPFLAGS="-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64"
CFLAGS="-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64  -Os
-g0 -D_FORTIFY_SOURCE=1" CXXFLAGS="-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE
-D_FILE_OFFSET_BITS=64  -Os -g0 -D_FORTIFY_SOURCE=1" LDFLAGS="" FCFLAGS=" -Os
-g0" FFLAGS=" -Os -g0"
PKG_CONFIG="/home/marcus/repos/buildroot-upstream/output/host/bin/pkg-config"
STAGING_DIR="/home/marcus/repos/buildroot-upstream/output/host/aarch64-buildroot-linux-gnu/sysroot"
INTLTOOL_PERL=/usr/bin/perl LDFLAGS=""
LD="/home/marcus/repos/buildroot-upstream/output/host/bin/aarch64-buildroot-linux-gnu-g++"
npm_config_arch= npm_config_target_arch= npm_config_build_from_source=true
npm_config_nodedir=/home/marcus/repos/buildroot-upstream/output/build/nodejs-
npm_config_prefix=/home/marcus/repos/buildroot-upstream/output/target/usr
npm_config_cache=/home/marcus/repos/buildroot-upstream/output/build/.npm-cache
/home/marcus/repos/buildroot-upstream/output/host/bin/npm install -g
node-red@3.1.0 serialport
npm notice 
npm notice New major version of npm available! 8.19.4 -> 10.2.1
npm notice Changelog: https://github.com/npm/cli/releases/tag/v10.2.1
npm notice Run npm install -g npm@10.2.1 to update!
npm notice 
npm ERR! code 1
npm ERR! path
/home/marcus/repos/buildroot-upstream/output/target/usr/lib/node_modules/serialport/node_modules/@serialport/bindings-cpp
npm ERR! command failed
npm ERR! command sh -c -- node-gyp-build
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using node-gyp@9.1.0
npm ERR! gyp info using node@16.20.0 | linux | x64
npm ERR! gyp info find Python using Python version 3.11.6 found at
"/home/marcus/repos/buildroot-upstream/output/host/bin/python3"
npm ERR! gyp WARN read config.gypi ENOENT: no such file or directory, open
'/home/marcus/repos/buildroot-upstream/output/build/nodejs-/include/node/config.gypi'
npm ERR! gyp info spawn
/home/marcus/repos/buildroot-upstream/output/host/bin/python3
npm ERR! gyp info spawn args [
npm ERR! gyp info spawn args  
'/home/marcus/repos/buildroot-upstream/output/host/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py',
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  
'/home/marcus/repos/buildroot-upstream/output/target/usr/lib/node_modules/serialport/node_modules/@serialport/bindings-cpp/build/config.gypi',
npm ERR! gyp info spawn args   '-I',
npm ERR! gyp info spawn args  
'/home/marcus/repos/buildroot-upstream/output/host/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
npm ERR! gyp info spawn args   '-I',
npm ERR! gyp info spawn args  
'/home/marcus/repos/buildroot-upstream/output/build/nodejs-/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=/home/marcus/repos/buildroot-upstream/output/build/nodejs-',
npm ERR! gyp info spawn args  
'-Dnode_gyp_dir=/home/marcus/repos/buildroot-upstream/output/host/lib/node_modules/npm/node_modules/node-gyp',
npm ERR! gyp info spawn args  
'-Dnode_lib_file=/home/marcus/repos/buildroot-upstream/output/build/nodejs-/$(Configuration)/node.lib',
npm ERR! gyp info spawn args  
'-Dmodule_root_dir=/home/marcus/repos/buildroot-upstream/output/target/usr/lib/node_modules/serialport/node_modules/@serialport/bindings-cpp',
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:
/home/marcus/repos/buildroot-upstream/output/build/nodejs-/common.gypi not
found (cwd:
/home/marcus/repos/buildroot-upstream/output/target/usr/lib/node_modules/serialport/node_modules/@serialport/bindings-cpp)
while reading includes of binding.gyp while trying to load binding.gyp
npm ERR! gyp ERR! configure error 
npm ERR! gyp ERR! stack Error: `gyp` failed with exit code: 1
npm ERR! gyp ERR! stack     at ChildProcess.onCpExit
(/home/marcus/repos/buildroot-upstream/output/host/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:284:16)
npm ERR! gyp ERR! stack     at ChildProcess.emit (node:events:513:28)
npm ERR! gyp ERR! stack     at Process.ChildProcess._handle.onexit
(node:internal/child_process:293:12)
npm ERR! gyp ERR! System Linux 6.2.0-10027-tuxedo
npm ERR! gyp ERR! command
"/home/marcus/repos/buildroot-upstream/output/host/bin/node"
"/home/marcus/repos/buildroot-upstream/output/host/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js"
"rebuild"
npm ERR! gyp ERR! cwd
/home/marcus/repos/buildroot-upstream/output/target/usr/lib/node_modules/serialport/node_modules/@serialport/bindings-cpp
npm ERR! gyp ERR! node -v v16.20.0
npm ERR! gyp ERR! node-gyp -v v9.1.0
npm ERR! gyp ERR! not ok

npm ERR! A complete log of this run can be found in:
npm ERR!    
/home/marcus/repos/buildroot-upstream/output/build/.npm-cache/_logs/2023-10-25T20_44_09_239Z-debug-0.log
make[1]: *** [package/pkg-generic.mk:374:
/home/marcus/repos/buildroot-upstream/output/build/nodejs-src-16.20.0/.stamp_target_installed]
Error 1
make: *** [Makefile:82: _all] Error 2
```

The culprit seems to be 

> gyp: /home/marcus/repos/buildroot-upstream/output/build/nodejs-/common.gypi not found

Where specifically the 'nodejs-' part of the path looks wrong.

Installing this module works correctly on 2023.8.2 and 2023.02.6. (It's using
prebuilts there though maybe and we never invoke node-gyp because of that?)

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Buildroot] [Bug 15826] nodejs modules with native extensions fail to install
  2023-10-25 20:46 [Buildroot] [Bug 15826] New: nodejs modules with native extensions fail to install bugzilla
@ 2023-10-25 20:50 ` bugzilla
  2023-10-27 10:30 ` bugzilla
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: bugzilla @ 2023-10-25 20:50 UTC (permalink / raw)
  To: buildroot

https://bugs.busybox.net/show_bug.cgi?id=15826

Giulio Benetti <giulio.benetti@benettiengineering.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Assignee|unassigned@buildroot.uclibc |giulio.benetti@benettiengin
                   |.org                        |eering.com

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Buildroot] [Bug 15826] nodejs modules with native extensions fail to install
  2023-10-25 20:46 [Buildroot] [Bug 15826] New: nodejs modules with native extensions fail to install bugzilla
  2023-10-25 20:50 ` [Buildroot] [Bug 15826] " bugzilla
@ 2023-10-27 10:30 ` bugzilla
  2023-10-31  9:03 ` bugzilla
  2023-11-07 21:45 ` bugzilla
  3 siblings, 0 replies; 5+ messages in thread
From: bugzilla @ 2023-10-27 10:30 UTC (permalink / raw)
  To: buildroot

https://bugs.busybox.net/show_bug.cgi?id=15826

--- Comment #1 from Marcus Hoffmann <marcus.hoffmann@othermo.de> ---
This occured when building with buildroot commit
91381143e86110f1912ca539b807be9bad4716ed

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Buildroot] [Bug 15826] nodejs modules with native extensions fail to install
  2023-10-25 20:46 [Buildroot] [Bug 15826] New: nodejs modules with native extensions fail to install bugzilla
  2023-10-25 20:50 ` [Buildroot] [Bug 15826] " bugzilla
  2023-10-27 10:30 ` bugzilla
@ 2023-10-31  9:03 ` bugzilla
  2023-11-07 21:45 ` bugzilla
  3 siblings, 0 replies; 5+ messages in thread
From: bugzilla @ 2023-10-31  9:03 UTC (permalink / raw)
  To: buildroot

https://bugs.busybox.net/show_bug.cgi?id=15826

--- Comment #2 from Giulio Benetti <giulio.benetti@benettiengineering.com> ---
Hi Marcus,

can you please try this [0] patch and report the bug is fixed?

https://patchwork.ozlabs.org/project/buildroot/patch/20231031090114.618913-1-giulio.benetti@benettiengineering.com/

Thank you
Best regards

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Buildroot] [Bug 15826] nodejs modules with native extensions fail to install
  2023-10-25 20:46 [Buildroot] [Bug 15826] New: nodejs modules with native extensions fail to install bugzilla
                   ` (2 preceding siblings ...)
  2023-10-31  9:03 ` bugzilla
@ 2023-11-07 21:45 ` bugzilla
  3 siblings, 0 replies; 5+ messages in thread
From: bugzilla @ 2023-11-07 21:45 UTC (permalink / raw)
  To: buildroot

https://bugs.busybox.net/show_bug.cgi?id=15826

Yann E. MORIN <yann.morin.1998@free.fr> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |yann.morin.1998@free.fr
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #3 from Yann E. MORIN <yann.morin.1998@free.fr> ---
Marcus, All,

Thanks for the report. We bekieve it is now fixed with commit:

    359eb5072d83  package/nodejs: fix build of modules with native code

If you still have the issue, please open a new bug.

Regards,
Yann E. MORIN.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2023-11-07 21:45 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-10-25 20:46 [Buildroot] [Bug 15826] New: nodejs modules with native extensions fail to install bugzilla
2023-10-25 20:50 ` [Buildroot] [Bug 15826] " bugzilla
2023-10-27 10:30 ` bugzilla
2023-10-31  9:03 ` bugzilla
2023-11-07 21:45 ` bugzilla

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.