This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Compiler/PRU-SWPKG: clpru behaves differently in docker image vs ubuntu desktop; fails with "exec() error spawning acpiapru: No such file or directory"

Part Number: PRU-SWPKG
Other Parts Discussed in Thread: PRU-CGT

Tool/software: TI C/C++ Compiler

I'm attempting to migrate our build system to a docker image for portability, but I'm having trouble with an error from clpru.  The issue arises when clpru calls out to acpiapru, which it can't find on the docker image.  This process works fine on a regular ubuntu desktop, but calling the command from the docker image returns exec() error spawning acpiapru: No such file or directory.


The following strace -f results from the call to clpru may shed some light on the issue.

This one, from the Ubuntu desktop, stat64s the correct file, and later calls execve with the appropriate path and arguments.
...
stat64("/home/chrismoore/Toolchain-Release/Install/pru-cgt/bin/acpiapru", {st_mode=S_IFREG|0775, st_size=5619510, ...}) = 0
times({tms_utime=0, tms_stime=0, tms_cutime=18434949165801799680, tms_cstime=654151969196478216}) = -2066578729
clone(Process 20811 attached
child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0) = 20811
[pid 20811] execve("/home/chrismoore/Toolchain-Release/Install/pru-cgt/bin/acpiapru", ["/home/chrismoore/Toolchain-Relea"..., "-@/tmp/20810rVuXUT"], [/* 31 vars */] <unfinished ...>
...

This one, from the docker image, stat64s the correct file, but then searches the path for acpiapru, and since its not on the path, it fails on this step.
...
stat64("/Toolchain-Release/Install/pru-cgt/bin/acpiapru", {st_mode=S_IFREG|0775, st_size=5619510, ...}) = 0
times({tms_utime=0, tms_stime=0, tms_cutime=18428393396440662016, tms_cstime=654398603398541216}) = 15236258
clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0x9144898) = 88
strace: Process 88 attached
[pid 87] wait4(-1, <unfinished ...>
[pid 88] execve("/usr/local/sbin/acpiapru", ["acpiapru", "-@/tmp/00087LfF4u0"], [/* 11 vars */]) = -1 ENOENT (No such file or directory)
[pid 88] execve("/usr/local/bin/acpiapru", ["acpiapru", "-@/tmp/00087LfF4u0"], [/* 11 vars */]) = -1 ENOENT (No such file or directory)
[pid 88] execve("/usr/sbin/acpiapru", ["acpiapru", "-@/tmp/00087LfF4u0"], [/* 11 vars */]) = -1 ENOENT (No such file or directory)
[pid 88] execve("/usr/bin/acpiapru", ["acpiapru", "-@/tmp/00087LfF4u0"], [/* 11 vars */]) = -1 ENOENT (No such file or directory)
[pid 88] execve("/sbin/acpiapru", ["acpiapru", "-@/tmp/00087LfF4u0"], [/* 11 vars */]) = -1 ENOENT (No such file or directory)
[pid 88] execve("/bin/acpiapru", ["acpiapru", "-@/tmp/00087LfF4u0"], [/* 11 vars */]) = -1 ENOENT (No such file or directory)
[pid 88] write(2, "exec() error spawning acpiapru: "..., 58exec() error spawning acpiapru: No such file or directory
) = 58
...

Is this a bug in the compiler?

  • We do not test clpru (or any other TI compiler) under Docker.  

    Whether running under Linux or Docker, the shell clpru invokes the sub-process acpiapru with the system call execvp.  It has worked this way for a long time.  Therefore, it is likely the problem is due to an incorrect configuration of Docker.

    Thanks and regards,

    -George