Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installation fails on NodeJS 12, Amazon Linux #47

Closed
just-boris opened this issue Dec 12, 2020 · 6 comments
Closed

Installation fails on NodeJS 12, Amazon Linux #47

just-boris opened this issue Dec 12, 2020 · 6 comments

Comments

@just-boris
Copy link

The installation fails on our build machine with the following error.

> @parcel/watcher@2.0.0-alpha.8 install /path/to/project/node_modules/@parcel/watcher
> node-gyp-build
make: Entering directory '/path/to/project/node_modules/@parcel/watcher/build'
  CC(target) Release/obj.target/nothing/../../node-addon-api/nothing.o
  AR(target) Release/obj.target/../../node-addon-api/nothing.a
  COPY Release/nothing.a
  CXX(target) Release/obj.target/watcher/src/binding.o
  CXX(target) Release/obj.target/watcher/src/Watcher.o
  CXX(target) Release/obj.target/watcher/src/Backend.o
  CXX(target) Release/obj.target/watcher/src/DirTree.o
  CXX(target) Release/obj.target/watcher/src/watchman/BSER.o
  CXX(target) Release/obj.target/watcher/src/watchman/WatchmanBackend.o
  CXX(target) Release/obj.target/watcher/src/shared/BruteForceBackend.o
  CXX(target) Release/obj.target/watcher/src/linux/InotifyBackend.o
  CXX(target) Release/obj.target/watcher/src/unix/legacy.o
../src/linux/InotifyBackend.cc: In member function 'void InotifyBackend::watchDir(Watcher&, DirEntry*, std::shared_ptr<DirTree>)':
../src/linux/InotifyBackend.cc:9:47: error: 'IN_EXCL_UNLINK' was not declared in this scope
   IN_MOVED_TO | IN_DONT_FOLLOW | IN_ONLYDIR | IN_EXCL_UNLINK
                                               ^
../src/linux/InotifyBackend.cc:76:61: note: in expansion of macro 'INOTIFY_MASK'
   int wd = inotify_add_watch(mInotify, entry->path.c_str(), INOTIFY_MASK);
                                                             ^
make: *** [watcher.target.mk:124: Release/obj.target/watcher/src/linux/InotifyBackend.o] Error 1

I am not super familiar with the C++ build stack, but I can try to extract more information about the system and build environment if you tell me how to do that.

@devongovett
Copy link
Member

Do you know what type of machine it's running in? Seems like no prebuilds are matching?

@just-boris
Copy link
Author

When I run install with --loglevel=verbose, I get this error:

Error: /lib64/libc.so.6: version `GLIBC_2.14' not found (required by /path/to/project/node_modules/@parcel/watcher/prebuilds/linux-x64/node.napi.glibc.node)
    at Object.Module._extensions..node (internal/modules/cjs/loader.js:1057:18)
    at Module.load (internal/modules/cjs/loader.js:863:32)
    at Function.Module._load (internal/modules/cjs/loader.js:708:14)
    at Module.require (internal/modules/cjs/loader.js:887:19)
    at require (internal/modules/cjs/helpers.js:74:18)
    at load (/path/to/project/node_modules/node-gyp-build/index.js:21:10)
    at Object.<anonymous> (/path/to/project/node_modules/node-gyp-build/build-test.js:19:19)
    at Module._compile (internal/modules/cjs/loader.js:999:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
    at Module.load (internal/modules/cjs/loader.js:863:32)

Googling for this error message shows that our libc is outdated. From our side the libc version is not something we control and we cannot update this (sadly).

Is there a chance that Parcel will make this native dependency optional (similar to how fsevents work)? As we use this environment only for builds, we do not need watching functionality, only the bundling.

@tytremblay
Copy link

@just-boris were you able to resolve / work around this issue? I think I'm experiencing something similar:

npm ERR! path /builds/realtime-robotics/rapidplan/rapidplan_2.0.4-182-g64969e95a/build/rtr_web_tools/build/node_modules/@parcel/watcher
npm ERR! command failed
npm ERR! command sh -c node-gyp-build
npm ERR! make[8]: Entering directory '/builds/realtime-robotics/rapidplan/rapidplan_2.0.4-182-g64969e95a/build/rtr_web_tools/build/node_modules/@parcel/watcher'
npm ERR!   CC(target) Release/obj.target/nothing/../../node-addon-api/nothing.o
npm ERR!   AR(target) Release/obj.target/../../node-addon-api/nothing.a
npm ERR!   COPY Release/nothing.a
npm ERR!   CXX(target) Release/obj.target/watcher/src/binding.o
npm ERR!   CXX(target) Release/obj.target/watcher/src/Watcher.o
npm ERR!   CXX(target) Release/obj.target/watcher/src/Backend.o
npm ERR!   CXX(target) Release/obj.target/watcher/src/DirTree.o
npm ERR!   CXX(target) Release/obj.target/watcher/src/watchman/BSER.o
npm ERR!   CXX(target) Release/obj.target/watcher/src/watchman/WatchmanBackend.o
npm ERR!   CXX(target) Release/obj.target/watcher/src/shared/BruteForceBackend.o
npm ERR!   CXX(target) Release/obj.target/watcher/src/linux/InotifyBackend.o
npm ERR!   CXX(target) Release/obj.target/watcher/src/unix/legacy.o
npm ERR! make[8]: Leaving directory '/builds/realtime-robotics/rapidplan/rapidplan_2.0.4-182-g64969e95a/build/rtr_web_tools/build/node_modules/@parcel/watcher/build'
npm ERR! make[8]: warning: jobserver unavailable: using -j1.  Add '+' to parent make rule.
npm ERR! ../src/linux/InotifyBackend.cc:60:3: warning: ignoring return value of function declared with 'warn_unused_result' attribute [-Wunused-result]
npm ERR!   write(mPipe[1], "X", 1);
npm ERR!   ^~~~~ ~~~~~~~~~~~~~~~~
npm ERR! 1 warning generated.```

@jackmorrison12
Copy link

@just-boris +1 here, I'm getting the exact same error, did you find a solution?

@just-boris
Copy link
Author

Switched to Vite

@devongovett
Copy link
Member

Please try v2.2.0 which now includes prebuilt binaries for more platforms. That way you shouldn't need to compile it yourself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants