mapnik / node-mapnik

Bindings to mapnik for node.js
http://mapnik.org/documentation/node-mapnik
BSD 3-Clause "New" or "Revised" License
532 stars 165 forks source link

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

Open nyurik opened 8 years ago

nyurik commented 8 years ago

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 tilerator@0.0.11 No README data
npm WARN deprecated jade@1.11.0: Jade has been renamed to pug, please install the latest version of pug instead of jade
WARN engine tilelive-vector@3.9.3: wanted: {"node":"0.10.x"} (current: {"node":"4.3.0","npm":"2.14.12"})
npm WARN deprecated queue-async@1.0.7: renamed to d3-queue
npm WARN deprecated transformers@2.1.0: Deprecated, use jstransformer

> mapnik@3.5.13 preinstall /opt/service/node_modules/mapnik
> npm install node-pre-gyp

npm WARN package.json mapnik@3.5.13 No license field.
node-pre-gyp@0.6.28 node_modules/node-pre-gyp
├── semver@5.1.0
├── nopt@3.0.6 (abbrev@1.0.9)
├── mkdirp@0.5.1 (minimist@0.0.8)
├── rc@1.1.6 (ini@1.3.4, deep-extend@0.4.1, strip-json-comments@1.0.4, minimist@1.2.0)
├── tar@2.2.1 (inherits@2.0.1, block-stream@0.0.9, fstream@1.0.10)
├── npmlog@2.0.4 (ansi@0.3.1, gauge@1.2.7, are-we-there-yet@1.1.2)
├── tar-pack@3.1.3 (uid-number@0.0.6, debug@2.2.0, once@1.3.3, readable-stream@2.0.6, fstream@1.0.10, fstream-ignore@1.0.5)
├── rimraf@2.5.2 (glob@7.0.5)
└── request@2.72.0 (tunnel-agent@0.4.3, aws-sign2@0.6.0, oauth-sign@0.8.2, forever-agent@0.6.1, caseless@0.11.0, is-typedarray@1.0.0, stringstream@0.0.5, isstream@0.1.2, aws4@1.4.1, json-stringify-safe@5.0.1, extend@3.0.0, tough-cookie@2.2.2, node-uuid@1.4.7, qs@6.1.0, combined-stream@1.0.5, mime-types@2.1.11, form-data@1.0.0-rc4, bl@1.1.2, hawk@3.1.3, http-signature@1.1.1, har-validator@2.0.6)

> dtrace-provider@0.6.0 install /opt/service/node_modules/bunyan/node_modules/dtrace-provider
> node scripts/install.js

> mapnik@3.5.13 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 mapnik@3.5.13 and node@4.3.0 (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

  mapnik@3.5.13 install: `node-pre-gyp install --fallback-to-build`
  Exit status 1

  Failed at the mapnik@3.5.13 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 commented 8 years ago

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.

andrelom commented 7 years ago

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