Compiling ParaView 5.12.1 on WSL with Ninja: PATH Issues with VS Code
Hello everyone,
While probably this is not a common issue since I didn’t find anything related I wanted to share a potential issue that others may find in the future. I encountered an issue while compiling ParaView 5.12.1 on a WSL (Windows Subsystem for Linux) environment, and I wanted to share my experience in case others run into the same problem. My current setup is as follows:
Distributor ID: Ubuntu
Description: Ubuntu 22.04.3 LTS
Release: 22.04
Codename: jammy
I’ve integrated VS Code with my WSL environment, which has led to some unexpected behavior when trying to compile ParaView using ninja-build
. Specifically, I noticed that attempting to build from the Ubuntu terminal, rather than directly within the VS Code terminal, resulted in conflicts.
When I first attempted to build with ninja
from the standard Ubuntu terminal, I encountered the following error:
ninja-build: command not found
Upon trying to see what the problem was, I discovered that my $PATH
environment variable did not include any of the directories containing packages installed via apt-get
. This discrepancy seemed to arise because the VS Code terminal has its own environment configuration, which correctly sets the $PATH
variable.
As a result, when running ninja
from the VS Code terminal, the build process completed successfully without any issues.
If anyone else is compiling ParaView on WSL and experiences similar problems, I recommend checking the $PATH
environment variable in your Ubuntu terminal and comparing it to the one in the VS Code terminal. Adjusting the environment variables in the Ubuntu terminal may resolve the issue as well but can probably lead to further problems down in the compilation process.