I’m encountering a problem with an internal application. As such I won’t be able to post the package.json file that would be truly useful in debugging this. However, on a long dependency chain with npm, I’m seeing the following issues.
Its needing to compile some native dependencies by the looks.
First the plan.sh:
pkg_name=forest-portal
pkg_origin=rakops
pkg_version="0.1.0"
pkg_build_deps=(
core/node
core/git
core/gcc
core/glibc
core/libpng
core/make
core/libtool
core/autoconf
core/automake
core/nasm
)
pkg_deps=(
core/coreutils
core/nginx
)
pkg_svc_run="nginx -c ${pkg_svc_config_path}/nginx.conf"
pkg_svc_user="root"
pkg_exports=(
[port]=port
)
pkg_exposes=(port)
pkg_binds_optional=(
[api]="port"
)
do_build() {
cp package*.json "${CACHE_PATH}/"
pushd "${CACHE_PATH}" > /dev/null
npm install \
--unsafe-perm \
--loglevel error \
--fetch-retries 5
fix_interpreter "node_modules/.bin/*" core/coreutils bin/env
npm run-script build
popd > /dev/null
}
do_install() {
attach
cp -r dist "${pkg_prefix}/"
}
And here are the build errors (from npm install
):
> cwebp-bin@4.0.0 postinstall /hab/cache/src/forest-portal-0.1.0/node_modules/cwebp-bin
> node lib/install.js
⚠ spawn /hab/cache/src/forest-portal-0.1.0/node_modules/cwebp-bin/vendor/cwebp ENOENT
⚠ cwebp pre-build test failed
ℹ compiling from source
✔ cwebp built successfully
> gifsicle@3.0.4 postinstall /hab/cache/src/forest-portal-0.1.0/node_modules/gifsicle
> node lib/install.js
⚠ spawn /hab/cache/src/forest-portal-0.1.0/node_modules/gifsicle/vendor/gifsicle ENOENT
⚠ gifsicle pre-build test failed
ℹ compiling from source
✔ gifsicle built successfully
> mozjpeg@5.0.0 postinstall /hab/cache/src/forest-portal-0.1.0/node_modules/mozjpeg
> node lib/install.js
⚠ spawn /hab/cache/src/forest-portal-0.1.0/node_modules/mozjpeg/vendor/cjpeg ENOENT
⚠ mozjpeg pre-build test failed
ℹ compiling from source
✖ Error: autoreconf -fiv && ./configure --disable-shared --disable-dependency-tracking --with-jpeg8 --prefix="/hab/cache/src/forest-portal-0.1.0/node_modules/mozjpeg/vendor" --bindir="/hab/cache/src/forest-portal-0.1.0/node_modules/mozjpeg/vendor" --libdir="/hab/cache/src/forest-portal-0.1.0/node_modules/mozjpeg/vendor" && make -j2 && make install -j2
Command failed: autoreconf -fiv
autoreconf: Entering directory `.'
autoreconf: configure.ac: not using Gettext
autoreconf: running: aclocal --force
autoreconf: configure.ac: tracing
autoreconf: configure.ac: not using Libtool
autoreconf: running: /hab/pkgs/core/autoconf/2.69/20170513214252/bin/autoconf --force
configure.ac:23: error: possibly undefined macro: AC_PROG_LIBTOOL
If this token and others are legitimate, please use m4_pattern_allow.
See the Autoconf documentation.
autoreconf: /hab/pkgs/core/autoconf/2.69/20170513214252/bin/autoconf failed with exit status: 1
at ChildProcess.exithandler (child_process.js:275:12)
at emitTwo (events.js:126:13)
at ChildProcess.emit (events.js:214:7)
at maybeClose (internal/child_process.js:925:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
> optipng-bin@3.1.4 postinstall /hab/cache/src/forest-portal-0.1.0/node_modules/optipng-bin
> node lib/install.js
⚠ spawn /hab/cache/src/forest-portal-0.1.0/node_modules/optipng-bin/vendor/optipng ENOENT
⚠ optipng pre-build test failed
ℹ compiling from source
✖ Error: ./configure --with-system-zlib --prefix="/hab/cache/src/forest-portal-0.1.0/node_modules/optipng-bin/vendor" --bindir="/hab/cache/src/forest-portal-0.1.0/node_modules/optipng-bin/vendor" && make install
Command failed: ./configure --with-system-zlib --prefix="/hab/cache/src/forest-portal-0.1.0/node_modules/optipng-bin/vendor" --bindir="/hab/cache/src/forest-portal-0.1.0/node_modules/optipng-bin/vendor"
at ChildProcess.exithandler (child_process.js:275:12)
at emitTwo (events.js:126:13)
at ChildProcess.emit (events.js:214:7)
at maybeClose (internal/child_process.js:925:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
> pngquant-bin@4.0.0 postinstall /hab/cache/src/forest-portal-0.1.0/node_modules/pngquant-bin
> node lib/install.js
⚠ spawn /hab/cache/src/forest-portal-0.1.0/node_modules/pngquant-bin/vendor/pngquant ENOENT
⚠ pngquant pre-build test failed
ℹ compiling from source
✔ pngquant pre-build test passed successfully
✖ Error: pngquant failed to build, make sure that libpng-dev is installed
at Promise.all.then.arr (/hab/cache/src/forest-portal-0.1.0/node_modules/pngquant-bin/node_modules/bin-build/node_modules/execa/index.js:231:11)
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:188:7)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! pngquant-bin@4.0.0 postinstall: `node lib/install.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the pngquant-bin@4.0.0 postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2018-06-14T06_43_24_580Z-debug.log