mapbox / mapbox-studio-classic

https://www.mapbox.com/mapbox-studio/
BSD 3-Clause "New" or "Revised" License
1.14k stars 229 forks source link

install fail in FreeBSD jail #1533

Open PeterSprague opened 8 years ago

PeterSprague commented 8 years ago

Need to move to jail to isolate due to dependency conflicts between node 010 and boost 1.60 with standard FreeBSD ports.

See error gist: https://gist.github.com/PeterSprague/c5a8ad574aadceff8f4f

All dependencies are installed including node 0.10.0, gmake, gcc, .... Mapnik is built from master -> 3.0.11 using boost 1.60

Here are my notes: node-mapnik install mapnik@3.x to match mapnik v3.0.11 see: https://github.com/mapnik/node-mapnik/ As root

cd /usr/local/src
git clone https://github.com/mapnik/node-mapnik.git
cd node-mapnik
npm install g --build-from-source

Installed to /usr/local/lib/node_modules

install other dependences globally found installing node dependencies prior to mapbox-studio created less errors (?)

pkg install py27-gdal fixed python not found error ln -s /usr/local/bin/python2 /usr/local/bin/python

cd /usr/local/src
git clone https://github.com/mapbox/mapbox-studio.git
cd mapbox-studio
mapnik-config -v -> works v3.0.11

also installed -g previously - thinking might fix errors npm install node-gyp node-pre-gyp --fall-back-to-build see https://github.com/naturalatlas/node-gdal npm install gdal --build-from-source --shared_gdal make sure sqlite3 is install in pkg npm install sqlite3 --sqlite=/usr/local

was failing until installed directly npm install phantomjs@1.9.18

npm install --build-from-source

PeterSprague commented 8 years ago

Doesn't seem to be picking up global node-mapnik install

cd /usr/local/src/mapbox-studio-classic
npm install mapnik --build-from-source

Returns same error as in gist

PeterSprague commented 8 years ago

Nuked local & /usr/local/lib/node_modules in jail rebuilt npm with node010

npm install -g node-gyp
npm install -g node-pre-gyp
cd /usr/local/src/mapbox-studio-classic
npm install -g --build-from-source

Error:

mapbox-studio@0.3.3 preinstall /usr/local/lib/node_modules/mapbox-studio node scripts/run.js scripts/vendor-node.sh

Running /usr/local/lib/node_modules/mapbox-studio/scripts/vendor-node.sh NOTICE: NODE_VERSION environment variable not defined, defaulting to 0.10.33 NOTICE: TARGET_ARCH environment variable not defined, defaulting to x64 Requested node version: 0.10.33 Requested node platform+arch: freebsd-x64 Requested bin only: true Not a valid platform+arch. Specify one of linux-x64|darwin-x64|win32-ia32|win32-x64

???

npm install --build-from-source

npm WARN package.json mapbox-studio@0.3.3 No license field. npm WARN cannot run in wd mapbox-studio@0.3.3 node scripts/run.js scripts/vendor-node.sh (wd=/usr/local/src/mapbox-studio-classic) npm WARN deprecated queue-async@1.0.7: renamed to d3-queue npm WARN deprecated npmconf@2.1.1: this package has been reintegrated into npm and is now out of date with respect to npm npm WARN deprecated queue-async@1.1.1: renamed to d3-queue npm WARN deprecated graceful-fs@3.0.8: graceful-fs version 3 and before will fail on newer node releases. Please update to graceful-fs@^4.0.0 as soon as possible. npm WARN deprecated native-or-bluebird@1.1.2: 'native-or-bluebird' is deprecated. Please use 'any-promise' instead. npm WARN deprecated native-or-bluebird@1.2.0: 'native-or-bluebird' is deprecated. Please use 'any-promise' instead.

Fails at node-gdal install

cd /usr/local
npm install -g gdal --build-from-source --shared_gdal
npm -g install phantomjs@1.9.18

Successful, though installs phantomjs-1.9.8-macosx

cd /usr/local/src/mapbox-studio-classic
npm install --build from source
npm install

Both fail to find global node_module installs see: https://nodejs.org/api/modules.html#modules_loading_from_the_global_folders

PeterSprague commented 8 years ago

Run as non-root jail account:

$ npm install --build-from-source
npm WARN package.json mapbox-studio@0.3.3 No license field.

mapbox-studio@0.3.3 preinstall /usr/local/src/mapbox-studio-classic node scripts/run.js scripts/vendor-node.sh

Running /usr/local/src/mapbox-studio-classic/scripts/vendor-node.sh NOTICE: NODE_VERSION environment variable not defined, defaulting to 0.10.33 NOTICE: TARGET_ARCH environment variable not defined, defaulting to x64 Requested node version: 0.10.33 Requested node platform+arch: freebsd-x64 Requested bin only: true Not a valid platform+arch. Specify one of linux-x64|darwin-x64|win32-ia32|win32-x64

% Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 2341 100 2341 0 0 3975 0 --:--:-- --:--:-- --:--:-- 3974

npm ERR! FreeBSD 10.2-RELEASE-p15 npm ERR! argv "node" "/usr/local/bin/npm" "install" "--build-from-source" npm ERR! node v0.10.40 npm ERR! npm v2.14.7 npm ERR! code ELIFECYCLE npm ERR! mapbox-studio@0.3.3 preinstall: node scripts/run.js scripts/vendor-node.sh npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the mapbox-studio@0.3.3 preinstall script 'node scripts/run.js scripts/vendor-node.sh'. npm ERR! This is most likely a problem with the mapbox-studio package, npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system: npm ERR! node scripts/run.js scripts/vendor-node.sh npm ERR! You can get their info via: npm ERR! npm owner ls mapbox-studio npm ERR! There is likely additional logging output above. npm ERR! FreeBSD 10.2-RELEASE-p15 npm ERR! argv "node" "/usr/local/bin/npm" "install" "--build-from-source" npm ERR! node v0.10.40 npm ERR! npm v2.14.7 npm ERR! path npm-debug.log.5e5656bda100ed09bf642371e79f6030 npm ERR! code EACCES npm ERR! errno 3

npm ERR! Error: EACCES, open 'npm-debug.log.5e5656bda100ed09bf642371e79f6030' npm ERR! { [Error: EACCES, open 'npm-debug.log.5e5656bda100ed09bf642371e79f6030'] npm ERR! errno: 3, npm ERR! code: 'EACCES', npm ERR! path: 'npm-debug.log.5e5656bda100ed09bf642371e79f6030' } npm ERR! npm ERR! Please try running this command again as root/Administrator.

npm ERR! Please include the following file with any support request: npm ERR! /usr/local/src/mapbox-studio-classic/npm-debug.log

PeterSprague commented 8 years ago

Tested as non-root user

git cloned to user directory as user: npm install --build-from-sources

Error as above:

$ npm install --build-from-source npm WARN package.json mapbox-studio@0.3.3 No license field.

mapbox-studio@0.3.3 preinstall /usr/home/pms/mapbox-studio-classic node scripts/run.js scripts/vendor-node.sh

Running /usr/home/pms/mapbox-studio-classic/scripts/vendor-node.sh NOTICE: NODE_VERSION environment variable not defined, defaulting to 0.10.33 NOTICE: TARGET_ARCH environment variable not defined, defaulting to x64 Requested node version: 0.10.33 Requested node platform+arch: freebsd-x64 Requested bin only: true Not a valid platform+arch. Specify one of linux-x64|darwin-x64|win32-ia32|win32-x64

% Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 2341 100 2341 0 0 4901 0 --:--:-- --:--:-- --:--:-- 4907

npm ERR! FreeBSD 10.2-RELEASE-p15 npm ERR! argv "node" "/usr/local/bin/npm" "install" "--build-from-source" npm ERR! node v0.10.40 npm ERR! npm v2.14.7 npm ERR! code ELIFECYCLE npm ERR! mapbox-studio@0.3.3 preinstall: node scripts/run.js scripts/vendor-node.sh npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the mapbox-studio@0.3.3 preinstall script 'node scripts/run.js scripts/vendor-node.sh'. npm ERR! This is most likely a problem with the mapbox-studio package, npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system: npm ERR! node scripts/run.js scripts/vendor-node.sh npm ERR! You can get their info via: npm ERR! npm owner ls mapbox-studio npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request: npm ERR! /usr/home/pms/mapbox-studio-classic/npm-debug.log