Skip to content

Commit 03bd6f4

Browse files
authored
Merge pull request #1 from boegel/interactive
tweaks for blog post on interactive shell
2 parents 665511c + 893a18f commit 03bd6f4

File tree

3 files changed

+65
-59
lines changed

3 files changed

+65
-59
lines changed

docs/posts/2025/08/Interactive-Shell.md

Lines changed: 0 additions & 59 deletions
This file was deleted.

docs/asciinema/bzip-failure.cast renamed to docs/posts/2025/08/interactive-shell-demo-bzip.cast

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
{"version": 2, "width": 108, "height": 25, "timestamp": 1754758979, "env": {"SHELL": "/bin/bash", "TERM": "xterm-256color"}}
22
[0, "o", "\u001b[H\u001b[2J\u001b[3J"]
33
[0, "o", "\u001b[?2004h$ "]
4+
[1.934709, "o", "e"]
5+
[2.534709, "o", "b"]
6+
[3.134709, "o", " "]
47
[3.934709, "o", "b"]
58
[4.094069, "o", "z"]
69
[4.38944, "o", "i"]
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
---
2+
authors:
3+
- branfosj
4+
date: 2025-08-09
5+
slug: interactive-shell
6+
hide:
7+
- navigation
8+
---
9+
10+
# Interactive Shell to Debug Failed Builds
11+
12+
One of the big enhancements in EasyBuild v5 is the support for starting an [interactive shell to debug failed builds](https://docs.easybuild.io/interactive-debugging-failing-shell-commands/)
13+
by simply running the auto-generated `cmd.sh` script.
14+
15+
We would all prefer that no installation ever fails, but there will be times when they do.
16+
17+
The new interactive shell feature provides a way to explore the build environment and debug the failure.
18+
19+
<!-- more -->
20+
21+
---
22+
23+
## Demo
24+
25+
In the following demo, `bzip2-1.0.8.eb` is being built on an Ubuntu 25.04 (Plucky Puffin) system.
26+
This build uses the `SYSTEM` toolchain, which means that the default system compiler provided by the OS is used - in this case GCC v13.3.0 (`gcc` command).
27+
28+
{{
29+
asciinema(
30+
'../../interactive-shell-demo-bzip.cast',
31+
idleTimeLimit=3,
32+
cols=108,
33+
rows=25,
34+
markers=[
35+
[0, "Start installation"],
36+
[11, "Build failure"],
37+
[15, "Enter interactive debug environment"],
38+
[18, "Repeat failed command"],
39+
[23, "Explore environment"],
40+
[32, "Exit environment"]
41+
],
42+
)
43+
}}
44+
45+
The failure is because of an incompatibility between the older `binutils` (v2.37, defined as build dependency in the easyconfig file) and the newer GCC.
46+
47+
### The 6 stages of the demo
48+
49+
1. *[00:00]* Installing `bzip2` with EasyBuild: `eb bzip2-1.0.8.eb` (all dependencies have been pre-installed);
50+
2. *[00:11]* Installation fails in `build` step;
51+
3. *[00:15]* Enter interactive debug environment by running the `cmd.sh` script;
52+
1. *[00:18]* Repeat the failed command from shell history (arrow up), see why the build failed;
53+
1. *[00:23]* Explore the environment:
54+
- List the loaded modules (`module list`);
55+
- Check the value of the environment variable `CC` (`echo $CC`);
56+
1. *[00:32]* Exiting the interactive debug environment by running `exit`;
57+
58+
### Avoiding this problem
59+
60+
If you experience this failure then you should be able to build `bzip2-1.0.8.eb` using both the OS `gcc` and `binutils`.
61+
You can instruct EasyBuild to do this using [`--filter-deps=binutils`](https://docs.easybuild.io/manipulating-dependencies/#filter_deps).
62+

0 commit comments

Comments
 (0)