Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 893848 - sys-apps/apparmor-3.0.8 `ext/stdio_filebuf.h' file not found (musl)
Summary: sys-apps/apparmor-3.0.8 `ext/stdio_filebuf.h' file not found (musl)
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: The Gentoo Linux Hardened Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-02-10 13:21 UTC by immolo
Modified: 2024-02-14 09:48 UTC (History)
1 user (show)

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


Attachments
build.log (build.log,104.58 KB, text/x-log)
2023-02-10 13:22 UTC, immolo
Details
build with headers (build-with-headers.log,106.85 KB, text/x-log)
2023-02-12 21:20 UTC, immolo
Details

Note You need to log in before you can comment on or make changes to this bug.
Description immolo 2023-02-10 13:21:38 UTC
The musl patches for apparmor no longer seem to work as it missing stdio_filebuf.h which is provided bt libc++stdv3 which is masked on musl systems.

Reproducible: Always

Steps to Reproduce:
1. setup stage3 with musl
2. emerge -va sys-apps/apparmor 
Actual Results:  
clang++ -march=nocona -O2 -pipe -falign-functions=32 -D_GNU_SOURCE -Wall -Wall -Wsign-compare -Wmissing-field-initializers -Wformat -Wformat-security -Wunused-parameter -Wimplicit-fallthrough -std=gnu++0x    -c -o aare_rules.o aare_rules.cc
22 warnings generated.
hfa.cc:1332:19: warning: unused function 'diff_qualifiers'
      [-Wunused-function]
static inline int diff_qualifiers(uint32_t perm1, uint32_t perm2)
                  ^
aare_rules.cc:26:10: fatal error: 'ext/stdio_filebuf.h' file not
      found
#include <ext/stdio_filebuf.h>
         ^~~~~~~~~~~~~~~~~~~~~
1 error generated.
make[1]: *** [<builtin>: aare_rules.o] Error 1
make[1]: *** Waiting for unfinished jobs....
chfa.cc:350:3: warning: unannotated fall-through between switch
      labels [-Wimplicit-fallthrough]


This log is using my fixes for clang but the issue does exist on a gcc musl build as well.

Part of me thinks if we are masking libc++stdv3 then we need mask this as well but I wish to get more views before I submit this as a PR to make sure this is the right way forward.
Comment 1 immolo 2023-02-10 13:22:09 UTC
Created attachment 850358 [details]
build.log
Comment 2 immolo 2023-02-12 21:19:15 UTC
I have done further tests on this by manually adding the following header files:

ext/stdio_filebuf.h
bits/requires_hosted.h
bits/c++config.h
bits/os_defines.h
bits/cpu_defines.h

This pushes the error on to place that may be of more help trying to find the point of failure.
Comment 3 immolo 2023-02-12 21:20:39 UTC
Created attachment 850596 [details]
build with headers