Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 12 Dec 2022 20:35:04 +0000
From:      bugzilla-noreply@freebsd.org
To:        ports-bugs@FreeBSD.org
Subject:   [Bug 268341] archivers/rpm4: fix build with clang 15
Message-ID:  <bug-268341-7788@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D268341

            Bug ID: 268341
           Summary: archivers/rpm4: fix build with clang 15
           Product: Ports & Packages
           Version: Latest
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: Individual Port(s)
          Assignee: rodrigo@FreeBSD.org
          Reporter: dim@FreeBSD.org
             Flags: maintainer-feedback?(rodrigo@FreeBSD.org)
          Assignee: rodrigo@FreeBSD.org

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

  tools/rpmuncompress.c:101:23: warning: call to undeclared function
'basename'; ISO C99 and later do not support implicit function declarations
[-Wimplicit-function-declaration]
              const char *bn =3D basename(fn);
                               ^
  tools/rpmuncompress.c:101:18: error: incompatible integer to pointer
conversion initializing 'const char *' with an expression of type 'int'
[-Wint-conversion]
              const char *bn =3D basename(fn);
                          ^    ~~~~~~~~~~~~

This is because basename(3) is defined in <libgen.h>. After this include is
added to rpmuncompress.c, link errors still occur:

  ld: error: undefined symbol: WIFEXITED
  >>> referenced by rpmuncompress.c
  >>>               tools/rpmuncompress.o:(main)

  ld: error: undefined symbol: WEXITSTATUS
  >>> referenced by rpmuncompress.c
  >>>               tools/rpmuncompress.o:(main)

This is because WIFEXITED() and WEXITSTATUS() are macros defined in
<sys/wait.h>.

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-268341-7788>