Skip to content

GHA/non-native: try adding old BSD job - #23448

Closed
vszakats wants to merge 25 commits into
curl:masterfrom
vszakats:evenfd
Closed

vszakats wants to merge 25 commits into
curl:masterfrom
vszakats:evenfd

Conversation

@vszakats

@vszakats vszakats commented Oct 17, 2026 •

Copy link
Copy Markdown
Member

@github-actions github-actions Bot added the CI Continuous Integration label Oct 17, 2026
@vszakats
vszakats marked this pull request as draft October 17, 2026 00:57
@vszakats vszakats changed the title GHA/non-native: add old FreeBSD job GHA/non-native: try adding old BSD job Oct 17, 2026
@vszakats

vszakats commented Oct 17, 2026 •

Copy link
Copy Markdown
Member Author

Hah, surprise old-component in OpenBSD 6.9, zlib 1.2.3:

/home/runner/work/curl/curl/lib/content_encoding.c:68:2: error: "zlib 1.2.5.2 or greater required"
#error "zlib 1.2.5.2 or greater required"
 ^
/home/runner/work/curl/curl/lib/content_encoding.c:223:12: error: implicit declaration of function 'inflateReset2' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
        if(inflateReset2(z, -MAX_WBITS) == Z_OK) {
           ^
/home/runner/work/curl/curl/lib/content_encoding.c:223:12: note: did you mean 'inflateReset'?
/usr/include/zlib.h:790:21: note: 'inflateReset' declared here
ZEXTERN int ZEXPORT inflateReset OF((z_streamp strm));
                    ^
2 errors generated.

https://github.com/curl/curl/actions/runs/39043441418/job/117427357231?pr=23448#step:10:33

Comes with Clang 10.0.1.

@vszakats

vszakats commented Oct 17, 2026 •

Copy link
Copy Markdown
Member Author

Takes to minutes for the install prereq step (with 6.9) (30s in modern versions). It pbly wasn't a hang with 6.8 after all. (it's a miracle it works at all, released in 2020/21.)

no-evenfd, but clang maybe too old to reproduce the unreachable code warn.

2.5 mins to configure, with cmake 3.19.4.

edit:

6.8 has old cmake:
CMake 3.18 or higher is required. You are running version 3.17.2
https://github.com/curl/curl/actions/runs/39046140263/job/117435128905#step:6:33

edit 2:

new dimensions of slow:
autoreconf: 3+ minutes
https://github.com/curl/curl/actions/runs/39049752988/job/117446160051

edit 3:

according to ChangeLog and git tags, 6.8 has LibreSSL 3.2.2.
https://www.openbsd.org/68.html
https://github.com/curl/curl/actions/runs/39049752988/job/117446160051
which fails to build:

In file included from libcurl_unity.c:158:
../../lib/vtls/openssl.c:2509:8: error: use of undeclared identifier 'TLS1_3_VERSION'
  case TLS1_3_VERSION:
       ^
../../lib/vtls/openssl.c:2611:28: error: use of undeclared identifier 'TLS1_3_VERSION'
    ossl_ssl_version_min = TLS1_3_VERSION;
                           ^
../../lib/vtls/openssl.c:2630:28: error: use of undeclared identifier 'TLS1_3_VERSION'
    ossl_ssl_version_max = TLS1_3_VERSION;
                           ^
In file included from libcurl_unity.c:158:
../../lib/vtls/openssl.c:2509:8: error: use of undeclared identifier 'TLS1_3_VERSION'
  case TLS1_3_VERSION:
       ^
../../lib/vtls/openssl.c:2611:28: error: use of undeclared identifier 'TLS1_3_VERSION'
    ossl_ssl_version_min = TLS1_3_VERSION;
                           ^
../../lib/vtls/openssl.c:2630:28: error: use of undeclared identifier 'TLS1_3_VERSION'
    ossl_ssl_version_max = TLS1_3_VERSION;
                           ^

→ LibreSSL <3.4.0 has TLSv1.3 disabled by default.

also: OpenBSD clang version 10.0.1

vszakats and others added 22 commits October 18, 2026 01:46
Hah, surprise old-component in OpenBSD 6.9:
```
/home/runner/work/curl/curl/lib/content_encoding.c:68:2: error: "zlib 1.2.5.2 or greater required"
 ^
/home/runner/work/curl/curl/lib/content_encoding.c:223:12: error: implicit declaration of function 'inflateReset2' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
        if(inflateReset2(z, -MAX_WBITS) == Z_OK) {
           ^
/home/runner/work/curl/curl/lib/content_encoding.c:223:12: note: did you mean 'inflateReset'?
/usr/include/zlib.h:790:21: note: 'inflateReset' declared here
ZEXTERN int ZEXPORT inflateReset OF((z_streamp strm));
                    ^
2 errors generated.
```
https://github.com/curl/curl/actions/runs/39043441418/job/117427357231?pr=23448#step:10:33
Ambiguous: autoconf could be autoconf-2.69p3 autoconf-2.57p5 autoconf-2.65p1 autoconf-2.62p2 autoconf-2.64p1 autoconf-2.68p1 autoconf-2.13p4 autoconf-2.59p5 autoconf-2.54p6 autoconf-2.60p5 autoconf-2.52p6 autoconf-2.56p5 autoconf-2.67p1 autoconf-2.61p5 autoconf-2.58p5 autoconf-2.63p1
Ambiguous: automake could be automake-1.9.6p12 automake-1.11.6p3 automake-1.16.2 automake-1.12.6p2 automake-1.13.4p2 automake-1.10.3p9 automake-1.4.6p5 automake-1.8.5p9 automake-1.14.1p1 automake-1.15.1
https://github.com/curl/curl/actions/runs/39049204242/job/117444159823
3.4.0 is necessary for OpenSSL 1.1.1-compatible TLSv1.3 functions and macros.

```
libtool: link: ( cd ".libs" && rm -f "libcurltool.la" && ln -s "../libcurltool.la" "libcurltool.la" )
ld: error: ../lib/.libs/libcurl.so.12.0: undefined reference to SSL_SESSION_get_max_early_data
ld: error: ../lib/.libs/libcurl.so.12.0: undefined reference to SSL_get_early_data_status
ld: error: ../lib/.libs/libcurl.so.12.0: undefined reference to SSL_write_early_data
clang: error: linker command failed with exit code 1 (use -v to see invocation)
```
AM GOOD: https://github.com/curl/curl/actions/runs/39063793719/job/117497490075

CM BAD: https://github.com/curl/curl/actions/runs/39063793719/job/117497490348
```
    buildResult:
      variable: "HAVE_NETINET_IP_H"
      cached: true
      stdout: |
        Change Dir: '/home/runner/work/curl/curl/bld/CMakeFiles/CMakeScratch/TryCompile-GDq2oS'

        Run Build Command(s): /usr/local/bin/ninja -v cmTC_d3070
        [1/2] /usr/bin/clang   -Werror-implicit-function-declaration -Wextra -Wall -Wpedantic -Wbad-function-cast -Wconversion -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wno-long-long -Wno-multichar -Wpointer-arith -Wshadow -Wsign-compare -Wundef -Wunused -Wwrite-strings -Waddress -Wattributes -Wcast-align -Wcast-qual -Wdeclaration-after-statement -Wdiv-by-zero -Wempty-body -Wendif-labels -Wfloat-equal -Wformat-security -Wignored-qualifiers -Wmissing-field-initializers -Wmissing-noreturn -Wno-padded -Wno-sign-conversion -Wno-switch-default -Wno-switch-enum -Wno-system-headers -Wold-style-definition -Wredundant-decls -Wstrict-prototypes -Wtype-limits -Wunreachable-code -Wunused-parameter -Wvla -Wconditional-uninitialized -Wno-used-but-marked-unused -Wshift-sign-overflow -Wshorten-64-to-32 -Wformat=2 -Wlanguage-extension-token -Wno-covered-switch-default -Wno-disabled-macro-expansion -Wformat-non-iso -Wenum-conversion -Wmissing-variable-declarations -Wno-documentation-unknown-command -Wsometimes-uninitialized -Wdouble-promotion -Wheader-guard -Wpragmas -Wunused-const-variable -Wcomma -Wassign-enum -Wextra-semi-stmt -Wimplicit-fallthrough -Wxor-used-as-pow -Wcast-function-type -Wreserved-identifier -Wno-reserved-macro-identifier -Wno-unsafe-buffer-usage -Wcast-function-type-strict -Wformat-signedness -MD -MT CMakeFiles/cmTC_d3070.dir/CheckIncludeFile.c.o -MF CMakeFiles/cmTC_d3070.dir/CheckIncludeFile.c.o.d -o CMakeFiles/cmTC_d3070.dir/CheckIncludeFile.c.o -c /home/runner/work/curl/curl/bld/CMakeFiles/CMakeScratch/TryCompile-GDq2oS/CheckIncludeFile.c
        FAILED: CMakeFiles/cmTC_d3070.dir/CheckIncludeFile.c.o
        /usr/bin/clang   -Werror-implicit-function-declaration -Wextra -Wall -Wpedantic -Wbad-function-cast -Wconversion -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wno-long-long -Wno-multichar -Wpointer-arith -Wshadow -Wsign-compare -Wundef -Wunused -Wwrite-strings -Waddress -Wattributes -Wcast-align -Wcast-qual -Wdeclaration-after-statement -Wdiv-by-zero -Wempty-body -Wendif-labels -Wfloat-equal -Wformat-security -Wignored-qualifiers -Wmissing-field-initializers -Wmissing-noreturn -Wno-padded -Wno-sign-conversion -Wno-switch-default -Wno-switch-enum -Wno-system-headers -Wold-style-definition -Wredundant-decls -Wstrict-prototypes -Wtype-limits -Wunreachable-code -Wunused-parameter -Wvla -Wconditional-uninitialized -Wno-used-but-marked-unused -Wshift-sign-overflow -Wshorten-64-to-32 -Wformat=2 -Wlanguage-extension-token -Wno-covered-switch-default -Wno-disabled-macro-expansion -Wformat-non-iso -Wenum-conversion -Wmissing-variable-declarations -Wno-documentation-unknown-command -Wsometimes-uninitialized -Wdouble-promotion -Wheader-guard -Wpragmas -Wunused-const-variable -Wcomma -Wassign-enum -Wextra-semi-stmt -Wimplicit-fallthrough -Wxor-used-as-pow -Wcast-function-type -Wreserved-identifier -Wno-reserved-macro-identifier -Wno-unsafe-buffer-usage -Wcast-function-type-strict -Wformat-signedness -MD -MT CMakeFiles/cmTC_d3070.dir/CheckIncludeFile.c.o -MF CMakeFiles/cmTC_d3070.dir/CheckIncludeFile.c.o.d -o CMakeFiles/cmTC_d3070.dir/CheckIncludeFile.c.o -c /home/runner/work/curl/curl/bld/CMakeFiles/CMakeScratch/TryCompile-GDq2oS/CheckIncludeFile.c
        In file included from /home/runner/work/curl/curl/bld/CMakeFiles/CMakeScratch/TryCompile-GDq2oS/CheckIncludeFile.c:1:
        /usr/include/netinet/ip.h:49:2: error: unknown type name 'u_int'
           49 |         u_int     ip_hl:4,              /* header length */
              |         ^
        /usr/include/netinet/ip.h:53:2: error: unknown type name 'u_int'
           53 |         u_int     ip_v:4,               /* version */
              |         ^
        /usr/include/netinet/ip.h:53:12: error: duplicate member 'ip_v'
           53 |         u_int     ip_v:4,               /* version */
              |                   ^
        /usr/include/netinet/ip.h:50:5: note: previous declaration is here
           50 |                   ip_v:4;               /* version */
              |                   ^
        /usr/include/netinet/ip.h:54:5: error: duplicate member 'ip_hl'
           54 |                   ip_hl:4;              /* header length */
              |                   ^
        /usr/include/netinet/ip.h:49:12: note: previous declaration is here
           49 |         u_int     ip_hl:4,              /* header length */
              |                   ^
        /usr/include/netinet/ip.h:56:2: error: unknown type name 'u_int8_t'
           56 |         u_int8_t  ip_tos;               /* type of service */
              |         ^
        /usr/include/netinet/ip.h:57:2: error: unknown type name 'u_int16_t'; did you mean '__int128_t'?
           57 |         u_int16_t ip_len;               /* total length */
              |         ^
        note: '__int128_t' declared here
        /usr/include/netinet/ip.h:58:2: error: unknown type name 'u_int16_t'; did you mean '__int128_t'?
           58 |         u_int16_t ip_id;                /* identification */
              |         ^
        note: '__int128_t' declared here
        /usr/include/netinet/ip.h:59:2: error: unknown type name 'u_int16_t'; did you mean '__int128_t'?
           59 |         u_int16_t ip_off;               /* fragment offset field */
              |         ^
        note: '__int128_t' declared here
        /usr/include/netinet/ip.h:64:2: error: unknown type name 'u_int8_t'
           64 |         u_int8_t  ip_ttl;               /* time to live */
              |         ^
        /usr/include/netinet/ip.h:65:2: error: unknown type name 'u_int8_t'
           65 |         u_int8_t  ip_p;                 /* protocol */
              |         ^
        /usr/include/netinet/ip.h:66:2: error: unknown type name 'u_int16_t'; did you mean '__int128_t'?
           66 |         u_int16_t ip_sum;               /* checksum */
              |         ^
        note: '__int128_t' declared here
        /usr/include/netinet/ip.h:67:19: error: field has incomplete type 'struct in_addr'
           67 |         struct    in_addr ip_src, ip_dst; /* source and dest address */
              |                           ^
        /usr/include/netinet/ip.h:67:11: note: forward declaration of 'struct in_addr'
           67 |         struct    in_addr ip_src, ip_dst; /* source and dest address */
              |                   ^
        /usr/include/netinet/ip.h:67:27: error: field has incomplete type 'struct in_addr'
           67 |         struct    in_addr ip_src, ip_dst; /* source and dest address */
              |                                   ^
        /usr/include/netinet/ip.h:67:11: note: forward declaration of 'struct in_addr'
           67 |         struct    in_addr ip_src, ip_dst; /* source and dest address */
              |                   ^
        /usr/include/netinet/ip.h:171:2: error: unknown type name 'u_int8_t'
          171 |         u_int8_t ipt_code;              /* IPOPT_TS */
              |         ^
        /usr/include/netinet/ip.h:172:2: error: unknown type name 'u_int8_t'
          172 |         u_int8_t ipt_len;               /* size of structure (variable) */
              |         ^
        /usr/include/netinet/ip.h:173:2: error: unknown type name 'u_int8_t'
          173 |         u_int8_t ipt_ptr;               /* index of current entry */
              |         ^
        /usr/include/netinet/ip.h:175:2: error: unknown type name 'u_int'
          175 |         u_int    ipt_flg:4,             /* flags, see below */
              |         ^
        /usr/include/netinet/ip.h:179:2: error: unknown type name 'u_int'
          179 |         u_int    ipt_oflw:4,            /* overflow counter */
              |         ^
        /usr/include/netinet/ip.h:179:11: error: duplicate member 'ipt_oflw'
          179 |         u_int    ipt_oflw:4,            /* overflow counter */
              |                  ^
        /usr/include/netinet/ip.h:176:4: note: previous declaration is here
          176 |                  ipt_oflw:4;            /* overflow counter */
              |                  ^
        fatal error: too many errors emitted, stopping now [-ferror-limit=]
        20 errors generated.
        ninja: build stopped: subcommand failed.

      exitCode: 1
  -
```
@vszakats

Copy link
Copy Markdown
Member Author

While comparing feature detection results across OpenBSD versions,
I noticed that CMake does not detect netinet/ip.h, while autotools
builds do from the oldest 6.8 to the latest 7.9. This hints a CMake
feature detection issues.

vszakats added a commit that referenced this pull request Oct 18, 2026
As of OpenBSD 7.9, `sys/types.h` is required to declare types before
`netinet/ip.h` can be used. Make sure the detection code does this.
FreeBSD <14.3 and potentially other BSD forks/versions may need this.

This also syncs detection results with autotools.

The header is used in HTTP/3-enabled builds.

Refs:
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=285924
https://reviews.freebsd.org/D49735
freebsd/freebsd-src@31d3a94
NetBSD/src@47bb567
DragonFlyBSD/DragonFlyBSD@1bd4072

Bug: #23448 (comment)
Follow-up to f2c03b1 #22669

Closes #23463
vszakats added a commit to vszakats/curl that referenced this pull request Oct 18, 2026
vszakats added a commit that referenced this pull request Oct 18, 2026
@vszakats

Copy link
Copy Markdown
Member Author

Enabling old BSD builds was fun a revealed a few information and a recently
introduced CMake issue, but building e.g. older OpenBSD is unpractical due
to slow speeds for oldest versions, and not very interesting build-wise.
While older FreeBSD is supported by cross-platform-actions, the FreeBSD
distro pulled all files for these old versions, so could not make it work.

Closing.

@vszakats vszakats closed this Oct 18, 2026
@vszakats
vszakats deleted the evenfd branch October 18, 2026 01:01
vszakats added a commit to vszakats/curl that referenced this pull request Oct 18, 2026
It's the first release exposing TLSv1.3 via OpenSSL 1.1.1 APIs.

Ref: curl#23448 (comment)
Ref: https://ftp.openbsd.org/pub/OpenBSD/LibreSSL/libressl-3.4.0-relnotes.txt
Cherry-picked from curl#23448

---
In file included from libcurl_unity.c:158:
../../lib/vtls/openssl.c:2509:8: error: use of undeclared identifier 'TLS1_3_VERSION'
  case TLS1_3_VERSION:
       ^
../../lib/vtls/openssl.c:2611:28: error: use of undeclared identifier 'TLS1_3_VERSION'
    ossl_ssl_version_min = TLS1_3_VERSION;
                           ^
../../lib/vtls/openssl.c:2630:28: error: use of undeclared identifier 'TLS1_3_VERSION'
    ossl_ssl_version_max = TLS1_3_VERSION;
                           ^
In file included from libcurl_unity.c:158:
../../lib/vtls/openssl.c:2509:8: error: use of undeclared identifier 'TLS1_3_VERSION'
  case TLS1_3_VERSION:
       ^
../../lib/vtls/openssl.c:2611:28: error: use of undeclared identifier 'TLS1_3_VERSION'
    ossl_ssl_version_min = TLS1_3_VERSION;
                           ^
../../lib/vtls/openssl.c:2630:28: error: use of undeclared identifier 'TLS1_3_VERSION'
    ossl_ssl_version_max = TLS1_3_VERSION;
                           ^
---
vszakats added a commit that referenced this pull request Oct 18, 2026
… API)

3.4.0 is the first release exposing TLSv1.3 via OpenSSL 1.1.1 APIs. curl
does not build with earlier LibreSSL versions. As discovered when doing
test builds on OpenBSD 6.8, with LibreSSL 3.2.2.

If here, bump further to 3.4.1 to always enable
`SSL_CTX_set_ciphersuites()` support with the LibreSSL backend.

Avoiding (as seen with the test builds above):
```
In file included from libcurl_unity.c:158:
lib/vtls/openssl.c:2509:8: error: use of undeclared identifier 'TLS1_3_VERSION'
  case TLS1_3_VERSION:
       ^
lib/vtls/openssl.c:2611:28: error: use of undeclared identifier 'TLS1_3_VERSION'
    ossl_ssl_version_min = TLS1_3_VERSION;
                           ^
lib/vtls/openssl.c:2630:28: error: use of undeclared identifier 'TLS1_3_VERSION'
    ossl_ssl_version_max = TLS1_3_VERSION;
                           ^
```
Ref: https://github.com/curl/curl/actions/runs/39049752988/job/117446160051#step:10:29

Ref: #23448 (comment)
Ref: https://ftp.openbsd.org/pub/OpenBSD/LibreSSL/libressl-3.4.1-relnotes.txt
Ref: https://ftp.openbsd.org/pub/OpenBSD/LibreSSL/libressl-3.4.0-relnotes.txt
Cherry-picked from #23448

Closes #23466
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CI Continuous Integration

Development

Successfully merging this pull request may close these issues.

1 participant