安装restify时提示的编译错误,请问怎么解决?
发布于 1年前 作者 kazaff 680 次浏览

dtrace-provider@0.2.8 install /Users/fengtao/Documents/www/nodejs/node_modules/restify/node_modules/dtrace-provider

node-gyp rebuild

ACTION binding_gyp_libusdt_target_build_libusdt . Building libusdt for x86_64 rm -f *.gch rm -f *.o rm -f libusdt.a rm -f test_usdt rm -f test_usdt32 rm -f test_usdt64 rm -f test_mem_usage gcc -O2 -arch x86_64 -c -o usdt.o usdt.c In file included from usdt.c:5: usdt_internal.h:5:24: error: sys/dtrace.h: No such file or directory usdt_internal.h:6:23: error: sys/types.h: No such file or directory usdt_internal.h:7:22: error: sys/mman.h: No such file or directory usdt_internal.h:9:19: error: errno.h: No such file or directory usdt_internal.h:10:20: error: string.h: No such file or directory usdt_internal.h:11:19: error: fcntl.h: No such file or directory usdt_internal.h:12:20: error: unistd.h: No such file or directory usdt_internal.h:13:20: error: stdint.h: No such file or directory usdt_internal.h:14:20: error: assert.h: No such file or directory In file included from usdt_internal.h:23, from usdt.c:5: usdt.h:8: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘usdt_argtype_t’ usdt.h:32: error: expected declaration specifiers or ‘…’ before ‘size_t’ usdt.h:37: error: expected specifier-qualifier-list before ‘size_t’ usdt.h:45: error: expected declaration specifiers or ‘…’ before ‘size_t’ In file included from usdt.c:5: usdt_internal.h:30: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘usdt_probe_offset’ usdt_internal.h:31: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘usdt_is_enabled_offset’ usdt_internal.h:35: error: expected specifier-qualifier-list before ‘dof_secidx_t’ usdt_internal.h:48: error: expected declaration specifiers or ‘…’ before ‘uint32_t’ usdt_internal.h:48: error: expected declaration specifiers or ‘…’ before ‘dof_secidx_t’ usdt_internal.h:50: error: expected declaration specifiers or ‘…’ before ‘size_t’ usdt_internal.h:53: error: expected specifier-qualifier-list before ‘dof_secidx_t’ usdt_internal.h:65: error: expected declaration specifiers or ‘…’ before ‘dof_secidx_t’ usdt_internal.h:66: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘usdt_strtab_add’ usdt_internal.h:68: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘usdt_strtab_size’ usdt_internal.h:70: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘usdt_provider_dof_size’ usdt_internal.h:75: error: expected specifier-qualifier-list before ‘size_t’ usdt_internal.h:79: error: expected declaration specifiers or ‘…’ before ‘size_t’ usdt.c:7:20: error: stdlib.h: No such file or directory usdt.c:11:19: error: stdio.h: No such file or directory usdt.c: In function ‘free_probedef’: usdt.c:27: error: ‘usdt_probedef_t’ has no member named ‘refcnt’ usdt.c:31: error: ‘usdt_probedef_t’ has no member named ‘probe’ usdt.c:32: error: ‘usdt_probedef_t’ has no member named ‘probe’ usdt.c:33: error: ‘usdt_probedef_t’ has no member named ‘probe’ usdt.c:38: error: ‘usdt_probedef_t’ has no member named ‘refcnt’ usdt.c: In function ‘usdt_create_provider’: usdt.c:50: warning: incompatible implicit declaration of built-in function ‘malloc’ usdt.c:50: error: ‘NULL’ undeclared (first use in this function) usdt.c:50: error: (Each undeclared identifier is reported only once usdt.c:50: error: for each function it appears in.) usdt.c:53: warning: incompatible implicit declaration of built-in function ‘strdup’ usdt.c: At top level: usdt.c:62: error: expected declaration specifiers or ‘…’ before ‘size_t’ usdt.c: In function ‘usdt_create_probe’: usdt.c:67: error: ‘argc’ undeclared (first use in this function) usdt.c:70: warning: incompatible implicit declaration of built-in function ‘malloc’ usdt.c:70: error: ‘NULL’ undeclared (first use in this function) usdt.c:73: error: ‘usdt_probedef_t’ has no member named ‘refcnt’ usdt.c:74: warning: incompatible implicit declaration of built-in function ‘strdup’ usdt.c:76: error: ‘usdt_probedef_t’ has no member named ‘argc’ usdt.c:77: error: ‘usdt_probedef_t’ has no member named ‘probe’ usdt.c:81: error: ‘usdt_probedef_t’ has no member named ‘types’ usdt.c:83: error: ‘usdt_probedef_t’ has no member named ‘types’ usdt.c: In function ‘usdt_provider_add_probe’: usdt.c:100: error: ‘NULL’ undeclared (first use in this function) usdt.c:101: error: ‘usdt_probedef_t’ has no member named ‘next’ usdt.c:112: error: ‘usdt_probedef_t’ has no member named ‘next’ usdt.c:116: error: ‘usdt_probedef_t’ has no member named ‘next’ usdt.c:116: error: ‘usdt_probedef_t’ has no member named ‘next’ usdt.c:117: error: ‘usdt_probedef_t’ has no member named ‘next’ usdt.c: In function ‘usdt_provider_remove_probe’: usdt.c:126: error: ‘NULL’ undeclared (first use in this function) usdt.c:134: error: ‘usdt_probedef_t’ has no member named ‘next’ usdt.c:140: error: ‘usdt_probedef_t’ has no member named ‘next’ usdt.c:142: error: ‘usdt_probedef_t’ has no member named ‘next’ usdt.c:142: error: ‘usdt_probedef_t’ has no member named ‘next’ usdt.c: In function ‘usdt_provider_enable’: usdt.c:161: error: ‘size_t’ undeclared (first use in this function) usdt.c:161: error: expected ‘;’ before ‘size’ usdt.c:169: error: ‘NULL’ undeclared (first use in this function) usdt.c:174: error: ‘usdt_probedef_t’ has no member named ‘next’ usdt.c:175: error: ‘usdt_probedef_t’ has no member named ‘probe’ usdt.c:175: warning: incompatible implicit declaration of built-in function ‘malloc’ usdt.c:175: error: ‘usdt_probedef_t’ has no member named ‘probe’ usdt.c:181: error: too many arguments to function ‘usdt_strtab_init’ usdt.c:196: error: ‘size’ undeclared (first use in this function) usdt.c:197: error: too many arguments to function ‘usdt_dof_file_init’ usdt.c:217: error: ‘errno’ undeclared (first use in this function) usdt.c: In function ‘usdt_provider_disable’: usdt.c:234: error: ‘errno’ undeclared (first use in this function) usdt.c:239: error: ‘NULL’ undeclared (first use in this function) usdt.c: In function ‘usdt_provider_free’: usdt.c:250: error: ‘NULL’ undeclared (first use in this function) usdt.c:251: error: ‘usdt_probedef_t’ has no member named ‘next’ usdt.c: In function ‘usdt_is_enabled’: usdt.c:263: error: ‘NULL’ undeclared (first use in this function) usdt.c: At top level: usdt.c:270: error: expected declaration specifiers or ‘…’ before ‘size_t’ usdt.c: In function ‘usdt_fire_probe’: usdt.c:272: error: ‘NULL’ undeclared (first use in this function) usdt.c:273: error: ‘argc’ undeclared (first use in this function) make[1]: *** [usdt.o] Error 1 make: *** [.] Error 2 gyp ERR! build error gyp ERR! stack Error: make failed with exit code: 2 gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:267:23) gyp ERR! stack at ChildProcess.EventEmitter.emit (events.js:98:17) gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:797:12) gyp ERR! System Darwin 13.0.0 gyp ERR! command “node” “/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js” “rebuild” gyp ERR! cwd /Users/fengtao/Documents/www/nodejs/node_modules/restify/node_modules/dtrace-provider gyp ERR! node -v v0.10.25 gyp ERR! node-gyp -v v0.12.2 gyp ERR! not ok

回到顶部