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

Tensorflow requires glibc (ld-linux-x86-64.so.2), which is problematic on Alpine #8961

Closed
outloudvi opened this issue Jul 7, 2022 · 5 comments · Fixed by #8966
Closed

Tensorflow requires glibc (ld-linux-x86-64.so.2), which is problematic on Alpine #8961

outloudvi opened this issue Jul 7, 2022 · 5 comments · Fixed by #8966
Labels
⚠️bug? This might be a bug

Comments

@outloudvi
Copy link
Contributor

💡 Summary

Alpine doesn't contain ld-linux-x86-64.so.2 by default, which is required by tfjs-node, since Alpine primarily uses musl instead of glibc.

🥰 Expected Behavior

No error spawned.

🤬 Actual Behavior

web_1    | Error: Error loading shared library ld-linux-x86-64.so.2: No such file or directory (needed by /misskey/packages/backend/node_modules/@tensorflow/tfjs-node/lib/napi-v8/../../deps/lib/libtensorflow.so.2)
web_1    |     at Module._extensions..node (node:internal/modules/cjs/loader:1189:18)
web_1    |     at Module.load (node:internal/modules/cjs/loader:981:32)
web_1    |     at Module._load (node:internal/modules/cjs/loader:827:12)
web_1    |     at Module.require (node:internal/modules/cjs/loader:1005:19)
web_1    |     at require (node:internal/modules/cjs/helpers:102:18)
web_1    |     at Object.<anonymous> (/misskey/packages/backend/node_modules/@tensorflow/tfjs-node/dist/index.js:60:16)
web_1    |     at Module._compile (node:internal/modules/cjs/loader:1105:14)
web_1    |     at Module._extensions..js (node:internal/modules/cjs/loader:1159:10)
web_1    |     at Module.load (node:internal/modules/cjs/loader:981:32)
web_1    |     at Module._load (node:internal/modules/cjs/loader:827:12)
web_1    |     at ModuleWrap.<anonymous> (node:internal/modules/esm/translators:170:29)
web_1    |     at ModuleJob.run (node:internal/modules/esm/module_job:198:25)
web_1    |     at async Promise.all (index 0)
web_1    |     at async ESMLoader.import (node:internal/modules/esm/loader:409:24)
web_1    |     at async workerMain (file:///misskey/packages/backend/built/boot/worker.js:9:5)
web_1    |     at async default (file:///misskey/packages/backend/built/boot/index.js:25:9) {
web_1    |   code: 'ERR_DLOPEN_FAILED'
web_1    | }

After installing gcompat:

web_1    | Error: Error relocating /misskey/packages/backend/node_modules/@tensorflow/tfjs-node/lib/napi-v8/../../deps/lib/libtensorflow.so.2: __memcpy_chk: symbol not found
web_1    |     at Module._extensions..node (node:internal/modules/cjs/loader:1189:18)
web_1    |     at Module.load (node:internal/modules/cjs/loader:981:32)
web_1    |     at Module._load (node:internal/modules/cjs/loader:827:12)
web_1    |     at Module.require (node:internal/modules/cjs/loader:1005:19)
web_1    |     at require (node:internal/modules/cjs/helpers:102:18)
web_1    |     at Object.<anonymous> (/misskey/packages/backend/node_modules/@tensorflow/tfjs-node/dist/index.js:60:16)
web_1    |     at Module._compile (node:internal/modules/cjs/loader:1105:14)
web_1    |     at Module._extensions..js (node:internal/modules/cjs/loader:1159:10)
web_1    |     at Module.load (node:internal/modules/cjs/loader:981:32)
web_1    |     at Module._load (node:internal/modules/cjs/loader:827:12)
web_1    |     at ModuleWrap.<anonymous> (node:internal/modules/esm/translators:170:29)
web_1    |     at ModuleJob.run (node:internal/modules/esm/module_job:198:25)
web_1    |     at async Promise.all (index 0)
web_1    |     at async ESMLoader.import (node:internal/modules/esm/loader:409:24)
web_1    |     at async workerMain (file:///misskey/packages/backend/built/boot/worker.js:9:5)
web_1    |     at async default (file:///misskey/packages/backend/built/boot/index.js:25:9) {
web_1    |   code: 'ERR_DLOPEN_FAILED'
web_1    | }

📝 Steps to Reproduce

  1. Build and run 12.112.1.

📌 Environment

Misskey version: 12.112.1
Your OS: Debian 11
Your browser: (Unrelated)

@outloudvi outloudvi added the ⚠️bug? This might be a bug label Jul 7, 2022
@tamaina
Copy link
Contributor

tamaina commented Jul 7, 2022

tensorflow/tfjs#1425

@tamaina
Copy link
Contributor

tamaina commented Jul 7, 2022

@outloudvi
Copy link
Contributor Author

related? https://wiki.alpinelinux.org/wiki/Running_glibc_programs

Exactly. I think it's generally not recommended to run glibc stuffs on Alpine.

@outloudvi
Copy link
Contributor Author

P.S. I've prepared a patch for instance admins to temporarily update to a version that has runtime Tensorflow requirements removed.

@syuilo
Copy link
Member

syuilo commented Jul 8, 2022

revertするか

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
⚠️bug? This might be a bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants