Docker build fails. rm: cannot remove '*': No such file or directory

Open Beginner friendly
#23 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
74/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Quiet
Tech stack
cmake, cpp, docker
Domain
build-system

Research direction

Start with Dockerfile line 34 in the build command shown in the issue, then run docker build -o type=local,dest=artifacts . to reproduce the failure. Check the cleanup step when /apbin_plugin/build is empty, and confirm that the build completes and produces libDataAPBin.so in the artifacts directory.

Written by the indexing model from the issue text.

Description

Building version 1.1 fails in docker. I started the build prior to this run but that was interrupted due to a system upgrade which restarted the docker daemon. This may or may not be related.

$ docker build -o type=local,dest=artifacts .                                               
[+] Building 713.7s (16/17)                                                  docker:default
 => [internal] load build definition from Dockerfile                                   0.0s                                                                                             
 => => transferring dockerfile: 1.97kB                                                 0.0s                                                                                             
 => [internal] load metadata for docker.io/library/ubuntu:22.04                        0.1s                                                                                             
 => [internal] load .dockerignore                                                      0.0s                                                                                             
 => => transferring context: 2B                                                        0.0s                                                                                             
 => [build-stage  1/10] FROM docker.io/library/ubuntu:22.04@sha256:ce4a593b4e323dcc3d  0.1s                                                                                             
 => => resolve docker.io/library/ubuntu:22.04@sha256:ce4a593b4e323dcc3dd728e397e0a866  0.1s                                                                                             
 => [internal] load build context                                                      0.1s                                                                                             
 => => transferring context: 2.53kB                                                    0.0s                                                                                             
 => CACHED [build-stage  2/10] RUN apt update && apt install -y build-essential cmake  0.0s                                                                                             
 => CACHED [build-stage  3/10] RUN apt update && apt -y install qtbase5-dev libqt5svg  0.0s                                                                                             
 => CACHED [build-stage  4/10] WORKDIR /plotjuggler_ws/src                             0.0s                                                                                             
 => CACHED [build-stage  5/10] RUN git clone --depth 1 --branch 3.9.2 https://github.  0.0s                                                                                             
 => CACHED [build-stage  6/10] WORKDIR /plotjuggler_ws                                 0.0s                                                                                             
 => [build-stage  7/10] RUN cmake -S src/PlotJuggler -B build/PlotJuggler -DCMAKE_I  712.7s                                                                                             
 => [build-stage  8/10] COPY --link . /apbin_plugin                                    0.1s                                                                                             
 => => merging                                                                         0.1s                                                                                             
 => [build-stage  9/10] WORKDIR /apbin_plugin/build                                    0.2s                                                                                             
 => ERROR [build-stage 10/10] RUN rm -R *     && cmake -Dplotjuggler_DIR="/plotjuggle  0.3s                                                                                             
------                                                                                                                                                                                  
 > [build-stage 10/10] RUN rm -R *     && cmake -Dplotjuggler_DIR="/plotjuggler_ws/install/lib/cmake/plotjuggler" -DADD_UNITS=OFF ..     && make     && make install     && mkdir /artif
acts     && cp libDataAPBin.so /artifacts:                                                                                                                                              
0.220 rm: cannot remove '*': No such file or directory
------                                        
Dockerfile:34                                 
--------------------                          
  33 |     # Ensure a fresh build folder
  34 | >>> RUN rm -R * \
  35 | >>>     && cmake -Dplotjuggler_DIR="/plotjuggler_ws/install/lib/cmake/plotjuggler" -DADD_UNITS=${ADD_UNITS} .. \
  36 | >>>     && make \
  37 | >>>     && make install \
  38 | >>>     && mkdir /artifacts \
  39 | >>>     && cp libDataAPBin.so /artifacts
  40 |                                        
--------------------                          
ERROR: failed to build: failed to solve: process "/bin/sh -c rm -R *     && cmake -Dplotjuggler_DIR=\"/plotjuggler_ws/install/lib/cmake/plotjuggler\" -DADD_UNITS=${ADD_UNITS} ..     &&
 make     && make install     && mkdir /artifacts     && cp libDataAPBin.so /artifacts" did not complete successfully: exit code: 1

If glob patterns don't match any file, they will be used literally. But did this ever work?

Dominant language
C++
Stars
31
Forks
21
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from ArduPilot/plotjuggler-apbin-plugins

All issues in ArduPilot/plotjuggler-apbin-plugins

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.