space-ros / docker

Docker images to facilitate Docker-based development.
15 stars 12 forks source link

Failed to wget a raw file when building zynq_rtems #136

Closed SEC-RKatayama closed 2 months ago

SEC-RKatayama commented 4 months ago

Hi, I'm trying to perform the demo of zynq_rtems.

When I run

./build_dependencies

in zynq_rtems directory, I got an error:

ERROR: failed to solve: process "bin/sh -c wget -q https://raw.githubusercontent.com/space-ros/docker/zynq_rtems_zenoh_pico/zynq_rtems/toolchain.cmake -O /root/toolchain.cmake" did not complete successfully: exit code: 1

I suspect that it's due to the absence of the branch named zynq_rtems_zenoh_pico. How should I fix it? Just replace zynq_rtems_zenoh_pico with main?

Thanks.

Bckempa commented 4 months ago

Hi @SEC-RKatayama,

Sorry you're having an issue with this. We currently don't have a maintainer focused on these demos and the original author has moved to other projects. Adding this demo to our CI structure was nominated for the next release (https://github.com/space-ros/docker/issues/70) which will at least tell us if it is broken in the future.

I don't see a reason for the dockerfile to use wget to retrieve the toolchain file since it is local. I'd recommend replacing line 80 with a COPY from the local repo into the Docker context such as COPY toolchain.cmake /root.

I was going to put that change in a branch for you to try but when I went to test it myself my build failed on a much earlier stage:

=> ERROR [stage-0 19/41] RUN ../source-builder/sb-set-builder --prefix=/root/rtems/6 6/rtems-aarch64

Full Error Log

``` => ERROR [stage-0 19/41] RUN ../source-builder/sb-set-builder --prefix=/root/rtems/6 6/rtems-aarch64 43.9s ------ > [stage-0 19/41] RUN ../source-builder/sb-set-builder --prefix=/root/rtems/6 6/rtems-aarch64: 0.311 RTEMS Source Builder - Set Builder, 6 (0d817c4c1f7f) 0.319 Build Set: 6/rtems-aarch64 0.320 Build Set: tools/rtems-default-tools.bset 0.323 config: devel/dtc-1.6.1-1.cfg 0.328 package: dtc-1.6.1-x86_64-linux-gnu-1 0.335 Creating source directory: sources 0.335 download: https://www.kernel.org/pub/software/utils/dtc/dtc-1.6.1.tar.gz -> sources/dtc-1.6.1.tar.gz 0.882 redirect: https://mirrors.edge.kernel.org/pub/software/utils/dtc/dtc-1.6.1.tar.gz downloading: sources/dtc-1.6.1.tar.gz - 199.0kB of 199.0kB (100%) Creating source directory: patches 1.078 download: https://devel.rtems.org/raw-attachment/ticket/4783/0001-checks.c-Ensure-argument-is-an... -> patches/0001-checks.c-Ensure-argument-is-an-integer-v2.patch downloading: patches/0001-checks.c-Ensure-argument-is-an-integer-v2.patch - 773.0 bytes of 773.0 bytes (100%) building: dtc-1.6.1-x86_64-linux-gnu-1 4.703 sizes: dtc-1.6.1-x86_64-linux-gnu-1: 5.201MB (installed: 1.437MB) 4.703 cleaning: dtc-1.6.1-x86_64-linux-gnu-1 4.711 reporting: devel/dtc-1.6.1-1.cfg -> dtc-1.6.1-x86_64-linux-gnu-1.txt 4.732 reporting: devel/dtc-1.6.1-1.cfg -> dtc-1.6.1-x86_64-linux-gnu-1.xml 4.752 config: devel/expat-2.5.0-1.cfg 4.758 package: expat-2.5.0-x86_64-linux-gnu-1 4.764 download: https://github.com/libexpat/libexpat/releases/download/R_2_5_0/expat-2.5.0.tar.gz -> sources/expat-2.5.0.tar.gz 5.247 redirect: https://objects.githubusercontent.com/github-production-release-asset-2e65be/80314213/... downloading: sources/expat-2.5.0.tar.gz - 702.4kB of 702.4kB (100%) building: expat-2.5.0-x86_64-linux-gnu-1 9.599 sizes: expat-2.5.0-x86_64-linux-gnu-1: 11.925MB (installed: 1.855MB) 9.599 cleaning: expat-2.5.0-x86_64-linux-gnu-1 9.607 reporting: devel/expat-2.5.0-1.cfg -> expat-2.5.0-x86_64-linux-gnu-1.txt 9.631 reporting: devel/expat-2.5.0-1.cfg -> expat-2.5.0-x86_64-linux-gnu-1.xml 9.653 config: devel/gmp-6.3.0.cfg 9.658 package: gmp-6.3.0-x86_64-linux-gnu-1 9.665 download: https://gmplib.org/download/gmp/gmp-6.3.0.tar.bz2 -> sources/gmp-6.3.0.tar.bz2 downloading: sources/gmp-6.3.0.tar.bz2 - 2.5MB of 2.5MB (100%) building: gmp-6.3.0-x86_64-linux-gnu-1 26.42 sizes: gmp-6.3.0-x86_64-linux-gnu-1: 49.119MB (installed: 7.573MB) 26.42 cleaning: gmp-6.3.0-x86_64-linux-gnu-1 26.44 reporting: devel/gmp-6.3.0.cfg -> gmp-6.3.0-x86_64-linux-gnu-1.txt 26.46 reporting: devel/gmp-6.3.0.cfg -> gmp-6.3.0-x86_64-linux-gnu-1.xml 26.49 Build Set: textproc/gsed-internal.bset 26.49 config: textproc/gsed.cfg 26.49 Build Set: Time 0:00:00.005654 26.49 Build Set: print/texinfo-internal.bset 26.49 config: print/texinfo.cfg 26.58 package: texinfo-7.0.3-x86_64-linux-gnu-1 26.59 download: https://ftp.gnu.org/gnu/texinfo/texinfo-7.0.3.tar.gz -> sources/texinfo-7.0.3.tar.gz downloading: sources/texinfo-7.0.3.tar.gz - 10.3MB of 10.3MB (100%) building: texinfo-7.0.3-x86_64-linux-gnu-1 43.43 Traceback (most recent call last): 43.43 File "../source-builder/sb-set-builder", line 25, in 43.43 sb.setbuilder.run() 43.43 File "/root/rtems/rsb/source-builder/sb/setbuilder.py", line 776, in run 43.43 Build Set: Time 0:00:16.940268 43.43 Build Set: Time 0:00:43.112881 43.43 Build Set: Time 0:00:43.114136 43.43 b.build(deps, mail = mail) 43.43 File "/root/rtems/rsb/source-builder/sb/setbuilder.py", line 479, in build 43.43 bs.build(deps, nesting_count, mail) 43.43 File "/root/rtems/rsb/source-builder/sb/setbuilder.py", line 479, in build 43.43 bs.build(deps, nesting_count, mail) 43.43 File "/root/rtems/rsb/source-builder/sb/setbuilder.py", line 498, in build 43.43 self.build_package(configs[s], b) 43.43 File "/root/rtems/rsb/source-builder/sb/setbuilder.py", line 263, in build_package 43.43 _build.make() 43.43 File "/root/rtems/rsb/source-builder/sb/build.py", line 608, in make 43.43 self.sizes(package) 43.43 File "/root/rtems/rsb/source-builder/sb/build.py", line 530, in sizes 43.43 hs = _sizes(package, p[0], self.config.expand(p[1])) 43.43 File "/root/rtems/rsb/source-builder/sb/build.py", line 522, in _sizes 43.43 package.set_size(what, path) 43.43 File "/root/rtems/rsb/source-builder/sb/config.py", line 235, in set_size 43.43 self.sizes[what] += path.get_size(path_) 43.43 File "/root/rtems/rsb/source-builder/sb/path.py", line 366, in get_size 43.43 size = _get_size(path, depth) 43.43 File "/root/rtems/rsb/source-builder/sb/path.py", line 358, in _get_size 43.43 size += _get_size(dir, depth, level) 43.43 File "/root/rtems/rsb/source-builder/sb/path.py", line 358, in _get_size 43.43 size += _get_size(dir, depth, level) 43.43 File "/root/rtems/rsb/source-builder/sb/path.py", line 358, in _get_size 43.43 size += _get_size(dir, depth, level) 43.43 File "/root/rtems/rsb/source-builder/sb/path.py", line 358, in _get_size 43.43 size += _get_size(dir, depth, level) 43.43 File "/root/rtems/rsb/source-builder/sb/path.py", line 358, in _get_size 43.43 size += _get_size(dir, depth, level) 43.43 File "/root/rtems/rsb/source-builder/sb/path.py", line 358, in _get_size 43.43 size += _get_size(dir, depth, level) 43.43 File "/root/rtems/rsb/source-builder/sb/path.py", line 348, in _get_size 43.43 for name in listdir(path): 43.43 File "/root/rtems/rsb/source-builder/sb/path.py", line 130, in listdir 43.43 if not os.path.exists(hp): 43.43 File "/usr/lib/python2.7/genericpath.py", line 26, in exists 43.43 os.stat(path) 43.43 UnicodeEncodeError: 'ascii' codec can't encode character u'\xe9' in position 139: ordinal not in range(128) ------ Dockerfile:61 -------------------- 59 | # build the cross-compile toolchain 60 | WORKDIR /root/rtems/rsb/rtems 61 | >>> RUN ../source-builder/sb-set-builder --prefix=$PREFIX 6/rtems-aarch64 62 | 63 | # build the RTEMS kernel -------------------- ERROR: failed to solve: process "/bin/sh -c ../source-builder/sb-set-builder --prefix=$PREFIX 6/rtems-aarch64" did not complete successfully: exit code: 1 ```

Did you have any issue with that build phase?

SEC-RKatayama commented 4 months ago

Thank you for your quick reply!

I got the situation.

I also went into the UnicodeEncodeError. I fixed it by adding

ENV LANG C.UTF-8

to Dockerfile.

I will try again along with your advice 3 hours later.

SEC-RKatayama commented 4 months ago

I succeeded!

I got another new error when running ./compile_demos.sh, but I firstly try to solve for myself.

Summary of the modification to Dockerfile:

Bckempa commented 4 months ago

Great to hear! If you care to open PR with your changes we'd welcome the assistance, otherwise I'll find time to make those updates before our next release.

SEC-RKatayama commented 4 months ago

I opened pull request for this. https://github.com/space-ros/docker/compare/main...SEC-RKatayama:docker:patch-1