Bug 281594 - www/mod_perl2: fix build with clang 19 on i386
Summary: www/mod_perl2: fix build with clang 19 on i386
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: freebsd-apache (Nobody)
URL:
Keywords:
Depends on:
Blocks: 280562
  Show dependency treegraph
 
Reported: 2024-09-19 19:41 UTC by Dimitry Andric
Modified: 2024-09-28 13:49 UTC (History)
0 users

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


Attachments
www/mod_perl2: fix build with clang 19 on i386 (1.97 KB, patch)
2024-09-19 19:42 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 2024-09-19 19:41:06 UTC
Clang 19 has become more strict about incompatible function pointer
types, which results in an error building mod_perl2 on i386:

  modperl_common_util.c:57:53: error: incompatible function pointer types initializing 'int (*)(PerlInterpreter *, SV *, MAGIC *, SV *, const char *, I32)' (aka 'int (*)(struct interpreter *, struct sv *, struct magic *, struct sv *, const char *, long)') with an expression of type 'int (PerlInterpreter *, SV *, MAGIC *, SV *, const char *, int)' (aka 'int (struct interpreter *, struct sv *, struct magic *, struct sv *, const char *, int)') [-Wincompatible-function-pointer-types]
     57 |                                                     modperl_table_magic_copy};
        |                                                     ^~~~~~~~~~~~~~~~~~~~~~~~

Perl uses the type `I32` for the last parameter, which is apparently
`long` on i386. So use that instead.
Comment 1 Dimitry Andric freebsd_committer freebsd_triage 2024-09-19 19:42:35 UTC
Created attachment 253670 [details]
www/mod_perl2: fix build with clang 19 on i386
Comment 2 commit-hook freebsd_committer freebsd_triage 2024-09-28 13:34:42 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=99f25aaa64395af55a872fc6cf77127f5f0e4997

commit 99f25aaa64395af55a872fc6cf77127f5f0e4997
Author:     Dimitry Andric <dim@FreeBSD.org>
AuthorDate: 2024-09-19 19:41:23 +0000
Commit:     Dimitry Andric <dim@FreeBSD.org>
CommitDate: 2024-09-28 13:29:45 +0000

    www/mod_perl2: fix build with clang 19 on i386

    Clang 19 has become more strict about incompatible function pointer
    types, which results in an error building mod_perl2 on i386:

      modperl_common_util.c:57:53: error: incompatible function pointer types initializing 'int (*)(PerlInterpreter *, SV *, MAGIC *, SV *, const char *, I32)' (aka 'int (*)(struct interpreter *, struct sv *, struct magic *, struct sv *, const char *, long)') with an expression of type 'int (PerlInterpreter *, SV *, MAGIC *, SV *, const char *, int)' (aka 'int (struct interpreter *, struct sv *, struct magic *, struct sv *, const char *, int)') [-Wincompatible-function-pointer-types]
         57 |                                                     modperl_table_magic_copy};
            |                                                     ^~~~~~~~~~~~~~~~~~~~~~~~

    Perl uses the type `I32` for the last parameter, which is apparently
    `long` on i386. So use that instead.

    PR:             281594
    MFH:            2024Q3

 .../patch-src_modules_perl_modperl__common__util.c (new)      | 11 +++++++++++
 1 file changed, 11 insertions(+)
Comment 3 commit-hook freebsd_committer freebsd_triage 2024-09-28 13:42:45 UTC
A commit in branch 2024Q3 references this bug:

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

commit b5e7a8ad3ae02963d086ef16fc5e1312b4297255
Author:     Dimitry Andric <dim@FreeBSD.org>
AuthorDate: 2024-09-19 19:41:23 +0000
Commit:     Dimitry Andric <dim@FreeBSD.org>
CommitDate: 2024-09-28 13:38:32 +0000

    www/mod_perl2: fix build with clang 19 on i386

    Clang 19 has become more strict about incompatible function pointer
    types, which results in an error building mod_perl2 on i386:

      modperl_common_util.c:57:53: error: incompatible function pointer types initializing 'int (*)(PerlInterpreter *, SV *, MAGIC *, SV *, const char *, I32)' (aka 'int (*)(struct interpreter *, struct sv *, struct magic *, struct sv *, const char *, long)') with an expression of type 'int (PerlInterpreter *, SV *, MAGIC *, SV *, const char *, int)' (aka 'int (struct interpreter *, struct sv *, struct magic *, struct sv *, const char *, int)') [-Wincompatible-function-pointer-types]
         57 |                                                     modperl_table_magic_copy};
            |                                                     ^~~~~~~~~~~~~~~~~~~~~~~~

    Perl uses the type `I32` for the last parameter, which is apparently
    `long` on i386. So use that instead.

    PR:             281594
    MFH:            2024Q3
    (cherry picked from commit 99f25aaa64395af55a872fc6cf77127f5f0e4997)

 .../patch-src_modules_perl_modperl__common__util.c (new)      | 11 +++++++++++
 1 file changed, 11 insertions(+)