Level / leveldown

Pure C++ Node.js LevelDB binding. An abstract-leveldown compliant store.
MIT License
776 stars 177 forks source link

Compilation requires less than small memory #187

Closed kumavis closed 9 years ago

kumavis commented 9 years ago

I imagine this is a #wontfix but found that I couldn't compile levelDB on Joyent's free tier node box (256mb memory).

Close this as you will.

[root@74337c41-a303-4b1b-f228-da54d486e3b8 ~/vapor-db]# npm i
npm WARN package.json vapor-db@1.0.0 No description
npm WARN package.json vapor-db@1.0.0 No repository field.
npm WARN package.json vapor-db@1.0.0 No README data
-
> leveldown@1.0.7 install /root/vapor-db/node_modules/level/node_modules/leveldown
> node-gyp rebuild

child_process: customFds option is deprecated, use stdio instead.
gyp ERR! UNCAUGHT EXCEPTION 
gyp ERR! stack Error: spawn ENOMEM
gyp ERR! stack     at exports._errnoException (util.js:746:11)
gyp ERR! stack     at ChildProcess.spawn (child_process.js:1155:11)
gyp ERR! stack     at Object.exports.spawn (child_process.js:988:9)
gyp ERR! stack     at Gyp.spawn (/opt/local/lib/node_modules/npm/node_modules/node-gyp/lib/node-gyp.js:186:26)
gyp ERR! stack     at runGyp (/opt/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:333:18)
gyp ERR! stack     at findConfigs (/opt/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:247:23)
gyp ERR! stack     at /opt/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:253:11
gyp ERR! stack     at FSReqWrap.oncomplete (evalmachine.<anonymous>:99:15)
gyp ERR! System SunOS 5.11
gyp ERR! command "node" "/opt/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /root/vapor-db/node_modules/level/node_modules/leveldown
gyp ERR! node -v v0.12.0
gyp ERR! node-gyp -v v1.0.2
gyp ERR! This is a bug in `node-gyp`.
gyp ERR! Try to update node-gyp and file an Issue if it does not help:
gyp ERR!     <https://github.com/TooTallNate/node-gyp/issues>

> sha3@1.1.0 install /root/vapor-db/node_modules/merkle-patricia-tree/node_modules/sha3
> node-gyp rebuild

child_process: customFds option is deprecated, use stdio instead.
make: Entering directory '/root/vapor-db/node_modules/merkle-patricia-tree/node_modules/sha3/build'
  CXX(target) Release/obj.target/sha3/src/addon.o
  CXX(target) Release/obj.target/sha3/src/displayIntermediateValues.o
  CXX(target) Release/obj.target/sha3/src/KeccakF-1600-reference.o
  CXX(target) Release/obj.target/sha3/src/KeccakNISTInterface.o
  CXX(target) Release/obj.target/sha3/src/KeccakSponge.o
  SOLINK_MODULE(target) Release/obj.target/sha3.node
  SOLINK_MODULE(target) Release/obj.target/sha3.node: Finished
  COPY Release/sha3.node
make: Leaving directory '/root/vapor-db/node_modules/merkle-patricia-tree/node_modules/sha3/build'
npm ERR! SunOS 5.11
npm ERR! argv "/opt/local/bin/node" "/opt/local/bin/npm" "i"
npm ERR! node v0.12.0
npm ERR! npm  v2.5.1
npm ERR! code ELIFECYCLE

npm ERR! leveldown@1.0.7 install: `node-gyp rebuild`
npm ERR! Exit status 7
npm ERR! 
npm ERR! Failed at the leveldown@1.0.7 install script 'node-gyp rebuild'.
kumavis commented 9 years ago

hmmm actually I guess I don't know what the problem is -- it seemed to install and compile on Modulus bottom tier fine, with less memory, but then fails when actually running. This is a fresh install.

Found package.json: ./package.json
Start script specified in package.json: node index.js
Initializing Node.js 0.12.4
Now using node v0.12.4
Running command: npm start

> vapor-db@1.0.0 start /mnt/app
> node index.js

/mnt/app/node_modules/level/node_modules/leveldown/node_modules/bindings/bindings.js:83
        throw e
              ^
Error: Module did not self-register.
    at Error (native)
    at Module.load (module.js:355:32)
    at Function.Module._load (module.js:310:12)
    at Module.require (module.js:365:17)
    at require (module.js:384:17)
    at bindings (/mnt/app/node_modules/level/node_modules/leveldown/node_modules/bindings/bindings.js:76:44)
    at Object.<anonymous> (/mnt/app/node_modules/level/node_modules/leveldown/leveldown.js:4:46)
    at Module._compile (module.js:460:26)
    at Object.Module._extensions..js (module.js:478:10)
    at Module.load (module.js:355:32)

npm ERR! Linux 3.13.0-48-generic
npm ERR! argv "/mnt/home/.nvm/versions/node/v0.12.4/bin/node" "/mnt/home/.nvm/versions/node/v0.12.4/bin/npm" "start"
npm ERR! node v0.12.4
npm ERR! npm  v2.10.1
npm ERR! code ELIFECYCLE
npm ERR! vapor-db@1.0.0 start: `node index.js`
npm ERR! Exit status 1
ralphtheninja commented 9 years ago

This should be solved by using prebuilt binaries, see https://github.com/Level/leveldown/issues/95

kumavis commented 9 years ago

@ralphtheninja thanks!

ralphtheninja commented 9 years ago

@kumavis Still a work in progress though :)

kumavis commented 9 years ago

I'll report how it goes -- basic Joyent node box is SunOS -- not too optimistic