Skip to content

AmigaOS: fix build fallouts, re-add to CI#21993

Closed
vszakats wants to merge 19 commits into
curl:masterfrom
vszakats:amigaagain
Closed

AmigaOS: fix build fallouts, re-add to CI#21993
vszakats wants to merge 19 commits into
curl:masterfrom
vszakats:amigaagain

Conversation

@vszakats

@vszakats vszakats commented Jun 12, 2026

Copy link
Copy Markdown
Member

Fix build issues:

  • src: adjust toolx_ftruncate().
  • libtests/cli_ftp_upload: make struct timeval initialization portable.
  • libtests/lib1960: do unconst in local inet_pton() macro.
  • tests/server/dnsd: make it stub instead of failing the build.
  • tests/server: make them link AmiSSL for SocketBase.

Also:

  • bump AmiSSL to the latest release.
  • add download hash checks and toolchain cache.
  • sync restored code with local updates made since last year.

It takes 30 seconds per job, 1 minute in total.

Thanks-to: Bebbo
Thanks-to: Darren Banfi
Ref: #21989 (comment)
Follow-up to 7a14898 #17486

@vszakats vszakats added build CI Continuous Integration labels Jun 12, 2026
vszakats added 3 commits June 12, 2026 18:16
```
src/tool_operate.c:581:50: error: conversion to 'off_t {aka long int}' from 'curl_off_t {aka long long int}' may alter its value [-Werror=conversion]
         if(toolx_ftruncate(fileno(outs->stream), outs->init)) {
                                                  ^~~~
```
https://github.com/curl/curl/actions/runs/27428204937/job/81071486140
@vszakats

This comment was marked as resolved.

@vszakats vszakats changed the title GHA/non-native: try adding AmigaOS jobs again GHA/non-native: try adding AmigaOS jobs again, fix build fallouts Jun 12, 2026
vszakats added 5 commits June 12, 2026 18:35
```
home/runner/work/curl/curl/tests/libtest/cli_ftp_upload.c:74:28: error: missing braces around initializer [-Werror=missing-braces]
   struct timeval timeout = { 1, 0 };
                            ^
```
https://github.com/curl/curl/actions/runs/27428676624/job/81073057087
```
home/runner/work/curl/curl/tests/libtest/lib1960.c:66:44: error: cast discards 'const' qualifier from pointer target type [-Werror=cast-qual]
 #define my_inet_pton(x, y, z) inet_pton(x, (unsigned char *)y, z)
                                            ^
/home/runner/work/curl/curl/tests/libtest/lib1960.c:107:6: note: in expansion of macro 'my_inet_pton'
   if(my_inet_pton(AF_INET, libtest_arg2, &serv_addr.sin_addr) <= 0) {
      ^~~~~~~~~~~~
```
https://github.com/curl/curl/actions/runs/27428676624/job/81073057087
@github-actions github-actions Bot added the tests label Jun 12, 2026
vszakats added 5 commits June 12, 2026 18:45
```
[8/21] Linking C executable tests/server/servers
FAILED: [code=1] tests/server/servers
: && /opt/amiga/bin/m68k-amigaos-gcc -O0 -msoft-float -mcrt=clib2  tests/server/CMakeFiles/servers.dir/servers.c.obj -o tests/server/servers  -lnet  -lm  -latomic && :
/home/runner/opt/amiga/lib/gcc/m68k-amigaos/6.5.0b/../../../../m68k-amigaos/bin/ld: tests/server/CMakeFiles/servers.dir/servers.c.obj: in function `sockdaemon':
tests/server/CMakeFiles/servers.dir/servers.c.obj:(.text+0x1b8e): undefined reference to `SocketBase'
/home/runner/opt/amiga/lib/gcc/m68k-amigaos/6.5.0b/../../../../m68k-amigaos/bin/ld: tests/server/CMakeFiles/servers.dir/servers.c.obj:(.text+0x1bfc): undefined reference to `SocketBase'
/home/runner/opt/amiga/lib/gcc/m68k-amigaos/6.5.0b/../../../../m68k-amigaos/bin/ld: tests/server/CMakeFiles/servers.dir/servers.c.obj:(.text+0x1c3a): undefined reference to `SocketBase'
/home/runner/opt/amiga/lib/gcc/m68k-amigaos/6.5.0b/../../../../m68k-amigaos/bin/ld: tests/server/CMakeFiles/servers.dir/servers.c.obj:(.text+0x1c9e): undefined reference to `SocketBase'
/home/runner/opt/amiga/lib/gcc/m68k-amigaos/6.5.0b/../../../../m68k-amigaos/bin/ld: tests/server/CMakeFiles/servers.dir/servers.c.obj: in function `curlx_nonblock':
tests/server/CMakeFiles/servers.dir/servers.c.obj:(.text+0x233c): undefined reference to `SocketBase'
/home/runner/opt/amiga/lib/gcc/m68k-amigaos/6.5.0b/../../../../m68k-amigaos/bin/ld: tests/server/CMakeFiles/servers.dir/servers.c.obj:tests/server/CMakeFiles/servers.dir/servers.c.obj:(.text+0x326e): more undefined references to `SocketBase' follow
collect2: error: ld returned 1 exit status
```
https://github.com/curl/curl/actions/runs/27429927065/job/81077366910
@vszakats vszakats changed the title GHA/non-native: try adding AmigaOS jobs again, fix build fallouts GHA/non-native: re-add AmigaOS jobs, fix build fallouts Jun 12, 2026
@vszakats vszakats changed the title GHA/non-native: re-add AmigaOS jobs, fix build fallouts AmigaOS: fix build fallouts, re-add to CI Jun 12, 2026
@vszakats vszakats requested a review from Copilot June 12, 2026 17:10

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR restores and hardens the AmigaOS (m68k) build by fixing several portability/build fallouts across the tool, tests, and CI, and by re-adding an AmigaOS job to the non-native GitHub Actions workflow.

Changes:

  • Make AmigaOS-specific portability fixes in the tool and test code (e.g., ftruncate() usage, struct timeval init, inet_pton() const-cast).
  • Stub out tests/server/dnsd on AmigaOS so it no longer hard-errors at build time.
  • Reintroduce an AmigaOS CI job with toolchain/AmiSSL downloads, caching, and hash verification; adjust CMake Amiga linking for AmiSSL.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
tests/server/dnsd.c Replace Amiga build-time error with an Amiga stub implementation.
tests/libtest/lib1960.c Use CURL_UNCONST() in Amiga inet_pton() wrapper to avoid const warnings.
tests/libtest/cli_ftp_upload.c Make struct timeval initialization portable by assigning fields.
src/tool_setup.h Add an Amiga-specific toolx_ftruncate() macro to match expected off_t signature.
CMakeLists.txt Ensure AmiSSL libs are included in link libs for Amiga builds.
.github/workflows/non-native.yml Re-add AmigaOS CI job with caching, downloads, and integrity checks.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread tests/server/dnsd.c
Comment thread .github/workflows/non-native.yml
Comment thread .github/workflows/non-native.yml Outdated
@vszakats vszakats closed this in 7c51a33 Jun 12, 2026
@vszakats vszakats deleted the amigaagain branch June 12, 2026 18:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Development

Successfully merging this pull request may close these issues.

2 participants