Bug 268231 - textproc/augeas: fix build with clang 15
Summary: textproc/augeas: 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 Puppet Team
URL:
Keywords:
Depends on:
Blocks: 265425
  Show dependency treegraph
 
Reported: 2022-12-07 16:50 UTC by Dimitry Andric
Modified: 2022-12-13 16:29 UTC (History)
2 users (show)

See Also:
romain: maintainer-feedback+


Attachments
textproc/augeas: fix build with clang 15 (1.30 KB, patch)
2022-12-07 16:50 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-07 16:50:09 UTC
During an exp-run for llvm 15 (see bug 265425), it turned out that textproc/augeas failed to build with clang 15:

  internal.c:436:12: error: incompatible integer to pointer conversion returning 'int' from a function with result type 'const char *' [-Wint-conversion]
      return strerror_r(errnum, buf, len);
             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1 error generated.

This is because the GNU variant of strerror_r() is erroneously chosen. Use the BSD variant instead.
Comment 1 Dimitry Andric freebsd_committer freebsd_triage 2022-12-07 16:50:34 UTC
Created attachment 238608 [details]
textproc/augeas: fix build with clang 15
Comment 2 Mina Galić freebsd_triage 2022-12-07 16:53:52 UTC
why not submit that upstream?
it looks like development has picked up again
https://github.com/hercules-team/augeas/
Comment 3 Dimitry Andric freebsd_committer freebsd_triage 2022-12-07 17:29:12 UTC
(In reply to Mina Galić from comment #2)
I'm fine with somebody else submitting my patch, but I'm busy with other things at the moment. :)
Comment 4 Dimitry Andric freebsd_committer freebsd_triage 2022-12-08 12:12:41 UTC
Oh well. https://github.com/hercules-team/augeas/pull/791 :)
Comment 5 commit-hook freebsd_committer freebsd_triage 2022-12-13 16:28:24 UTC
A commit in branch main references this bug:

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

commit 48d51338852a1667227dd0735d03f77d72d67247
Author:     Dimitry Andric <dim@FreeBSD.org>
AuthorDate: 2022-12-07 16:45:56 +0000
Commit:     Dimitry Andric <dim@FreeBSD.org>
CommitDate: 2022-12-13 16:27:02 +0000

    textproc/augeas: fix build with clang 15

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

      internal.c:436:12: error: incompatible integer to pointer conversion returning 'int' from a function with result type 'const char *' [-Wint-conversion]
          return strerror_r(errnum, buf, len);
                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
      1 error generated.

    This is because the GNU variant of strerror_r() is erroneously chosen.
    Use the BSD variant instead.

    PR:             268231
    Approved by:    romain (maintainer)
    MFH:            2022Q4

 textproc/augeas/files/patch-src_internal.c (new) | 11 +++++++++++
 1 file changed, 11 insertions(+)