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

fcntl64 symbol not found #1576

Closed
Trinovantes opened this issue Apr 13, 2022 · 4 comments
Closed

fcntl64 symbol not found #1576

Trinovantes opened this issue Apr 13, 2022 · 4 comments

Comments

@Trinovantes
Copy link

On v5.0.3, I'm getting this error when installed inside node:14-alpine docker base image

Error: Error relocating /app/node_modules/sqlite3/lib/binding/napi-v6-linux-x64/node_sqlite3.node: fcntl64: symbol not found
    at Object.Module._extensions..node (internal/modules/cjs/loader.js:1144:18)
    at Module.load (internal/modules/cjs/loader.js:950:32)
    at Function.Module._load (internal/modules/cjs/loader.js:790:12)
    at Module.require (internal/modules/cjs/loader.js:974:19)
    at require (internal/modules/cjs/helpers.js:101:18)
    at Object.<anonymous> (/app/node_modules/sqlite3/lib/sqlite3-binding.js:4:15)
    at Module._compile (internal/modules/cjs/loader.js:1085:14)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
    at Module.load (internal/modules/cjs/loader.js:950:32)
    at Function.Module._load (internal/modules/cjs/loader.js:790:12)
FROM node:14-alpine
ENV NODE_ENV 'production'
WORKDIR /app

# Install dependencies
COPY yarn.lock package.json     ./
RUN yarn install
CMD yarn start

It seems alpine is missing some lib but shouldn't the prebuilt binaries be batteries included without requiring dynamic linking?

@bkimminich
Copy link

Same issue here before pinning sqlite3 version to 5.0.2 instead of using ^5.0.0. In my case a node:16-alpine image is affected which was built on node:16 and then copied over all build artifacts to save space. Worked for many years and wasn't changed in any way, started breaking exactly when sqlite3 version 5.0.3 came out.

@daniellockyer
Copy link
Member

daniellockyer commented Apr 14, 2022

It seems we're missing the Linux MUSL variant of prebuilt binaries and our template string isn't specific enough to differentiate MUSL and Glibc platforms.

Would you be able to fallback to build, or stay on v5.0.2 for now? 🙂

daniellockyer added a commit that referenced this issue Apr 14, 2022
refs #1576

- without this, we can't differentiate between glibc and musl Linux
  environments and Alpine download a binary linked to glibc
- other projects provide prebuilt musl binaries, so I think that's wise
  here too
- also updates README with the new target names
daniellockyer added a commit that referenced this issue Apr 14, 2022
refs #1576

- this commit adds musl prebuilt binaries to CI via Alpine
- also updates the docs to reference the new targets
@daniellockyer
Copy link
Member

I've added MUSL builds to CI, and they'll be shipped in the next release 🙂

@bkimminich
Copy link

I've changed the sqlite3 version from pinned 5.0.2 (which always worked and still works fine during Docker build - see https://github.com/juice-shop/juice-shop/runs/6268194166?check_suite_focus=true) to ~5.0.6 since the issue is supposedly fixed since 5.0.4. Unfortunately then my Docker build crashes again, but for no obvious reason: https://github.com/juice-shop/juice-shop/runs/6263305356?check_suite_focus=true

Can't imagine this is a random coincidence, because pinning back to 5.0.2 made it work just fine again. Just to let you know that "something isn't right", but I don't know what it might actually be.

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

No branches or pull requests

3 participants