Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 926293 - sys-apps/util-linux-2.39.3-r3 - .../work/util-linux-2.39.3/login-utils/su-common.c:847:20: error: call to undeclared function 'basename'
Summary: sys-apps/util-linux-2.39.3-r3 - .../work/util-linux-2.39.3/login-utils/su-com...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks: musl-1.2.5
  Show dependency tree
 
Reported: 2024-03-07 00:13 UTC by ernsteiswuerfel
Modified: 2024-04-02 15:00 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log (util-linux-2.39.3-r3:20240307-000400.log,105.91 KB, text/plain)
2024-03-07 00:13 UTC, ernsteiswuerfel
Details
emerge --info (file_926293.txt,7.42 KB, text/plain)
2024-03-07 00:14 UTC, ernsteiswuerfel
Details

Note You need to log in before you can comment on or make changes to this bug.
Description ernsteiswuerfel archtester 2024-03-07 00:13:55 UTC
Created attachment 886839 [details]
build.log

[...]
clang -DHAVE_CONFIG_H -I. -I/var/tmp/portage/sys-apps/util-linux-2.39.3-r3/work/util-linux-2.39.3  -include config.h -I/var/tmp/portage/sys-apps/util-linux-2.39.3-r3/work/util-linux-2.39.3/include -DLOCALEDIR=\"/usr/share/locale\" -D_PATH_RUNSTATEDIR=\"/run\" -D_PATH_SYSCONFSTATICDIR=\"/usr/lib\"   -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE  -fsigned-char -fno-common -Wall -Wextra -Waddress-of-packed-member -Wembedded-directive -Wextra-semi -Wformat-security -Wimplicit-function-declaration -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wno-missing-field-initializers -Wold-style-definition -Wpointer-arith -Wredundant-decls -Wsign-compare -Wstrict-prototypes -Wtype-limits -Wuninitialized -Wunused-but-set-parameter -Wunused-but-set-variable -Wunused-parameter -Wunused-result -Wunused-variable -Werror=sequence-point -Os -march=x86-64-v2 -pipe -c -o login-utils/su-su-common.o `test -f 'login-utils/su-common.c' || echo '/var/tmp/portage/sys-apps/util-linux-2.39.3-r3/work/util-linux-2.39.3/'`login-utils/su-common.c
/var/tmp/portage/sys-apps/util-linux-2.39.3-r3/work/util-linux-2.39.3/login-utils/su-common.c:847:20: error: call to undeclared function 'basename'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
  847 |                 shell_basename = basename(shell);
      |                                  ^
/var/tmp/portage/sys-apps/util-linux-2.39.3-r3/work/util-linux-2.39.3/login-utils/su-common.c:847:18: error: incompatible integer to pointer conversion assigning to 'char *' from 'int' [-Wint-conversion]
  847 |                 shell_basename = basename(shell);
      |                                ^ ~~~~~~~~~~~~~~~
/var/tmp/portage/sys-apps/util-linux-2.39.3-r3/work/util-linux-2.39.3/login-utils/su-common.c:853:13: error: call to undeclared function 'basename'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
  853 |                 args[0] = basename(shell);
      |                           ^
/var/tmp/portage/sys-apps/util-linux-2.39.3-r3/work/util-linux-2.39.3/login-utils/su-common.c:853:11: error: incompatible integer to pointer conversion assigning to 'const char *' from 'int' [-Wint-conversion]
  853 |                 args[0] = basename(shell);
      |                         ^ ~~~~~~~~~~~~~~~
4 errors generated.
make[2]: *** [Makefile:13433: login-utils/su-su-common.o] Error 1
make[2]: Leaving directory '/var/tmp/portage/sys-apps/util-linux-2.39.3-r3/work/util-linux-2.39.3-abi_x86_64.amd64'
make[1]: *** [Makefile:15789: all-recursive] Error 1
make[1]: Leaving directory '/var/tmp/portage/sys-apps/util-linux-2.39.3-r3/work/util-linux-2.39.3-abi_x86_64.amd64'
make: *** [Makefile:6698: all] Error 2
Comment 1 ernsteiswuerfel archtester 2024-03-07 00:14:20 UTC
Created attachment 886840 [details]
emerge --info
Comment 3 ernsteiswuerfel archtester 2024-03-08 12:24:41 UTC
I can confirm that the patch fixes the build. Thanks!
Comment 4 Larry the Git Cow gentoo-dev 2024-03-18 13:42:58 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5f364406d48c2e886059080044c3259a14d4bb5a

commit 5f364406d48c2e886059080044c3259a14d4bb5a
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2024-03-18 13:34:04 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2024-03-18 13:42:49 +0000

    sys-apps/util-linux: backport fix for LVM2 metadata parsing, basename w/ musl-1.2.5
    
    Closes: https://bugs.gentoo.org/926293
    Closes: https://bugs.gentoo.org/926950
    Signed-off-by: Sam James <sam@gentoo.org>

 .../files/util-linux-2.39.3-libblkid-luks.patch    |  40 ++
 .../util-linux-2.39.3-musl-1.2.5-basename.patch    |  56 +++
 sys-apps/util-linux/util-linux-2.39.3-r4.ebuild    | 413 +++++++++++++++++++++
 3 files changed, 509 insertions(+)