You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While building the docker image for ppc64le I ran into a snag where the sqlite3 node module wasn't properly installed, but this didn't cause the image to fail building and I did not notice until things were running:
$ docker compose up
[+] Running 1/1
✔ Container thelounge Created 0.1s
Attaching to thelounge
thelounge | 2025-02-04 18:23:35 [ERROR] Unable to load sqlite3 module. See https://github.com/mapbox/node-sqlite3/wiki/Binaries
thelounge | 2025-02-04 18:23:36 [INFO] The Lounge v4.4.3 (Node.js 18.20.6 on linux ppc64)
thelounge | 2025-02-04 18:23:36 [INFO] Configuration file: /var/opt/thelounge/config.js
thelounge | 2025-02-04 18:23:36 [INFO] Available at http://[::]:9000/ in private mode
thelounge | 2025-02-04 18:23:36 [INFO] User bobpaul loaded
thelounge | 2025-02-04 18:23:46 [WARN] WebPush subscription for bobpaul returned an error (410), removing subscription
thelounge | 2025-02-04 18:23:46 [WARN] WebPush subscription for bobpaul returned an error (410), removing subscription
While troubleshooting I found that yarn --non-interactive --frozen-lockfile global add [email protected] was "succeeding" without sqlite:
gyp info spawn args '--generator-output',
gyp info spawn args 'build',
gyp info spawn args '-Goutput_dir=.'
gyp info spawn args ]
Traceback (most recent call last):
File \"/usr/local/share/.config/yarn/global/node_modules/node-gyp/gyp/gyp_main.py\", line 42, in <module>
import gyp # noqa: E402
^^^^^^^^^^
File \"/usr/local/share/.config/yarn/global/node_modules/node-gyp/gyp/pylib/gyp/__init__.py\", line 9, in <module>
import gyp.input
File \"/usr/local/share/.config/yarn/global/node_modules/node-gyp/gyp/pylib/gyp/input.py\", line 19, in <module>
from distutils.version import StrictVersion
ModuleNotFoundError: No module named 'distutils'
gyp ERR! configure error
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack at ChildProcess.onCpExit (/usr/local/share/.config/yarn/global/node_modules/node-gyp/lib/configure.js:259:16)
gyp ERR! stack at ChildProcess.emit (node:events:517:28)
gyp ERR! stack at ChildProcess._handle.onexit (node:internal/child_process:292:12)
gyp ERR! System Linux 6.12.10-arch1-1-4k
gyp ERR! command \"/usr/local/bin/node\" \"/usr/local/share/.config/yarn/global/node_modules/sqlite3/node_modules/.bin/node-gyp\" \"rebuild\"
gyp ERR! cwd /usr/local/share/.config/yarn/global/node_modules/sqlite3
gyp ERR! node -v v18.20.6
gyp ERR! node-gyp -v v8.4.1
success Installed "[email protected]" with binaries:
- thelounge
Done in 16.82s.
Adding py-setuptools to the list of build-deps allows it to complete. It also looks like the symlink to /usr/bin/python is no longer necessary, as the python3 package on alpine already does this.
IMHO the gyp ERR! should cause the yarn global add command to fail so that the docker build fails, but I don't see an argument that would cause that behavior.
The text was updated successfully, but these errors were encountered:
IMHO the gyp ERR! should cause the yarn global add command to fail so that the docker build fails, but I don't see an argument that would cause that behavior.
sqlite is an optional dep, so this behavior is expected and in fact a "feature".
I'm with you personally and would rather just mandate sqlite but that is a bit funny if you don't actually use sqlite as a user and don't give a damn if it works or not (say public mode or simply with text logs)
Well, be that as it may, I do think the Dockerfile should build correctly on any platform alpine supports (otherwise why include build-essentials in the first place?) The current Dockerfile still works "accidentally" on arm/x86 because pre-compiled blobs for the sqlite module exist upstream. With the PR anyone should be able to docker build . regardless of their host platform.
While building the docker image for ppc64le I ran into a snag where the
sqlite3
node module wasn't properly installed, but this didn't cause the image to fail building and I did not notice until things were running:While troubleshooting I found that
yarn --non-interactive --frozen-lockfile global add [email protected]
was "succeeding" without sqlite:Adding
py-setuptools
to the list ofbuild-deps
allows it to complete. It also looks like the symlink to /usr/bin/python is no longer necessary, as the python3 package on alpine already does this.IMHO the
gyp ERR!
should cause theyarn global add
command to fail so that thedocker build
fails, but I don't see an argument that would cause that behavior.The text was updated successfully, but these errors were encountered: