0

Running a previously working stap script I now get:

$ sudo PATH=$MORE_PATH_ENTRIES stap -v myscript.stp
...blahblah...
Pass 4: compilation failed.  [man error::pass4]

with -vvv the output includes:

Running env -uARCH -uKBUILD_EXTMOD -uCROSS_COMPILE -uKBUILD_IMAGE -uKCONFIG_CONFIG -uINSTALL_PATH -uLD_LIBRARY_PATH PATH=/usr/bin:/bin:/home/craig/pg/2Qpg11/bin:/home/craig/pg/2Qpg11/lib:/home/craig/pg/2Qpg11/lib/postgresql make -C /lib/modules/5.3.5-200.fc30.x86_64/build M=/tmp/stapRYZTEG modules CONFIG_DEBUG_INFO= CONFIG_STACK_VALIDATION= ARCH=x86_64 V=1 -j3
Spawn error (2): No such file or directory
Pass 4: compiled C into "stap_7c7a2de666aeb2fcb103c8fd5f66282b_105914.ko" in 0usr/0sys/0real ms.
Pass 4: compilation failed.  [man error::pass4]
Running rm -rf /tmp/stap7h4EmH
Spawn error (2): No such file or directory
Removed temporary directory "/tmp/stap7h4EmH"

What's going on?

Craig Ringer
  • 307,061
  • 76
  • 688
  • 778

1 Answers1

0

The PATH change caused stap to be unable to find the tools it requires - there's no :$PATH on the end to append the old PATH.

Wrong:

$ sudo PATH=$MORE_PATH_ENTRIES stap -v myscript.stp

Right (if you trust the current PATH):

$ sudo PATH=$MORE_PATH_ENTRIES:$PATH stap -v myscript.stp

In general if you see this error you should check your PATH, ensure make can be found, etc.

Posting here because it took me way too long to work it out, due mainly to the useless error messages.

Craig Ringer
  • 307,061
  • 76
  • 688
  • 778