Bug 268258 - security/p5-Crypt-SSLeay: fix build with clang 15
Summary: security/p5-Crypt-SSLeay: 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 Some People
Assignee: freebsd-perl (Nobody)
URL:
Keywords:
Depends on:
Blocks: 265425
  Show dependency treegraph
 
Reported: 2022-12-08 21:45 UTC by Dimitry Andric
Modified: 2022-12-18 17:48 UTC (History)
0 users

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


Attachments
security/p5-Crypt-SSLeay: fix build with clang 15 (1.54 KB, patch)
2022-12-08 21:45 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-08 21:45:24 UTC
During an exp-run for llvm 15 (see bug 265425), it turned out that security/p5-Crypt-SSLeay failed to build with clang 15:

  SSLeay.xs:159:31: warning: call to undeclared function 'SSLv2_client_method'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
              ctx = SSL_CTX_new(SSLv2_client_method());
                                ^
  SSLeay.xs:159:31: error: incompatible integer to pointer conversion passing 'int' to parameter of type 'const SSL_METHOD *' (aka 'const struct ssl_method_st *') [-Wint-conversion]
              ctx = SSL_CTX_new(SSLv2_client_method());
                                ^~~~~~~~~~~~~~~~~~~~~

This is because SSLeay.xs uses the obsolete define OPENSSL_NO_SSL2 to determine whether OpenSSL still supports SSLv2. Since this define was removed from OpenSSL 1.1 and later, define it via CFLAGS instead.
Comment 1 Dimitry Andric freebsd_committer freebsd_triage 2022-12-08 21:45:47 UTC
Created attachment 238646 [details]
security/p5-Crypt-SSLeay: fix build with clang 15
Comment 2 commit-hook freebsd_committer freebsd_triage 2022-12-18 17:44:28 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=6597d3e9ccde2b41a34835d5322e78b1faa1e2a8

commit 6597d3e9ccde2b41a34835d5322e78b1faa1e2a8
Author:     Dimitry Andric <dim@FreeBSD.org>
AuthorDate: 2022-12-08 21:39:55 +0000
Commit:     Dimitry Andric <dim@FreeBSD.org>
CommitDate: 2022-12-18 17:28:19 +0000

    security/p5-Crypt-SSLeay: fix build with clang 15

    During an exp-run for llvm 15 (see bug 265425), it turned out that
    security/p5-Crypt-SSLeay failed to build with clang 15:

      SSLeay.xs:159:31: warning: call to undeclared function 'SSLv2_client_method'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
                  ctx = SSL_CTX_new(SSLv2_client_method());
                                    ^
      SSLeay.xs:159:31: error: incompatible integer to pointer conversion passing 'int' to parameter of type 'const SSL_METHOD *' (aka 'const struct ssl_method_st *') [-Wint-conversion]
                  ctx = SSL_CTX_new(SSLv2_client_method());
                                    ^~~~~~~~~~~~~~~~~~~~~

    This is because SSLeay.xs uses the obsolete define OPENSSL_NO_SSL2 to
    determine whether OpenSSL still supports SSLv2. Since this define was
    removed from OpenSSL 1.1 and later, define it via CFLAGS instead.

    PR:             268258
    Approved by:    portmgr (tcberner)
    MFH:            2022Q4

 security/p5-Crypt-SSLeay/Makefile | 1 +
 1 file changed, 1 insertion(+)