llnode icon indicating copy to clipboard operation
llnode copied to clipboard

Installation failed under centos7

Open fudgelin opened this issue 6 years ago • 4 comments

[root@vm llnode]# cat /proc/version
Linux version 3.10.0-123.20.1.el7.x86_64 ([email protected]) (gcc version 4.8.2 20140120 (Red Hat 4.8.2-16) (GCC) ) #1 SMP Thu Jan 29 18:05:33 UTC 2015

[root@vm llnode]# node -v
v8.9.1

[root@vm llnode]# npm install -g llnode

> [email protected] preinstall /usr/local/node-v8.9.1-linux-x64/lib/node_modules/llnode
> node scripts/configure.js

Build dir is: /usr/local/node-v8.9.1-linux-x64/lib/node_modules/llnode
Looking for lldb executable...
Found lldb executable /usr/bin/lldb

Reading lldb version...
Installing llnode for /usr/bin/lldb, lldb version 3.4

Looking for llvm-config for lldb 3.4...
No llvm-config found

Looking for headers for lldb 3.4...
Found lldb headers in /usr/include

Looking for shared libraries for lldb 3.4...
From ldd: /usr/bin/lldb loads /usr/lib64/llvm/liblldb.so
Found liblldb.so in /usr/lib64/llvm
fs.js:646
  return binding.open(pathModule._makeLong(path), stringToFlags(flags), mode);
                 ^

Error: EACCES: permission denied, open 'config.gypi'
    at Object.fs.openSync (fs.js:646:18)
    at Object.fs.writeFileSync (fs.js:1291:33)
    at writeConfig (/usr/local/node-v8.9.1-linux-x64/lib/node_modules/llnode/scripts/configure.js:117:6)
    at main (/usr/local/node-v8.9.1-linux-x64/lib/node_modules/llnode/scripts/configure.js:14:3)
    at Object.<anonymous> (/usr/local/node-v8.9.1-linux-x64/lib/node_modules/llnode/scripts/configure.js:20:1)
    at Module._compile (module.js:635:30)
    at Object.Module._extensions..js (module.js:646:10)
    at Module.load (module.js:554:32)
    at tryModuleLoad (module.js:497:12)
    at Function.Module._load (module.js:489:3)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] preinstall: `node scripts/configure.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] preinstall 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/2019-08-28T02_13_53_916Z-debug.log

fudgelin avatar Aug 28 '19 02:08 fudgelin

Start npm with --unsafe-perm. npm by default drops privileges before executing llnode's build script.

bnoordhuis avatar Aug 28 '19 06:08 bnoordhuis

@bnoordhuis thanks.but i have a new problem.

[root@vm ~]# npm install --unsafe-perm -g llnode

> [email protected] preinstall /usr/local/node-v8.9.1-linux-x64/lib/node_modules/llnode
> node scripts/configure.js

Build dir is: /usr/local/node-v8.9.1-linux-x64/lib/node_modules/llnode
Looking for lldb executable...
Found lldb executable /usr/bin/lldb

Reading lldb version...
Installing llnode for /usr/bin/lldb, lldb version 3.4

Looking for llvm-config for lldb 3.4...
No llvm-config found

Looking for headers for lldb 3.4...
Found lldb headers in /usr/include

Looking for shared libraries for lldb 3.4...
From ldd: /usr/bin/lldb loads /usr/lib64/llvm/liblldb.so
Found liblldb.so in /usr/lib64/llvm
Writing config.gypi:
{
  "variables": {
    "lldb_lib_dir%": "/usr/lib64/llvm",
    "lldb_lib%": "lldb",
    "lldb_include_dir%": "/usr/include",
    "build_addon": "false",
    "coverage": "false"
  }
}
Writing llnode.js shortcut to /usr/local/node-v8.9.1-linux-x64/lib/node_modules/llnode/llnode.js
/usr/local/node-v8.9.1-linux-x64/bin/llnode -> /usr/local/node-v8.9.1-linux-x64/lib/node_modules/llnode/llnode.js

> [email protected] install /usr/local/node-v8.9.1-linux-x64/lib/node_modules/llnode
> node scripts/install.js

make: Entering directory `/usr/local/node-v8.9.1-linux-x64/lib/node_modules/llnode/build'
  CXX(target) Release/obj.target/plugin/src/constants.o
../src/constants.cc: In function ‘T llnode::ReadSymbolFromTarget(lldb::SBTarget&, lldb::SBAddress&, const char*, llnode::Error&)’:
../src/constants.cc:20:10: error: ‘class lldb::SBTarget’ has no member named ‘ReadMemory’
   target.ReadMemory(start, &res, sizeof(T), sberr);
          ^
make: *** [Release/obj.target/plugin/src/constants.o] Error 1
make: Leaving directory `/usr/local/node-v8.9.1-linux-x64/lib/node_modules/llnode/build'
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/local/node-v8.9.1-linux-x64/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:258:23)
gyp ERR! stack     at emitTwo (events.js:126:13)
gyp ERR! stack     at ChildProcess.emit (events.js:214:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)
gyp ERR! System Linux 3.10.0-957.5.1.el7.x86_64
gyp ERR! command "/usr/local/node-v8.9.1-linux-x64/bin/node" "/usr/local/node-v8.9.1-linux-x64/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /usr/local/node-v8.9.1-linux-x64/lib/node_modules/llnode
gyp ERR! node -v v8.9.1
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: `node scripts/install.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] 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/2019-08-30T02_19_58_817Z-debug.log

fudgelin avatar Aug 30 '19 02:08 fudgelin

You need lldb 3.9 or newer. Check the readme for more details.

If upgrading lldb isn't an option for you, you could try installing an old version of llnode. I don't remember off the top of my head what release supported 3.4 but I'm pretty sure none of the v2.x releases do.

bnoordhuis avatar Aug 30 '19 10:08 bnoordhuis

@bnoordhuis you got me out of a jam, thanks.

stringang avatar May 15 '22 01:05 stringang

Closing this as it's stale and has a valid response - Please open a new issue if this re-occurs.

No9 avatar Sep 17 '22 15:09 No9