Skip to content
This repository was archived by the owner on Jul 1, 2026. It is now read-only.
This repository was archived by the owner on Jul 1, 2026. It is now read-only.

Cannot build on ARM #795

Closed
Closed

Description

@rcarmo

Am trying to get this built on Alpine Linux 3.5 on armhf (with sqlite-dev installed) and it's still failing to invoke the build script correctly.

Here's a log with verbose turned on:

gyp verb get node dir target node version installed: 6.9.2
gyp verb build dir attempting to create "build" dir: /usr/lib/node_modules/node-red-node-sqlite/node_modules/sqlite3/build
gyp verb build dir "build" dir needed to be created? /usr/lib/node_modules/node-red-node-sqlite/node_modules/sqlite3/build
gyp verb build/config.gypi creating config file
gyp verb build/config.gypi writing out config file: /usr/lib/node_modules/node-red-node-sqlite/node_modules/sqlite3/build/config.gypi
gyp verb config.gypi checking for gypi file: /usr/lib/node_modules/node-red-node-sqlite/node_modules/sqlite3/config.gypi
gyp verb common.gypi checking for gypi file: /usr/lib/node_modules/node-red-node-sqlite/node_modules/sqlite3/common.gypi
gyp verb gyp gyp format was not specified; forcing "make"
gyp info spawn /usr/bin/python2
gyp info spawn args [ '/usr/lib/node_modules/npm/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   '/usr/lib/node_modules/node-red-node-sqlite/node_modules/sqlite3/build/config.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/usr/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/usr/lib/node_modules/node-red-node-sqlite/node_modules/sqlite3/.node-gyp/6.9.2/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/lib/node_modules/node-red-node-sqlite/node_modules/sqlite3/.node-gyp/6.9.2',
gyp info spawn args   '-Dnode_gyp_dir=/usr/lib/node_modules/npm/node_modules/node-gyp',
gyp info spawn args   '-Dnode_lib_file=node.lib',
gyp info spawn args   '-Dmodule_root_dir=/usr/lib/node_modules/node-red-node-sqlite/node_modules/sqlite3',
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 verb command remove [ '6.9.2' ]
gyp verb remove using node-gyp dir: /usr/lib/node_modules/node-red-node-sqlite/node_modules/sqlite3/.node-gyp
gyp verb remove removing target version: 6.9.2
gyp verb remove removing development files for version: 6.9.2
gyp info ok 
gyp info it worked if it ends with ok
gyp verb cli [ '/usr/bin/node',
gyp verb cli   '/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js',
gyp verb cli   'build',
gyp verb cli   '--fallback-to-build',
gyp verb cli   '--module=/usr/lib/node_modules/node-red-node-sqlite/node_modules/sqlite3/lib/binding/node-v48-linux-arm/node_sqlite3.
node',
gyp verb cli   '--module_name=node_sqlite3',
gyp verb cli   '--module_path=/usr/lib/node_modules/node-red-node-sqlite/node_modules/sqlite3/lib/binding/node-v48-linux-arm' ]
gyp info using node-gyp@3.4.0
gyp info using node@6.9.2 | linux | arm
gyp verb command build []
gyp verb build type Release
gyp verb architecture arm
gyp verb node dev dir /usr/lib/node_modules/node-red-node-sqlite/node_modules/sqlite3/.node-gyp/6.9.2
gyp verb `which` succeeded for `make` /usr/bin/make
gyp info spawn make
gyp info spawn args [ 'V=1', 'BUILDTYPE=Release', '-C', 'build' ]
make: *** No rule to make target '../.node-gyp/6.9.2/include/node/common.gypi', needed by 'Makefile'.  Stop.
make: Entering directory '/usr/lib/node_modules/node-red-node-sqlite/node_modules/sqlite3/build'
make: Leaving directory '/usr/lib/node_modules/node-red-node-sqlite/node_modules/sqlite3/build'
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:276:23)
gyp ERR! stack     at emitTwo (events.js:106:13)
gyp ERR! stack     at ChildProcess.emit (events.js:191:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12)
gyp ERR! System Linux 4.4.38-v7+
gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--m
odule=/usr/lib/node_modules/node-red-node-sqlite/node_modules/sqlite3/lib/binding/node-v48-linux-arm/node_sqlite3.node" "--module_nam
e=node_sqlite3" "--module_path=/usr/lib/node_modules/node-red-node-sqlite/node_modules/sqlite3/lib/binding/node-v48-linux-arm"
gyp ERR! cwd /usr/lib/node_modules/node-red-node-sqlite/node_modules/sqlite3
gyp ERR! node -v v6.9.2
gyp ERR! node-gyp -v v3.4.0
gyp ERR! not ok 
node-pre-gyp ERR! build error 
node-pre-gyp ERR! stack Error: Failed to execute '/usr/bin/node /usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build
 --fallback-to-build --module=/usr/lib/node_modules/node-red-node-sqlite/node_modules/sqlite3/lib/binding/node-v48-linux-arm/node_sql
ite3.node --module_name=node_sqlite3 --module_path=/usr/lib/node_modules/node-red-node-sqlite/node_modules/sqlite3/lib/binding/node-v
48-linux-arm' (1)
node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (/usr/lib/node_modules/node-red-node-sqlite/node_modules/sqlite3/node_modules
/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack     at emitTwo (events.js:106:13)
node-pre-gyp ERR! stack     at ChildProcess.emit (events.js:191:7)
node-pre-gyp ERR! stack     at maybeClose (internal/child_process.js:877:16)
node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
node-pre-gyp ERR! System Linux 4.4.38-v7+
node-pre-gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/node-red-node-sqlite/node_modules/sqlite3/node_modules/.bin/node-pre
-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /usr/lib/node_modules/node-red-node-sqlite/node_modules/sqlite3
node-pre-gyp ERR! node -v v6.9.2
node-pre-gyp ERR! node-pre-gyp -v v0.6.31
node-pre-gyp ERR! not ok 
Failed to execute '/usr/bin/node /usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/
usr/lib/node_modules/node-red-node-sqlite/node_modules/sqlite3/lib/binding/node-v48-linux-arm/node_sqlite3.node --module_name=node_sq
lite3 --module_path=/usr/lib/node_modules/node-red-node-sqlite/node_modules/sqlite3/lib/binding/node-v48-linux-arm' (1)
npm verb lifecycle sqlite3@3.1.8~install: unsafe-perm in lifecycle false
npm verb lifecycle sqlite3@3.1.8~install: PATH: /usr/lib/node_modules/npm/bin/node-gyp-bin:/usr/lib/node_modules/node-red-node-sqlite
/node_modules/sqlite3/node_modules/.bin:/usr/lib/node_modules/node-red-node-sqlite/node_modules/.bin:/usr/lib/node_modules/.bin:/usr/
local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
npm verb lifecycle sqlite3@3.1.8~install: CWD: /usr/lib/node_modules/node-red-node-sqlite/node_modules/sqlite3
npm info lifecycle sqlite3@3.1.8~install: Failed to exec install script

I can supply a Dockerfile that reproduces this that you can run on any armhf system like a Raspberry Pi.

Activity

  1. matriphe commented on Mar 13, 2017

    @matriphe

    Just found the same problems. Run on Raspberry Pi 3.

    Here the error

    
    > sqlite3@3.1.8 install /usr/local/lib/node_modules/sqlite3
    > node-pre-gyp install --fallback-to-build
    
    node-pre-gyp ERR! Tried to download(403): https://mapbox-node-binary.s3.amazonaws.com/sqlite3/v3.1.8/node-v48-linux-arm.tar.gz
    node-pre-gyp ERR! Pre-built binaries not found for sqlite3@3.1.8 and node@6.10.0 (node-v48 ABI) (falling back to source compile with node-gyp)
    gyp WARN EACCES user "root" does not have permission to access the dev dir "/root/.node-gyp/6.10.0"
    gyp WARN EACCES attempting to reinstall using temporary dev dir "/usr/local/lib/node_modules/sqlite3/.node-gyp"
    make: Entering directory '/usr/local/lib/node_modules/sqlite3/build'
    make: *** No rule to make target '../.node-gyp/6.10.0/include/node/common.gypi', needed by 'Makefile'.  Stop.
    make: Leaving directory '/usr/local/lib/node_modules/sqlite3/build'
    gyp ERR! build error
    gyp ERR! stack Error: `make` failed with exit code: 2
    gyp ERR! stack     at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:276:23)
    gyp ERR! stack     at emitTwo (events.js:106:13)
    gyp ERR! stack     at ChildProcess.emit (events.js:191:7)
    gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12)
    gyp ERR! System Linux 4.4.50-v7+
    gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--module=/usr/local/lib/node_modules/sqlite3/lib/binding/node-v48-linux-arm/node_sqlite3.node" "--module_name=node_sqlite3" "--module_path=/usr/local/lib/node_modules/sqlite3/lib/binding/node-v48-linux-arm"
    gyp ERR! cwd /usr/local/lib/node_modules/sqlite3
    gyp ERR! node -v v6.10.0
    gyp ERR! node-gyp -v v3.5.0
    gyp ERR! not ok
    node-pre-gyp ERR! build error
    node-pre-gyp ERR! stack Error: Failed to execute '/usr/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/usr/local/lib/node_modules/sqlite3/lib/binding/node-v48-linux-arm/node_sqlite3.node --module_name=node_sqlite3 --module_path=/usr/local/lib/node_modules/sqlite3/lib/binding/node-v48-linux-arm' (1)
    node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (/usr/local/lib/node_modules/sqlite3/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
    node-pre-gyp ERR! stack     at emitTwo (events.js:106:13)
    node-pre-gyp ERR! stack     at ChildProcess.emit (events.js:191:7)
    node-pre-gyp ERR! stack     at maybeClose (internal/child_process.js:877:16)
    node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
    node-pre-gyp ERR! System Linux 4.4.50-v7+
    node-pre-gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/sqlite3/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
    node-pre-gyp ERR! cwd /usr/local/lib/node_modules/sqlite3
    node-pre-gyp ERR! node -v v6.10.0
    node-pre-gyp ERR! node-pre-gyp -v v0.6.31
    node-pre-gyp ERR! not ok
    Failed to execute '/usr/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/usr/local/lib/node_modules/sqlite3/lib/binding/node-v48-linux-arm/node_sqlite3.node --module_name=node_sqlite3 --module_path=/usr/local/lib/node_modules/sqlite3/lib/binding/node-v48-linux-arm' (1)
    npm ERR! code ELIFECYCLE
    npm ERR! errno 1
    npm ERR! sqlite3@3.1.8 install: `node-pre-gyp install --fallback-to-build`
    npm ERR! Exit status 1
    npm ERR!
    npm ERR! Failed at the sqlite3@3.1.8 install script 'node-pre-gyp install --fallback-to-build'.
    npm ERR! Make sure you have the latest version of node.js and npm installed.
    npm ERR! If you do, this is most likely a problem with the sqlite3 package,
    npm ERR! not with npm itself.
    npm ERR! Tell the author that this fails on your system:
    npm ERR!     node-pre-gyp install --fallback-to-build
    npm ERR! You can get information on how to open an issue for this project with:
    npm ERR!     npm bugs sqlite3
    npm ERR! Or if that isn't available, you can get their info via:
    npm ERR!     npm owner ls sqlite3
    npm ERR! There is likely additional logging output above.
    
    npm ERR! A complete log of this run can be found in:
    npm ERR!     /root/.npm/_logs/2017-03-13T06_20_33_067Z-debug.log
    
  2. matriphe commented on Mar 18, 2017

    @matriphe

    refrencing on #726 finally can install using npm install sqlite3 --unsafe-perm

  3. rzr commented on Aug 8, 2018

    @rzr
    Contributor

    It worked for me on raspbian (also in docker with qemu)
    #1028

  4. added a commit that references this issue on Nov 9, 2018
  5. added a commit that references this issue on Jan 28, 2019
  6. FredericGuilbault commented on Feb 9, 2019

    @FredericGuilbault

    Adding --unsafe-perm solved the problem for me in pi-gen :D

  7. added a commit that references this issue on Sep 30, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions