TritonDataCenter / node-manta-sync

Rsync style command for Joyent's Manta
31 stars 9 forks source link

Failures Installing on FreeBSD 11 #31

Open qdzlug opened 6 years ago

qdzlug commented 6 years ago

Hey Dave,

Been testing triton/manta tooling on FreeBSD and I've discovered the least painful way to build things it to pass the --no-optional flag, which causes things to work around issues with Dtrace (the other fix is to install the entire source tree so it can build dtrace-provider.

However, it looks like -manta-sync has a hard dependency on dtrace-provider (see below).

I didn't know how important this was to the program, and if we could get by making it optional. I'm not all that skilled in node so I have no idea how to tell it to build w/o that - but if you want to tell me how I can test it myself for you.

Let me know. Thanks!

Jay

root@jaybsd:~ # npm install -g manta-sync --unsafe-perms --no-optional
npm WARN deprecated node-uuid@1.4.8: Use uuid module instead
/usr/local/bin/manta-sync -> /usr/local/lib/node_modules/manta-sync/manta-sync

> dtrace-provider@0.7.1 install /usr/local/lib/node_modules/manta-sync/node_modules/dtrace-provider
> node scripts/install.js

fs.js:773
  return binding.rename(pathModule._makeLong(oldPath),
                 ^

Error: EACCES: permission denied, rename '/usr/local/lib/node_modules/manta-sync/node_modules/dtrace-provider/compile.py' -> '/usr/local/lib/node_modules/manta-sync/node_modules/dtrace-provider/binding.gyp'
    at Object.fs.renameSync (fs.js:773:18)
    at Object.<anonymous> (/usr/local/lib/node_modules/manta-sync/node_modules/dtrace-provider/scripts/install.js:14:4)
    at Module._compile (module.js:624:30)
    at Object.Module._extensions..js (module.js:635:10)
    at Module.load (module.js:545:32)
    at tryModuleLoad (module.js:508:12)
    at Function.Module._load (module.js:500:3)
    at Function.Module.runMain (module.js:665:10)
    at startup (bootstrap_node.js:187:16)
    at bootstrap_node.js:607:3
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! dtrace-provider@0.7.1 install: `node scripts/install.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the dtrace-provider@0.7.1 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/2017-10-23T04_49_46_365Z-debug.log
bahamas10 commented 6 years ago

manta-sync itself does not have a dependency on the dtrace provider - this would come from either the bunyan module it depends on directly or the manta module that also depends on bunyan. It looks like the dtrace provider was made an optional dependency of bunyan 1.2.0 (https://github.com/trentm/node-bunyan/blob/master/CHANGES.md#120). I'll try bumping these deps and testing manta-sync.

bahamas10 commented 6 years ago

try manta-sync@0.5.0 - I've bumped a lot of the deps.

$ npm publish
+ manta-sync@0.5.0
qdzlug commented 6 years ago

Hey Dave,

Still blowing up for me; still seems to be trying to install the dtrace-provider....

root@jaybsd:~ # !34
npm install -g manta-sync --unsafe-perms --no-optional
npm WARN deprecated node-uuid@1.4.8: Use uuid module instead
/usr/local/bin/manta-sync -> /usr/local/lib/node_modules/manta-sync/manta-sync

> dtrace-provider@0.7.1 install /usr/local/lib/node_modules/manta-sync/node_modules/dtrace-provider
> node scripts/install.js

fs.js:773
  return binding.rename(pathModule._makeLong(oldPath),
                 ^

Error: EACCES: permission denied, rename '/usr/local/lib/node_modules/manta-sync/node_modules/dtrace-provider/compile.py' -> '/usr/local/lib/node_modules/manta-sync/node_modules/dtrace-provider/binding.gyp'
    at Object.fs.renameSync (fs.js:773:18)
    at Object.<anonymous> (/usr/local/lib/node_modules/manta-sync/node_modules/dtrace-provider/scripts/install.js:14:4)
    at Module._compile (module.js:624:30)
    at Object.Module._extensions..js (module.js:635:10)
    at Module.load (module.js:545:32)
    at tryModuleLoad (module.js:508:12)
    at Function.Module._load (module.js:500:3)
    at Function.Module.runMain (module.js:665:10)
    at startup (bootstrap_node.js:187:16)
    at bootstrap_node.js:607:3
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! dtrace-provider@0.7.1 install: `node scripts/install.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the dtrace-provider@0.7.1 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/2017-10-26T21_39_42_934Z-debug.log

Looks to be grabbing your new version....

13 silly resolveWithNewModule manta-sync@0.5.0 checking installable status
14 http fetch GET 200 https://registry.npmjs.org/latest 103ms
15 http fetch GET 200 https://registry.npmjs.org/dashdash 105ms
16 http fetch GET 200 https://registry.npmjs.org/humanize-time 105ms
17 http fetch GET 200 https://registry.npmjs.org/mkdirp 108ms
18 http fetch GET 200 https://registry.npmjs.org/manta 114ms

So, not sure what to test again....

Jay

papertigers commented 6 years ago

I just tried this on FreeBSD-CURRENT (aka version 12 which isnt out yet). I didnt get EACCESS but I was able to get dtrace-provider installed. I had to manually install gcc (pkg install gcc) first.

Also worth noting was that I did this with node v4.x and npm 2.x

However that leaves another issue for me:

[link@daruk ~]$ manta-sync 
{ [Error: Cannot find module './build/Release/DTraceProviderBindings'] code: 'MODULE_NOT_FOUND' }
{ [Error: Cannot find module './build/default/DTraceProviderBindings'] code: 'MODULE_NOT_FOUND' }
{ [Error: Cannot find module './build/Debug/DTraceProviderBindings'] code: 'MODULE_NOT_FOUND' }
/usr/local/lib/node_modules/manta-sync/node_modules/manta/node_modules/watershed/lib/dtrace.js:72
    PROVIDER.enable();
             ^

Error: failed to load DOF: No such file or directory
    at Error (native)
    at exportStaticProvider (/usr/local/lib/node_modules/manta-sync/node_modules/manta/node_modules/watershed/lib/dtrace.js:72:11)
    at Object.<anonymous> (/usr/local/lib/node_modules/manta-sync/node_modules/manta/node_modules/watershed/lib/dtrace.js:84:18)
    at Module._compile (module.js:409:26)
    at Object.Module._extensions..js (module.js:416:10)
    at Module.load (module.js:343:32)
    at Function.Module._load (module.js:300:12)
    at Module.require (module.js:353:17)
    at require (internal/module.js:12:17)
    at Object.<anonymous> (/usr/local/lib/node_modules/manta-sync/node_modules/manta/node_modules/watershed/lib/watershed.js:13:14)