Bug 268413 - security/s2n-tls: fix build with clang 15
Summary: security/s2n-tls: fix build with clang 15
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Nuno Teixeira
URL:
Keywords:
Depends on:
Blocks: 265425
  Show dependency treegraph
 
Reported: 2022-12-16 16:51 UTC by Dimitry Andric
Modified: 2022-12-16 21:24 UTC (History)
0 users

See Also:
bugzilla: maintainer-feedback? (eduardo)


Attachments
security/s2n-tls: fix build with clang 15 (2.59 KB, patch)
2022-12-16 16:52 UTC, Dimitry Andric
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dimitry Andric freebsd_committer freebsd_triage 2022-12-16 16:51:51 UTC
During an exp-run for llvm 15 (see bug 265425), it turned out that security/s2n-tls failed to build with clang 15:

  In file included from /wrkdirs/usr/ports/security/s2n-tls/work/s2n-tls-1.3.29/crypto/s2n_aead_cipher_aes_gcm.c:21:
  In file included from /wrkdirs/usr/ports/security/s2n-tls/work/s2n-tls-1.3.29/tls/s2n_crypto.h:18:
  In file included from /wrkdirs/usr/ports/security/s2n-tls/work/s2n-tls-1.3.29/tls/s2n_config.h:19:
  In file included from /wrkdirs/usr/ports/security/s2n-tls/work/s2n-tls-1.3.29/crypto/s2n_certificate.h:23:
  In file included from /wrkdirs/usr/ports/security/s2n-tls/work/s2n-tls-1.3.29/crypto/s2n_pkey.h:20:
  In file included from /wrkdirs/usr/ports/security/s2n-tls/work/s2n-tls-1.3.29/crypto/s2n_signature.h:17:
  In file included from /wrkdirs/usr/ports/security/s2n-tls/work/s2n-tls-1.3.29/tls/s2n_tls_parameters.h:18:
  In file included from /wrkdirs/usr/ports/security/s2n-tls/work/s2n-tls-1.3.29/crypto/s2n_hash.h:24:
  In file included from /wrkdirs/usr/ports/security/s2n-tls/work/s2n-tls-1.3.29/crypto/s2n_evp.h:21:
  /wrkdirs/usr/ports/security/s2n-tls/work/s2n-tls-1.3.29/crypto/s2n_openssl.h:59:28: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
  bool s2n_libcrypto_is_awslc();
                             ^
                              void
  /wrkdirs/usr/ports/security/s2n-tls/work/s2n-tls-1.3.29/crypto/s2n_openssl.h:60:32: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
  bool s2n_libcrypto_is_boringssl();
                                 ^
                                  void

And many similar errors. This is due to the port using -Werror by default, and prototypes are now more strictly checked. Add -Wno-strict-prototypes to CFLAGS to suppress the warnings-as-errors.
Comment 1 Dimitry Andric freebsd_committer freebsd_triage 2022-12-16 16:52:17 UTC
Created attachment 238843 [details]
security/s2n-tls: fix build with clang 15
Comment 2 commit-hook freebsd_committer freebsd_triage 2022-12-16 21:13:54 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=425a32db6a0406255991176098e93ba221218678

commit 425a32db6a0406255991176098e93ba221218678
Author:     Nuno Teixeira <eduardo@FreeBSD.org>
AuthorDate: 2022-12-16 21:06:40 +0000
Commit:     Nuno Teixeira <eduardo@FreeBSD.org>
CommitDate: 2022-12-16 21:08:54 +0000

    security/s2n-tls: Fix llvm15 build

    Fix llvm15 build due to the port using -Werror by default, and
    prototypes are now more strictly checked. Add -Wno-strict-prototypes to
    CFLAGS to suppress the warnings-as-errors.

    PR:             268413

 security/s2n-tls/Makefile | 4 ++++
 1 file changed, 4 insertions(+)
Comment 3 Nuno Teixeira freebsd_committer freebsd_triage 2022-12-16 21:24:19 UTC
Confirmed.

Added upstream issue: https://github.com/aws/s2n-tls/issues/3720

Thanks