laverdet / node-fibers

Fiber/coroutine support for v8 and node.
MIT License
3.56k stars 224 forks source link

CenterOS can't build node-fibers #414

Closed fenyuluoshang closed 3 years ago

fenyuluoshang commented 5 years ago

I have use CenterOS to publish a Nuxt Project ,and I have use vuetify in it,It has throw Error when yarn use node-gyp

Exit code: 127
Command: node build.js || nodejs build.js
Arguments:
Directory: /web/wwwroot/node/go-v2.1/node_modules/fibers
Output:
`linux-x64-64-glibc` exists; testing
Problem with the binary; manual build incoming
gyp info it worked if it ends with ok
gyp info using node-gyp@5.0.3
gyp info using node@10.16.3 | linux | x64
gyp info find Python using Python version 2.7.15 found at "/usr/local/bin/python2.7"
gyp info spawn /usr/local/bin/python2.7
gyp info spawn args [ '/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py',
gyp info spawn args   'binding.gyp',
gyp info spawn args   '-f',
gyp info spawn args   'make',
gyp info spawn args   '-I',
gyp info spawn args   '/web/wwwroot/node/go-v2.1/node_modules/fibers/build/config.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/usr/local/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/root/.cache/node-gyp/10.16.3/include/node/common.gypi',
gyp info spawn args   '-Dlibrary=shared_library',
gyp info spawn args   '-Dvisibility=default',
gyp info spawn args   '-Dnode_root_dir=/root/.cache/node-gyp/10.16.3',
gyp info spawn args   '-Dnode_gyp_dir=/usr/local/lib/node_modules/npm/node_modules/node-gyp',
gyp info spawn args   '-Dnode_lib_file=/root/.cache/node-gyp/10.16.3/<(target_arch)/node.lib',
gyp info spawn args   '-Dmodule_root_dir=/web/wwwroot/node/go-v2.1/node_modules/fibers',
gyp info spawn args   '-Dnode_engine=v8',
gyp info spawn args   '--depth=.',
gyp info spawn args   '--no-parallel',
gyp info spawn args   '--generator-output',
gyp info spawn args   'build',
gyp info spawn args   '-Goutput_dir=.' ]
make: Entering directory `/web/wwwroot/node/go-v2.1/node_modules/fibers/build'
gyp  CXX(target) Release/obj.target/fibers/src/fibers.o
 info spawn make
gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
  CXX(target) Release/obj.target/fibers/src/coroutine.o
  CC(target) Release/obj.target/fibers/src/libcoro/coro.o
cc1: error: unrecognized command line option "-std=gnu11"
make: *** [Release/obj.target/fibers/src/libcoro/coro.o] Error 1
make: Leaving directory `/web/wwwroot/node/go-v2.1/node_modules/fibers/build'
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:196:23)
gyp ERR! stack     at ChildProcess.emit (events.js:198:13)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:248:12)
gyp ERR! System Linux 2.6.32-696.23.1.el6.x86_64
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--release"
gyp ERR! cwd /web/wwwroot/node/go-v2.1/node_modules/fibers
gyp ERR! node -v v10.16.3
gyp ERR! node-gyp -v v5.0.3
gyp ERR! not ok
node-gyp exited with code: 1
Please make sure you are using a supported platform and node version. If you
would like to compile fibers on this machine please make sure you have setup your
build environment--
Windows + OS X instructions here: https://github.com/nodejs/node-gyp
Ubuntu users please run: `sudo apt-get install g++ build-essential`

my server system version is

Linux version 2.6.32-696.23.1.el6.x86_64 (mockbuild@x86-01.bsys.centos.org) (gcc version 4.4.7 20120313 (Red Hat 4.4.7-18) (GCC) ) #1 SMP Tue Mar 13 22:44:18 UTC 2018

and I have try to upgrate my python version to 2.7.15, and build a gcc -6.1.0, and make a link with system

What should I try again

realsamanrad commented 4 years ago

I have the same problem. I have installed Nodejs on my cPanel Cloudlinux server. I want to install Nuxt.js package which the fibers is it's dependency. When the NPM reaches to install this package, it returns error:

> fibers@4.0.2 install /home/mydomain/nodevenv/nuxt/10/lib/node_modules/fibers
> node build.js || nodejs build.js

`linux-x64-64-glibc` exists; testing
Problem with the binary; manual build incoming
node[7360]: pthread_create: Resource temporarily unavailable
/opt/alt/alt-nodejs10/root/usr/lib/node_modules/npm/node_modules.bundled/npm-lifecycle/node-gyp-bin/node-gyp: line 6:  7360 Aborted                 (core dumped) "$npm_config_node_gyp" "$@"
node-gyp exited with code: 134
Please make sure you are using a supported platform and node version. If you
would like to compile fibers on this machine please make sure you have setup your
build environment--
Windows + OS X instructions here: https://github.com/nodejs/node-gyp
Ubuntu users please run: `sudo apt-get install g++ build-essential`
RHEL users please run: `yum install gcc-c++` and `yum groupinstall 'Development Tools'`
Alpine users please run: `sudo apk add python make g++`
sh: nodejs: command not found
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: node-pre-gyp@0.14.0 (node_modules/watchpack/node_modules/fsevents/node_modules/node-pre-gyp):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: EMFILE: too many open files, open '/opt/alt/alt-nodejs10/root/usr/lib/node_modules/npm/node_modules.bundled/pacote/lib/fetchers/version.js'
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.11 (node_modules/watchpack/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.11: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

npm ERR! code ELIFECYCLE
npm ERR! syscall spawn
npm ERR! file sh
npm ERR! errno ENOENT
npm ERR! fibers@4.0.2 install: `node build.js || nodejs build.js`
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the fibers@4.0.2 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!     /home/mydomain/.npm/_logs/2019-12-22T08_39_07_720Z-debug.log

I also tried to install fibers Individually by running npm install fibers, but it returns the same error (linux-x64-64-glibc exists; testing).

My OS: CloudLinux 7.7 (centos-7.5-x86_64) Nodejs version: 10.17.0 NPM version: 6.11.3

So what's the problem and what should I do ? Regards

fenyuluoshang commented 4 years ago

Maybe you need update and rebuild the gcc package, yum only have the old version of gcc

dogui1718 commented 4 years ago

Same problem here!

I am using 'flightplan' for deploy my project and its use 'fiber' as dependency.


416 xxxxxxxxxxxxxxxx > > node build.js || nodejs build.js
417 xxxxxxxxxxxxxxxx >
418 xxxxxxxxxxxxxxxx >
419 xxxxxxxxxxxxxxxx >
420 xxxxxxxxxxxxxxxx ● failed (1)
421 ● Command exited abnormally on xxxxxxxxxxxxxxxx
422 npm ERR! code ELIFECYCLE
423 npm ERR! errno 1
424 npm ERR! project@1.0.0 deploy: `fly deploy`
425 npm ERR! Exit status 1
426 npm ERR! 
427 npm ERR! Failed at the project@1.0.0 deploy script.
428 npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
429 npm ERR! A complete log of this run can be found in:
430 npm ERR!     /root/.npm/_logs/2019-12-25T15_52_56_952Z-debug.log
431 ERROR: Job failed: exit code 1```
maxshuty commented 4 years ago

Ditto - same problem using Nuxt and trying to do a production deployment on Centos. I tried downgrading from node 10.17.x to other node versions with no luck.