autc04 / Retro68

a gcc-based cross-compiler for classic 68K and PPC Macintoshes
GNU General Public License v3.0
537 stars 51 forks source link

Dockerfile: update Ubuntu base image from 20.04 to 22.04 #227

Closed mcayland closed 5 months ago

mcayland commented 5 months ago

The current CI build for Linux fails with the following error:

2791.4 Scanning dependencies of target ResourceFiles 2791.4 [ 68%] Building CXX object ResourceFiles/CMakeFiles/ResourceFiles.dir/ResourceFork.cc.o 2791.4 [ 69%] Building CXX object ResourceFiles/CMakeFiles/ResourceFiles.dir/BinaryIO.cc.o 2791.4 [ 69%] Building CXX object ResourceFiles/CMakeFiles/ResourceFiles.dir/ResType.cc.o 2791.4 [ 70%] Building CXX object ResourceFiles/CMakeFiles/ResourceFiles.dir/ResourceFile.cc.o ------
Dockerfile:21
--------------------
  20 |
  21 | >>> RUN mkdir /Retro68-build && \
  22 | >>>     mkdir /Retro68-build/bin && \
  23 | >>>     bash -c "cd /Retro68-build && bash /Retro68/build-toolchain.bash"

Looking back through the logs there is no sign of any specific error, however the CI history indicates that the problem was introduced via commit e187bd21c2 ("honor SOURCE_DATE_EPOCH variable when timestamping MacBinary files").

A bit of searching suggests a couple of possible reasons as to why commit e187bd21c2 could introduce a build failure: 1) the version of gcc being used may have a buggy/incomplete implementation of std::chrono or 2) a bug in the version of cmake.

On this basis updating the Ubuntu base image from 20.04 (old LTS) to 22.04 (current LTS) should resolve these issues, and indeed with this change applied I can successfully build the container image from current Retro68 git as well as one of the sample applications.

mcayland commented 5 months ago

From the PR pipeline the build looks good, however quite a number of tests are now failing: https://dev.azure.com/wolfgangthaller/Retro68/_build/results?buildId=558&view=logs&j=0da5d1d9-276d-5173-c4c4-9d4d4ed14fdb&t=73c4289c-110b-5085-4a98-4009fa5cc9c8&l=1

It seems as if something odd is going on with DartConfiguration.tcl, do we know how the results of the Executor tests are parsed?

mcayland commented 5 months ago

From the PR pipeline the build looks good, however quite a number of tests are now failing: https://dev.azure.com/wolfgangthaller/Retro68/_build/results?buildId=558&view=logs&j=0da5d1d9-276d-5173-c4c4-9d4d4ed14fdb&t=73c4289c-110b-5085-4a98-4009fa5cc9c8&l=1

It seems as if something odd is going on with DartConfiguration.tcl, do we know how the results of the Executor tests are parsed?

Problem solved - it seems that bzip2 as used to extract the Executor archive is no longer pulled in as a dependency, but must be explicitly included in the package list.

For reference there is still one test that fails since the upgrade to gcc 12 (Exceptions.bin) and the ctest verbose output shows the following:

test 23
      Start 23: PPC.Exceptions

23: Test command: /Retro68-build/toolchain/bin/LaunchAPPL "--timeout=10" "Exceptions.bin"
23: Test timeout computed to be: 10000000
23: PBOpenWD: "/root/.executor/System Folder"
23: PBOpenWD: "/Retro68-build/build-target-ppc/AutomatedTests/ed40-b8f0-323a-198a/Application"
23: PBOpenWD: "/Retro68-build/build-target-ppc/AutomatedTests/ed40-b8f0-323a-198a"
23: PBOpenWD: "/Retro68-build/build-target-ppc/AutomatedTests/ed40-b8f0-323a-198a"
23: GetDiskFragment -> err == 0
23: ppc start: r2 = 00093b18, 0008e23c
23: Unimplemented instruction twi at 8958c: c29000c
23/28 Test #23: PPC.Exceptions ...................
***Failed  Required regular expression not found. Regex=[OK]  0.30 sec

Perhaps a compiler default has changed that unintentionally allows the twi instruction to be emitted?

autc04 commented 5 months ago

Indeed; I recently added twi to executor, but I did not follow through yet with updating the version used by the Retro68 CI pipeline.