node-mapnik icon indicating copy to clipboard operation
node-mapnik copied to clipboard

Mapnik v3.5.13 build fails for debian Jessie / Node 4.3.0

Open nyurik opened this issue 9 years ago • 2 comments

Our Docker-based build system fails to build debian:jessie image of mapnik 3.5.13 for node 4.3.0. I can specify a list of packages that must be preinstalled - I tried python, zlib1g-dev, clang, make, pkg-config, but no luck. I looked at Mapnik DebianInstall, but it seams outdated. Are there any other missing packages? Thanks! (P.S. Even though binaries are very convenient, it would be great to sort it out to automate the process). Thanks!

Step 1 : FROM debian:jessie
 ---> 1742affe03b5
Step 2 : RUN apt-get update && apt-get install -y nodejs nodejs-legacy npm git wget python zlib1g-dev clang make pkg-config && rm -rf /var/lib/apt/lists/*
 ---> Using cache
 ---> 72615bb5a348
Step 3 : ENV NVM_DIR /usr/local/nvm
 ---> Using cache
 ---> b984643e9958
Step 4 : RUN wget -qO- https://raw.githubusercontent.com/creationix/nvm/v0.31.1/install.sh | bash && . $NVM_DIR/nvm.sh && nvm install 4.3.0
 ---> Using cache
 ---> ebee866393d3
Step 5 : RUN groupadd -g 1000 -r rungroup && useradd -m -r -g rungroup -u 1000 runuser
 ---> Using cache
 ---> 536e3a192334
Step 6 : USER runuser
 ---> Using cache
 ---> 956bb261e631
Step 7 : ENV HOME /home/runuser LINK g++
 ---> Using cache
 ---> c80948798fce
Step 8 : CMD . $NVM_DIR/nvm.sh && nvm use 4.3.0 && npm install --production && npm install heapdump && npm dedupe
 ---> Using cache
 ---> bf67682c5c8c
Successfully built bf67682c5c8c
Now using node v4.3.0 (npm v2.14.12)
npm WARN package.json [email protected] No README data
npm WARN deprecated [email protected]: Jade has been renamed to pug, please install the latest version of pug instead of jade
WARN engine [email protected]: wanted: {"node":"0.10.x"} (current: {"node":"4.3.0","npm":"2.14.12"})
npm WARN deprecated [email protected]: renamed to d3-queue
npm WARN deprecated [email protected]: Deprecated, use jstransformer

> [email protected] preinstall /opt/service/node_modules/mapnik
> npm install node-pre-gyp

npm WARN package.json [email protected] No license field.
[email protected] node_modules/node-pre-gyp
├── [email protected]
├── [email protected] ([email protected])
├── [email protected] ([email protected])
├── [email protected] ([email protected], [email protected], [email protected], [email protected])
├── [email protected] ([email protected], [email protected], [email protected])
├── [email protected] ([email protected], [email protected], [email protected])
├── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected])
├── [email protected] ([email protected])
└── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected])

> [email protected] install /opt/service/node_modules/bunyan/node_modules/dtrace-provider
> node scripts/install.js

> [email protected] install /opt/service/node_modules/mapnik
> node-pre-gyp install --fallback-to-build

node-pre-gyp ERR! Tried to download: https://mapbox-node-binary.s3.amazonaws.com/mapnik/v3.5.13/Release/node-v46-linux-x64.tar.gz 
node-pre-gyp ERR! Pre-built binaries not found for [email protected] and [email protected] (node-v46 ABI) (falling back to source compile with node-gyp) 
/bin/sh: 1: mapnik-config: not found
gyp: Call to 'mapnik-config --cflags' returned exit status 127. while trying to load binding.gyp

== gyp ERR! ==
  configure error 
  stack Error: `gyp` failed with exit code: 1
  stack     at ChildProcess.onCpExit (/usr/local/nvm/versions/node/v4.3.0/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:355:16)
  stack     at emitTwo (events.js:87:13)
  stack     at ChildProcess.emit (events.js:172:7)
  stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
  System Linux 4.4.0-24-generic
  command "/usr/local/nvm/versions/node/v4.3.0/bin/node" "/usr/local/nvm/versions/node/v4.3.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "--fallback-to-build" "--module=/opt/service/node_modules/mapnik/lib/binding/node-v46-linux-x64/mapnik.node" "--module_name=mapnik" "--module_path=/opt/service/node_modules/mapnik/lib/binding/node-v46-linux-x64"
  cwd /opt/service/node_modules/mapnik
  node -v v4.3.0
  node-gyp -v v3.0.3
  not ok 

== node-pre-gyp ERR! ==
  build error 
  stack Error: Failed to execute '/usr/local/nvm/versions/node/v4.3.0/bin/node /usr/local/nvm/versions/node/v4.3.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/opt/service/node_modules/mapnik/lib/binding/node-v46-linux-x64/mapnik.node --module_name=mapnik --module_path=/opt/service/node_modules/mapnik/lib/binding/node-v46-linux-x64' (1)
  stack     at ChildProcess.<anonymous> (/opt/service/node_modules/mapnik/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
  stack     at emitTwo (events.js:87:13)
  stack     at ChildProcess.emit (events.js:172:7)
  stack     at maybeClose (internal/child_process.js:821:16)
  stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)
  System Linux 4.4.0-24-generic
  command "/usr/local/nvm/versions/node/v4.3.0/bin/node" "/opt/service/node_modules/mapnik/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
  cwd /opt/service/node_modules/mapnik
  node -v v4.3.0
  node-pre-gyp -v v0.6.28
  not ok 

Failed to execute '/usr/local/nvm/versions/node/v4.3.0/bin/node /usr/local/nvm/versions/node/v4.3.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/opt/service/node_modules/mapnik/lib/binding/node-v46-linux-x64/mapnik.node --module_name=mapnik --module_path=/opt/service/node_modules/mapnik/lib/binding/node-v46-linux-x64' (1)

== npm ERR! ==
  Linux 4.4.0-24-generic
  argv "/usr/local/nvm/versions/node/v4.3.0/bin/node" "/usr/local/nvm/versions/node/v4.3.0/bin/npm" "install" "--production"
  node v4.3.0
  npm  v2.14.12
  code ELIFECYCLE

  [email protected] install: `node-pre-gyp install --fallback-to-build`
  Exit status 1

  Failed at the [email protected] install script 'node-pre-gyp install --fallback-to-build'.
  This is most likely a problem with the mapnik package,
  not with npm itself.
  Tell the author that this fails on your system:
      node-pre-gyp install --fallback-to-build
  You can get their info via:
      npm owner ls mapnik
  There is likely additional logging output above.

  Please include the following file with any support request:
      /opt/service/npm-debug.log

ERROR: docker run exited with code 1

nyurik avatar Jun 21 '16 19:06 nyurik

UPDATE: This turned out to be much sillier than I anticipated - Russia is blocking AWS cloud! Still would be good to be able to build locally, but at least now I know why download part fails.

nyurik avatar Jun 21 '16 20:06 nyurik

I also have an error similar to this, however I am trying to access from Brazil: https://github.com/mapnik/node-mapnik/issues/724

andrelom avatar Jan 24 '17 12:01 andrelom