Closed fudgelin closed 2 years ago
Start npm with --unsafe-perm
. npm by default drops privileges before executing llnode's build script.
@bnoordhuis thanks.but i have a new problem.
[root@vm ~]# npm install --unsafe-perm -g llnode
> llnode@2.2.0 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
> llnode@2.2.0 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! llnode@2.2.0 install: `node scripts/install.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the llnode@2.2.0 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
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 you got me out of a jam, thanks.
Closing this as it's stale and has a valid response - Please open a new issue if this re-occurs.