Background
I encountered the following compilation/run issues when setting up SWE on Windows 10 + WSL2 (Ubuntu 22.04), and resolved them with the steps below. Sharing for reference and potential config improvements.
- OS: Windows 10 Pro + WSL2 (Ubuntu 22.04 LTS)
- Docker version (WSL): [V 29.1.5]
- SWE branch/commit: [master]
- Node.js version (WSL): [V 12.9.1]
Issue 1: Docker Credential Helper Exec Format Error During Compilation
Error Message
When compiling the project in the stellarium-web-engine/apps/web-frontend/ directory following the instructions in README.md, the compilation failed with:
ERROR: failed to build: failed to solve: error getting credentials - err: fork/exec /usr/bin/docker-credential-desktop.exe: exec format error, out: ``
make: *** [Makefile:37: setup] Error 1
Root Cause
WSL runs a Linux environment and cannot directly execute Windows executable files (.exe). This error stems from incorrect configuration of the Docker credential helper in WSL (the config references a Windows .exe credential tool that Linux cannot run).
Solution
- Edit the Docker configuration file in WSL:
nano ~/.docker/config.json
- Remove the reference to the
.exe credential helper (delete the docker-credential-desktop.exe entry in the config file).
Issue 2: Docker Permission Denied in make setup
Error Message
During the make setup process, an error occurred at line 40 of /apps/web-frontend/Makefile:
make: docker: Permission denied
make: *** [Makefile:40: setup] Error 127
Root Cause
The error is triggered by the parameter-passing logic in the docker build command used in the Makefile:
docker build -t stellarium-web-dev --build-arg USER_UID=${USER_UID} --build-arg USER_GID=${USER_GID} .
Solution
Remove the passed --build-arg parameters (while this may cause unforeseen minor issues, it is sufficient for debugging and demonstration purposes):
docker build -t stellarium-web-dev . # --no-cache (optional: add to rebuild without cache)
Error Message
When executing make js in the project root directory or any make * commands in other directories, the following error is thrown:
stellarium unsupported pickle protocol: 4
Root Cause
The Makefile essentially invokes the SCons build tool. On the first compilation, SCons automatically generates a build signature database file (.sconsign.dblite in the root directory) that stores metadata like source files (C++/JS, etc.), dependent libraries, and compilation commands. This file enables incremental compilation (only modified files are recompiled to avoid redundant builds). However, incremental compilation does not explicitly restrict the use of Python 2.7, leading to Python 3-related operations and triggering the "unsupported pickle protocol" error.
Solution
Directly delete the incremental compilation database file in the root directory:
Issue 4: Vue Version Incompatibility in make dev
Error Message
Running make dev in the /apps/web-frontend/ directory results in a Vue version mismatch error:
Vue packages version mismatch:
- vue@3.0.0 (/app/node_modules/vue/index.js)
- vue-template-compiler@2.6.12 (/app/node_modules/vue-template-compiler/package.json)
Root Cause
The Vue version constraints in the /apps/web-frontend/package.json file are not properly restricted, leading to conflicting versions being installed.
Solution
Modify the Vue-related dependencies in package.json to enforce consistent versions:
"dependencies": {
// Other dependencies...
"vue": "^2.6.12"
},
"devDependencies": {
// Other dev dependencies...
"vue-template-compiler": "^2.6.12"
}
Background
I encountered the following compilation/run issues when setting up SWE on Windows 10 + WSL2 (Ubuntu 22.04), and resolved them with the steps below. Sharing for reference and potential config improvements.
Issue 1: Docker Credential Helper Exec Format Error During Compilation
Error Message
When compiling the project in the
stellarium-web-engine/apps/web-frontend/directory following the instructions inREADME.md, the compilation failed with:Root Cause
WSL runs a Linux environment and cannot directly execute Windows executable files (
.exe). This error stems from incorrect configuration of the Docker credential helper in WSL (the config references a Windows.execredential tool that Linux cannot run).Solution
nano ~/.docker/config.json.execredential helper (delete thedocker-credential-desktop.exeentry in the config file).Issue 2: Docker Permission Denied in
make setupError Message
During the
make setupprocess, an error occurred at line 40 of/apps/web-frontend/Makefile:make: docker: Permission denied make: *** [Makefile:40: setup] Error 127Root Cause
The error is triggered by the parameter-passing logic in the
docker buildcommand used in the Makefile:Solution
Remove the passed
--build-argparameters (while this may cause unforeseen minor issues, it is sufficient for debugging and demonstration purposes):Issue 3: "Unsupported Pickle Protocol: 4" When Running
make jsError Message
When executing
make jsin the project root directory or anymake *commands in other directories, the following error is thrown:Root Cause
The Makefile essentially invokes the SCons build tool. On the first compilation, SCons automatically generates a build signature database file (
.sconsign.dblitein the root directory) that stores metadata like source files (C++/JS, etc.), dependent libraries, and compilation commands. This file enables incremental compilation (only modified files are recompiled to avoid redundant builds). However, incremental compilation does not explicitly restrict the use of Python 2.7, leading to Python 3-related operations and triggering the "unsupported pickle protocol" error.Solution
Directly delete the incremental compilation database file in the root directory:
Issue 4: Vue Version Incompatibility in
make devError Message
Running
make devin the/apps/web-frontend/directory results in a Vue version mismatch error:Root Cause
The Vue version constraints in the
/apps/web-frontend/package.jsonfile are not properly restricted, leading to conflicting versions being installed.Solution
Modify the Vue-related dependencies in
package.jsonto enforce consistent versions: