Skip to content

Commit 6115914

Browse files
committed
Add grepping tips for compilation errors
1 parent d785c2b commit 6115914

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

docs/troubleshooting/README.md

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,21 @@ title: Troubleshooting
99

1010
### Compilation problems
1111

12-
```todo
13-
To be added
12+
If your O2 code fails to compile and you have difficulties finding the reason, try the following tips.
13+
14+
Search for errors (and warnings) in the compilation log file (here assumed `../log`) using the `grep` command.
15+
16+
Get the list of executables that failed to build and the list of problems in the code (in the format `file:line:column`):
17+
18+
```bash
19+
grep -e "FAILED:" -e "error:" -e "warning:" ../log | cut -d : -f -3
1420
```
1521

22+
If you want to see the full messages, remove the `| cut...` part.
23+
1624
### Runtime problems
1725

18-
If your O2 code is crashing and you have difficulties finding out the reason, try the following tips.
26+
If your O2 code is crashing and you have difficulties finding the reason, try the following tips.
1927

2028
Redirect the terminal output to a text file (here called `stdout.log`):
2129

0 commit comments

Comments
 (0)