Build Command Issues
Compiler Cache Error
Error Message:
The compiler reported some errors when the parsed build commands were passed to it.
Description:
These errors only affect some files. It's possible to properly work with the rest.
- CLion analyzes the received build commands using the compiler. This can fail sometimes:
- Some arguments are not processed correctly (like force-including a header file using build arguments)
- The build command is invalid
Solution:
- Check the build command first:
- 1. Find the file referenced by the error message
- 2. Use the action Find Jam Build Command For Current File from the Jam Output Console
- 3. Check if this is the expected build command
- 4. Optionally, try to run this command to build the file manually
- If the build command is not valid, check these pages:
- Command Parser Guide
- Command Parser Troubleshooting
- Check the toolchain:
- 1. Go to Settings -> Build, Execution, Deployment -> Toolchains
- 2. Check & fix the toolchains
- 3. Select the correct toolchain in the Jam settings: Settings -> Build, Execution, Deployment -> Jam
If only a few files are affected, they can be excluded in the command parser settings.
- Exclude the faulty files:
- Go to Settings -> Build, Execution, Deployment -> Jam -> Build Command Parser
- Edit the exclude line regex to exclude affected files (for example, based on the build argument that is not handled properly)
More info on the command parser here: Command Parser Troubleshooting
Multiple build commands
Error Message:
A file is compiled by multiple build commands. Please review the Jam configuration and the command parser settings.
Description:
This error is most likely the result of building multiple executable files at once. It is safe to ignore, but the code completion might not be precise for the affected file(s).
The plugin has found multiple build commands that compile the same source file. It will create the resolve configuration based on one of these, but that might not be the expected one.
Solution:
Check the command used to invoke Jam in the Workspace tab in the Jam Output Console.
Does this command build a single executable file?
If it builds multiple executables, you may want to specify the desired one using the flag -t
in the build target settings:
Settings -> Build, Execution, Deployment -> Jam -> Build Targets
File not in the project
Error Message:
This file was not detected as part of the current build configuration. If you have already reloaded the workspace and think this is an error, check the Build Commands console tab and configure the command parser settings.
Description:
This will appear on any file that simply isn't built for the active build configuration. If this is what you expect, ignore this.
The problem starts when this message appears for a file that is built by the active build configuration. The build command is most likely excluded due to the command parser settings.
Solution:
- Find the build command for the source file in question:
- 1. Open the source file in the editor (in case you switched away from it)
- 2. Use the action Find Jam Build Command For Current File from the Jam Output Console
Found an exact match
Just reload the workspace.
Probably the source file was not built by the previous build configuration, and the workspace hasn't been reloaded since.
If the command finder finds an exact match, that means the workspace will find it too.
Found a potential match:
This means that the source file is recognized but skipped due to the command parser settings.
- Fix the settings:
- 1. Open the command in the command parser settings editor
- 2. Check the guide on how to configure the parser: Command Parser Guide
No match found
The source file's name doesn't appear in the build output at all.
Check the build command that you are using: Workspace tab in the Jam Output Console.
Jam process error
Jam fails to build. The workspace won't be able to reload until the build system is fixed.
Fix the jamfiles, then reload the workspace.