too long lines were shrinked: x86_64-pc-linux-musl-gcc -O2 -pipe -march=native -fno-diagnostics-color -fno-semantic-interposition -I../include -D_GNU_SOURCE -c -o database_llist.o database_llist.c x86_64-pc-linux-musl-gcc -O2 -pipe -march=native -fno-diagnostics-color -fno-semantic-interposition -I../include -D_GNU_SOURCE -c -o database_policydb.o database_policydb.c x86_64-pc-linux-musl-gcc -O2 -pipe -march=native -fno-diagnostics-color -fno-semantic-interposition -I../include -D_GNU_SOURCE -c -o debug.o debug.c x86_64-pc-linux-musl-gcc -O2 -pipe -march=native -fno-diagnostics-color -fno-semantic-interposition -I../include -D_GNU_SOURCE -c -o direct_api.o direct_api.c x86_64-pc-linux-musl-gcc -O2 -pipe -march=native -fno-diagnostics-color -fno-semantic-interposition -I../include -D_GNU_SOURCE -c -o fcontext_record.o fcontext_record.c direct_api.c: In function 'semanage_direct_install_file': direct_api.c:1738:20: error: implicit declaration of function 'basename' [-Wimplicit-function-declaration] 1738 | filename = basename(path); | ^~~~~~~~ ------------------------------------------------------------------- This is an unstable amd64 chroot image at a tinderbox (==build bot) name: 23.0_musl-20240824-035506 UNMASKED: Please re-assign to toolchain@ if you get a test failure in C, C++, or Fortran code which makes no sense. /etc/portage/package.unmask/60gcc:<sys-devel/gcc-15.0.9999:15 The attached etc.portage.tar.xz has all details. ------------------------------------------------------------------- gcc-config -l: [1] x86_64-pc-linux-musl-15 * clang/llvm (if any): clang version 18.1.8 Target: x86_64-pc-linux-musl Thread model: posix InstalledDir: /usr/lib/llvm/18/bin Configuration file: /etc/clang/x86_64-pc-linux-musl-clang.cfg /usr/lib/llvm/18 18.1.8 Python 3.12.5 Available Ruby profiles: [1] ruby31 (with Rubygems) [2] ruby32 (with Rubygems) [3] ruby33 (with Rubygems) * Available Rust versions: [1] rust-bin-1.80.1 * The following VMs are available for generation-2: 1) Eclipse Temurin JDK 11.0.24_p8 [openjdk-bin-11] 2) Eclipse Temurin JDK 17.0.12_p7 [openjdk-bin-17] *) Eclipse Temurin JDK 21.0.4_p7 [openjdk-bin-21] Available Java Virtual Machines: [1] openjdk-bin-11 [2] openjdk-bin-17 [3] openjdk-bin-21 system-vm php cli (if any): go version go1.23.0 linux/amd64 HEAD of ::gentoo commit 02d5d10f3c9f580626d39e88f53fa61508fe18b6 Author: Repository mirror & CI <repomirrorci@gentoo.org> Date: Sat Aug 31 19:33:51 2024 +0000 2024-08-31 19:33:51 UTC emerge -qpvO =sys-libs/libsemanage-3.7 [ebuild N ] sys-libs/libsemanage-3.7 PYTHON_TARGETS="python3_12 -python3_10 -python3_11"
Created attachment 901784 [details] emerge-info.txt
Created attachment 901785 [details] emerge-history.txt.xz
Created attachment 901786 [details] environment
Created attachment 901787 [details] etc.clang.tar.xz
Created attachment 901788 [details] etc.portage.tar.xz
Created attachment 901789 [details] qlist-info.txt.xz
Created attachment 901790 [details] sys-libs:libsemanage-3.7:20240831-201235.log
Created attachment 901791 [details] temp.tar.xz
this is caused by a missing header: libgen.h i've made this patch to add it to the files where it's required: --- a/src/direct_api.c +++ b/src/direct_api.c @@ -38,6 +38,7 @@ #include <limits.h> #include <errno.h> #include <dirent.h> +#include <libgen.h> #include "user_internal.h" #include "seuser_internal.h" --- a/src/conf-parse.y +++ b/src/conf-parse.y @@ -30,6 +30,7 @@ #include <stdio.h> #include <stdlib.h> #include <string.h> +#include <libgen.h> extern int semanage_lex(void); /* defined in conf-scan.c */ extern int semanage_lex_destroy(void); /* defined in conf-scan.c */
it seems that this is musl specific, since glibc declares the basename function within string.h
I think its the other way around: libsemanage relies on glibc which defines `basename` twice. The one declared in stdlib.h has alternate semantics and signature that conflict with the standard definition. musl only provides the standard one. libsemanage seems to expect the alternate glibc/stdlib.h definition, even upstream: https://github.com/SELinuxProject/selinux/pull/440/files (this is also present in libsemanage-3.6)