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

Failure to find prebuild on Linux 5.11.0-1022-aws #49

Open
tytremblay opened this issue Jun 30, 2022 · 1 comment
Open

Failure to find prebuild on Linux 5.11.0-1022-aws #49

tytremblay opened this issue Jun 30, 2022 · 1 comment

Comments

@tytremblay
Copy link

tytremblay commented Jun 30, 2022

This is related to an issue I have open with @parcel/watcher.

When building on my local Ubuntu 20.04 machine, @parcel/watcher installs successfully because node-gyp-build is able to find the linux-x64 prebuild supplied with the package. However, when building in our Gitlab CI environment, the prebuild is not found. While this does end up exposing an apparent build error in @parcel/watcher, I can't figure out why node-gyp-build is failing to detect the prebuild.

I've attached npm ci --loglevel silly logs below. Here is the tree of @parcel/watcher when it is successfully installed on my local machine.

.
├── prebuilds
│   ├── darwin-arm64
│   │   └── node.napi.glibc.node
│   ├── darwin-x64
│   │   └── node.napi.glibc.node
│   ├── linux-x64
│   │   ├── node.napi.glibc.node
│   │   └── node.napi.musl.node
│   └── win32-x64
│       └── node.napi.glibc.node
└── src
     ├── ...

If a fix can't be found, could we add some logging that might help debugging in the future?

node-gyp-build_noPrebuildFound.txt

@vweevers
Copy link
Member

vweevers commented Aug 5, 2022

Could mean that node-gyp-build fails on the require() test, which loads the addon at install time as a smoke test. To check that, run npm install @parcel/watcher --ignore-scripts (to skip node-gyp-build) followed by node node_modules/@parcel/watcher/prebuilds/linux-x64/node.napi.glibc.node || echo $?. If so, it may then help to compare toolchain versions (llvm, glib, etc) between the machines, including the machine that parcel uses to compile their prebuilt binaries.

One thing we can improve on this end, logging-wise, is to also check for loglevel=silly here:

return hasFlag('--verbose') || process.env.npm_config_loglevel === 'verbose'

So that we'll print the result of the require() test here:

if (verbose()) console.error(stderr)

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

2 participants