Summary: | net-wireless/bluez-5.76-r1 - tools/hex2hcd.c:305:18: error: call to undeclared function 'basename' | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | ernsteiswuerfel <erhard_f> |
Component: | Current packages | Assignee: | Pacho Ramos <pacho> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | erhard_f, ionen, strdenis02, waltercool |
Priority: | Normal | Keywords: | PATCH |
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
URL: | https://github.com/bluez/bluez/issues/843 | ||
See Also: |
https://github.com/bluez/bluez/pull/897 https://github.com/bluez/bluez/pull/936 |
||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | |||
Bug Blocks: | 926147 | ||
Attachments: |
build.log
emerge --info build.log (5.75, amd64) build.log (5.77, amd64) rpl.patch hex2hcd fix |
Created attachment 886894 [details]
emerge --info
Created attachment 892893 [details]
build.log (5.75, amd64)
Opened an upstream issue about it: https://github.com/bluez/bluez/issues/843 tinderbox_musl has reproduced this issue with version 5.76-r1 - Updating summary. Created attachment 900108 [details]
build.log (5.77, amd64)
This specific issue gets fixed with the patch above.
But there are yet more similar issues remaining it seems:
[...]
clang -DHAVE_CONFIG_H -I. -I/usr/include/dbus-1.0 -I/usr/lib/dbus-1.0/include -I/usr/include/elogind -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -pthread -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I./lib -ffunction-sections -fdata-sections -Os -march=x86-64-v2 -pipe -c -o mesh/rpl.o mesh/rpl.c
mesh/rpl.c:149:11: error: call to undeclared function 'basename'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
149 | iv_txt = basename(iv_path);
| ^
mesh/rpl.c:149:9: error: incompatible integer to pointer conversion assigning to 'const char *' from 'int' [-Wint-conversion]
149 | iv_txt = basename(iv_path);
| ^ ~~~~~~~~~~~~~~~~~
2 errors generated.
make[1]: *** [Makefile:7845: mesh/rpl.o] Error 1
make: *** [Makefile:4669: all] Error 2
[...]
You also need to apply the rpi patch mentioned here: https://github.com/bluez/bluez/issues/843#issuecomment-2292487244 Created attachment 903479 [details]
rpl.patch
Created attachment 903480 [details, diff] hex2hcd fix hex2hcd fix from https://github.com/bluez/bluez/pull/897 The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c5d8c3399a48d1eadc97063b7c538c06aa065a01 commit c5d8c3399a48d1eadc97063b7c538c06aa065a01 Author: Sam James <sam@gentoo.org> AuthorDate: 2024-09-24 06:11:17 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2024-09-24 06:11:17 +0000 net-wireless/bluez: fix musl build Closes: https://bugs.gentoo.org/926344 Signed-off-by: Sam James <sam@gentoo.org> net-wireless/bluez/bluez-5.78.ebuild | 3 + .../bluez/files/bluez-5.78-musl-1.2.5.patch | 312 +++++++++++++++++++++ 2 files changed, 315 insertions(+) |
Created attachment 886893 [details] build.log [...] /bin/sh ./libtool --tag=CC --mode=link clang -Os -march=x86-64-v2 -pipe -fuse-ld=bfd -Wl,-O1 -Wl,--as-needed -o tools/bluemoon tools/bluemoon.o src/libshared-mainloop.la libtool: link: clang -Os -march=x86-64-v2 -pipe -fuse-ld=bfd -Wl,-O1 -o tools/bluemoon tools/bluemoon.o -Wl,--as-needed src/.libs/libshared-mainloop.a clang -DHAVE_CONFIG_H -I. -I/usr/include/dbus-1.0 -I/usr/lib/dbus-1.0/include -I/usr/include/elogind -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -pthread -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I./lib -Os -march=x86-64-v2 -pipe -c -o tools/hex2hcd.o tools/hex2hcd.c tools/hex2hcd.c:305:18: error: call to undeclared function 'basename'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] 305 | ver_parse_file(basename(pathname)); | ^ tools/hex2hcd.c:305:18: error: incompatible integer to pointer conversion passing 'int' to parameter of type 'const char *' [-Wint-conversion] 305 | ver_parse_file(basename(pathname)); | ^~~~~~~~~~~~~~~~~~ tools/hex2hcd.c:234:40: note: passing argument to parameter 'pathname' here 234 | static void ver_parse_file(const char *pathname) | ^ 2 errors generated. make[1]: *** [Makefile:7839: tools/hex2hcd.o] Error 1 make: *** [Makefile:4689: all] Error 2