question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

1.11.2 can no longer be built from source on node-alpine docker VM

See original GitHub issue

Package.json

{
    "name": "test",
    "main": "server/server.js",
    "dependencies":
    {
        "grpc": "1.11.2"  // with 1.11.1 it works
    }
}

Dockerfile

FROM mhart/alpine-node:8

COPY ./server $HOME/server
COPY ./package.json $HOME/package.json

RUN apk add --no-cache libc6-compat python alpine-sdk
RUN npm install -g node-gyp
RUN npm install --build-from-source=grpc

EXPOSE 80
ENTRYPOINT ["node", "server/server.js"]

I tried all alpine-node versions from 6 to 10 but no luck

docker build . output

Sending build context to Docker daemon    131MB
Step 1/11 : FROM mhart/alpine-node:8
 ---> a1ae0271a8c0
Step 2/11 : MAINTAINER Geoffroy Lesage <geoffroy@starchup.com>
 ---> Using cache
 ---> e131ca3e13e5
Step 3/11 : COPY ./server $HOME/server
 ---> Using cache
 ---> 47258339d825
Step 4/11 : COPY ./package.json $HOME/package.json
 ---> db2d263170d0
Step 5/11 : RUN apk add --no-cache libc6-compat python alpine-sdk
 ---> Running in b4421f79622d
fetch http://dl-cdn.alpinelinux.org/alpine/v3.6/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.6/community/x86_64/APKINDEX.tar.gz
(1/64) Installing fakeroot (1.21-r1)
(2/64) Installing sudo (1.8.19_p2-r0)
(3/64) Installing libcap (2.25-r1)
(4/64) Installing pax-utils (1.2.2-r0)
(5/64) Installing libressl2.5-libtls (2.5.5-r0)
(6/64) Installing libressl (2.5.5-r0)
(7/64) Installing libattr (2.4.47-r6)
(8/64) Installing attr (2.4.47-r6)
(9/64) Installing tar (1.29-r1)
(10/64) Installing pkgconf (1.3.7-r0)
(11/64) Installing patch (2.7.5-r3)
(12/64) Installing lzip (1.19-r0)
(13/64) Installing ca-certificates (20161130-r2)
(14/64) Installing libssh2 (1.8.0-r1)
(15/64) Installing libcurl (7.59.0-r0)
(16/64) Installing curl (7.59.0-r0)
(17/64) Installing abuild (3.0.0_rc2-r8)
Executing abuild-3.0.0_rc2-r8.pre-install
(18/64) Installing binutils-libs (2.28-r3)
(19/64) Installing binutils (2.28-r3)
(20/64) Installing gmp (6.1.2-r0)
(21/64) Installing isl (0.17.1-r0)
(22/64) Installing libgomp (6.3.0-r4)
(23/64) Installing libatomic (6.3.0-r4)
(24/64) Installing mpfr3 (3.1.5-r0)
(25/64) Installing mpc1 (1.0.3-r0)
(26/64) Installing gcc (6.3.0-r4)
(27/64) Installing musl-dev (1.1.16-r14)
(28/64) Installing libc-dev (0.7.1-r0)
(29/64) Installing g++ (6.3.0-r4)
(30/64) Installing make (4.2.1-r0)
(31/64) Installing fortify-headers (0.8-r0)
(32/64) Installing build-base (0.5-r0)
(33/64) Installing expat (2.2.0-r1)
(34/64) Installing pcre (8.41-r0)
(35/64) Installing git (2.13.5-r0)
(36/64) Installing xz-libs (5.2.3-r0)
(37/64) Installing lzo (2.10-r0)
(38/64) Installing squashfs-tools (4.3-r3)
(39/64) Installing libburn (1.4.6-r0)
(40/64) Installing ncurses-terminfo-base (6.0_p20171125-r0)
(41/64) Installing ncurses-terminfo (6.0_p20171125-r0)
(42/64) Installing ncurses-libs (6.0_p20171125-r0)
(43/64) Installing libedit (20170329.3.1-r2)
(44/64) Installing libacl (2.2.52-r3)
(45/64) Installing libisofs (1.4.6-r0)
(46/64) Installing libisoburn (1.4.6-r0)
(47/64) Installing xorriso (1.4.6-r0)
(48/64) Installing acct (6.6.3-r0)
(49/64) Installing lddtree (1.26-r0)
(50/64) Installing libuuid (2.28.2-r2)
(51/64) Installing libblkid (2.28.2-r2)
(52/64) Installing device-mapper-libs (2.02.168-r3)
(53/64) Installing cryptsetup-libs (1.7.5-r0)
(54/64) Installing kmod (23-r1)
(55/64) Installing mkinitfs (3.1.0-r4)
Executing mkinitfs-3.1.0-r4.post-install
(56/64) Installing mtools (4.0.18-r1)
(57/64) Installing alpine-sdk (0.5-r0)
(58/64) Installing libc6-compat (1.1.16-r14)
(59/64) Installing libbz2 (1.0.6-r5)
(60/64) Installing libffi (3.2.1-r3)
(61/64) Installing gdbm (1.12-r0)
(62/64) Installing readline (6.3.008-r5)
(63/64) Installing sqlite-libs (3.20.1-r1)
(64/64) Installing python2 (2.7.14-r0)
Executing busybox-1.26.2-r9.trigger
Executing ca-certificates-20161130-r2.trigger
OK: 234 MiB in 77 packages
Removing intermediate container b4421f79622d
 ---> d073f36f740c
Step 6/11 : RUN npm install -g node-gyp
 ---> Running in e9c2a3095b0e
/usr/bin/node-gyp -> /usr/lib/node_modules/node-gyp/bin/node-gyp.js
+ node-gyp@3.6.2
added 101 packages from 64 contributors in 6.79s
Removing intermediate container e9c2a3095b0e
 ---> 64ec059bbf57
Step 7/11 : RUN npm install --build-from-source=grpc
 ---> Running in f63255f6604a

> grpc@1.11.2 install /node_modules/grpc
> node-pre-gyp install --fallback-to-build --library=static_library

make: Entering directory '/node_modules/grpc/build'
  CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/surface/init.o
  CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/avl/avl.o
  CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/backoff/backoff.o
  CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/channel/channel_args.o
  CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/channel/channel_stack.o
  CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/channel/channel_stack_builder.o
  CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/channel/connected_channel.o
  CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/channel/handshaker.o
  CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/channel/handshaker_factory.o
  CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/channel/handshaker_registry.o
  CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/compression/compression.o
  CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/compression/compression_internal.o
  CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/compression/message_compress.o
  CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/compression/stream_compression.o
  CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/compression/stream_compression_gzip.o
  CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/compression/stream_compression_identity.o
  CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/debug/stats.o
  CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/debug/stats_data.o
  CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/http/format_request.o
  CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/http/httpcli.o
  CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/http/parser.o
  CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/iomgr/call_combiner.o
  CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/iomgr/combiner.o
  CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/iomgr/endpoint.o
  CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/iomgr/endpoint_pair_posix.o
  CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/iomgr/endpoint_pair_uv.o
  CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/iomgr/endpoint_pair_windows.o
  CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/iomgr/error.o
  CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/iomgr/ev_epoll1_linux.o
  CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/iomgr/ev_epollex_linux.o
  CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/iomgr/ev_epollsig_linux.o
  CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/iomgr/ev_poll_posix.o
  CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/iomgr/ev_posix.o
  CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/iomgr/ev_windows.o
  CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/iomgr/exec_ctx.o
  CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/iomgr/executor.o
  CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/iomgr/fork_posix.o
  CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/iomgr/fork_windows.o
  CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/iomgr/gethostname_fallback.o
  CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/iomgr/gethostname_host_name_max.o
  CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/iomgr/gethostname_sysconf.o
  CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/iomgr/iocp_windows.o
  CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/iomgr/iomgr.o
  CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/iomgr/iomgr_posix.o
  CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/iomgr/iomgr_uv.o
  CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/iomgr/iomgr_windows.o
  CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/iomgr/is_epollexclusive_available.o
  CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/iomgr/load_file.o
  CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/iomgr/lockfree_event.o
  CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/iomgr/network_status_tracker.o
  CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/iomgr/polling_entity.o
make: *** No rule to make target 'Release/obj.target/grpc/deps/grpc/src/core/lib/iomgr/pollset_set_uv.o', needed by 'Release/obj.target/libgrpc.a'.  Stop.
make: Leaving directory '/node_modules/grpc/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/npm-lifecycle/node_modules/node-gyp/lib/build.js:258:23)
gyp ERR! stack     at emitTwo (events.js:126:13)
gyp ERR! stack     at ChildProcess.emit (events.js:214:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)
gyp ERR! System Linux 4.9.87-linuxkit-aufs
gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/npm-lifecycle/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--library=static_library" "--module=/node_modules/grpc/src/node/extension_binary/node-v57-linux-x64-musl/grpc_node.node" "--module_name=grpc_node" "--module_path=/node_modules/grpc/src/node/extension_binary/node-v57-linux-x64-musl" "--napi_version=1" "--node_abi_napi=napi"
gyp ERR! cwd /node_modules/grpc
gyp ERR! node -v v8.11.1
gyp ERR! node-gyp -v v3.6.2
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/npm-lifecycle/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --library=static_library --module=/node_modules/grpc/src/node/extension_binary/node-v57-linux-x64-musl/grpc_node.node --module_name=grpc_node --module_path=/node_modules/grpc/src/node/extension_binary/node-v57-linux-x64-musl --napi_version=1 --node_abi_napi=napi' (1)
node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (/node_modules/grpc/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack     at emitTwo (events.js:126:13)
node-pre-gyp ERR! stack     at ChildProcess.emit (events.js:214:7)
node-pre-gyp ERR! stack     at maybeClose (internal/child_process.js:925:16)
node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
node-pre-gyp ERR! System Linux 4.9.87-linuxkit-aufs
node-pre-gyp ERR! command "/usr/bin/node" "/node_modules/grpc/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build" "--library=static_library"
node-pre-gyp ERR! cwd /node_modules/grpc
node-pre-gyp ERR! node -v v8.11.1
node-pre-gyp ERR! node-pre-gyp -v v0.10.0
node-pre-gyp ERR! not ok 
Failed to execute '/usr/bin/node /usr/lib/node_modules/npm/node_modules/npm-lifecycle/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --library=static_library --module=/node_modules/grpc/src/node/extension_binary/node-v57-linux-x64-musl/grpc_node.node --module_name=grpc_node --module_path=/node_modules/grpc/src/node/extension_binary/node-v57-linux-x64-musl --napi_version=1 --node_abi_napi=napi' (1)
npm WARN starchup-notifier@1.0.0 No license field.

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! grpc@1.11.2 install: `node-pre-gyp install --fallback-to-build --library=static_library`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the grpc@1.11.2 install 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-05-04T19_56_48_814Z-debug.log
The command '/bin/sh -c npm install --build-from-source=grpc' returned a non-zero code: 1

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
murgatroid99commented, May 4, 2018

OK, I can reproduce this even on a glibc system. It looks like I screwed up the submodule when I published the package. I can publish a new version to fix that.

Until then, I would recommend not compiling from source. We publish prebuilt binary packages for alpine.

0reactions
nicolasnoblecommented, May 4, 2018

And that’s why we need compilation from source to work 😉

Closing, as 1.11.3 is now out…

Read more comments on GitHub >

github_iconTop Results From Across the Web

Docker Node Alpine Image Build Fails on node-gyp
I'm using the node:10.15-alpine Docker image as a base. The image build fails with the following error: gyp ERR! configure error gyp ERR!...
Read more >
Docker Engine release notes
Docker Engine release notes. This document describes the latest changes, additions, known issues, and fixes for Docker Engine.
Read more >
Docker Compose release notes
Introduced support for cache_from , cache_to , no_cache and pull attributes in the build section. These attributes allow forcing a complete rebuild from...
Read more >
Docker Desktop for Mac Edge release notes
Compose-on-Kubernetes is no longer included in the Docker Desktop installer. You can download it separately from the compose-on-kubernetes release page.
Read more >
Docker Desktop for Windows Edge Release notes
Docker Desktop cannot be installed on Windows 1703 (build 15063) anymore. ... source (for example, -v ~/dir:/vm-dir ); localhost and 127.0.0.1 can both...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found