Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 772554 - sys-process/fcron[selinux]: does not compile (fatal error: selinux/flask.h: No such file or directory)
Summary: sys-process/fcron[selinux]: does not compile (fatal error: selinux/flask.h: N...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: No maintainer - Look at https://wiki.gentoo.org/wiki/Project:Proxy_Maintainers if you want to take care of it
URL: https://github.com/yo8192/fcron/issue...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-02-24 20:57 UTC by Alexander Weber
Modified: 2023-02-07 08:59 UTC (History)
3 users (show)

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


Attachments
build.log (build.log,16.85 KB, text/x-log)
2021-02-24 20:57 UTC, Alexander Weber
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Weber 2021-02-24 20:57:06 UTC
On my server with selinux enabled (still in permissive mode) I cannot compile sys-process/fcron. Tested with both stable versions: 3.2.1-r1 3.2.1-r3

Reproducible: Always

Steps to Reproduce:
1.emerge sys-process/fcron

Actual Results:  
In file included from cl.c:24:
global.h:48:10: fatal error: selinux/flask.h: No such file or directory
   48 | #include <selinux/flask.h>
      |          ^~~~~~~~~~~~~~~~~
compilation terminated.
make: *** [Makefile:122: cl.o] Error 1
make: *** Waiting for unfinished jobs....
In file included from save.c:25:
global.h:48:10: fatal error: selinux/flask.h: No such file or directory
   48 | #include <selinux/flask.h>
      |          ^~~~~~~~~~~~~~~~~
compilation terminated.
make: *** [Makefile:122: save.o] Error 1
In file included from fcron.h:28,
                 from fcron.c:25:
global.h:48:10: fatal error: selinux/flask.h: No such file or directory
   48 | #include <selinux/flask.h>
      |          ^~~~~~~~~~~~~~~~~
compilation terminated.
In file included from subs.c:25:
global.h:48:10: fatal error: selinux/flask.h: No such file or directory
   48 | #include <selinux/flask.h>
      |          ^~~~~~~~~~~~~~~~~
compilation terminated.
make: *** [Makefile:122: fcron.o] Error 1
make: *** [Makefile:122: subs.o] Error 1
In file included from temp_file.c:25:
global.h:48:10: fatal error: selinux/flask.h: No such file or directory
   48 | #include <selinux/flask.h>
      |          ^~~~~~~~~~~~~~~~~
compilation terminated.
make: *** [Makefile:122: temp_file.o] Error 1
In file included from mem.c:24:
global.h:48:10: fatal error: selinux/flask.h: No such file or directory
   48 | #include <selinux/flask.h>
      |          ^~~~~~~~~~~~~~~~~


Expected Results:  
fcron is installed

# emerge --info
Portage 3.0.13 (python 3.8.7-final-0, default/linux/amd64/17.1/hardened/selinux, gcc-9.3.0, glibc-2.32-r6, 5.4.97-gentoo x86_64)
=================================================================
System uname: Linux-5.4.97-gentoo-x86_64-Intel-R-_Celeron-R-_CPU_J3455_@_1.50GHz-with-glibc2.2.5
KiB Mem:     3861080 total,   2258052 free
KiB Swap:    3145724 total,   3145724 free
Head commit of repository gentoo: e9bdc8cf072043af5e8a2b02cdd52c2a9fe476e2

Head commit of repository bell07: 15b58046d603437bb3532a46cc1a372b7d17290a

sh bash 5.0_p18
ld GNU ld (Gentoo 2.35.1 p2) 2.35.1
app-shells/bash:          5.0_p18::gentoo
dev-lang/perl:            5.30.3::gentoo
dev-lang/python:          3.8.7-r1::gentoo, 3.9.1-r1::gentoo
dev-util/cmake:           3.18.5::gentoo
dev-util/pkgconfig:       0.29.2::gentoo
sys-apps/baselayout:      2.7::gentoo
sys-apps/openrc:          0.42.1-r1::gentoo
sys-apps/sandbox:         2.20::gentoo
sys-devel/autoconf:       2.69-r5::gentoo
sys-devel/automake:       1.15.1-r2::gentoo, 1.16.2-r1::gentoo
sys-devel/binutils:       2.35.1-r1::gentoo
sys-devel/gcc:            9.3.0-r2::gentoo
sys-devel/gcc-config:     2.3.2-r1::gentoo
sys-devel/libtool:        2.4.6-r6::gentoo
sys-devel/make:           4.3::gentoo
sys-kernel/linux-headers: 5.4-r1::gentoo (virtual/os-headers)
sys-libs/glibc:           2.32-r6::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: git
    sync-uri: https://github.com/gentoo/gentoo.git
    priority: -1000

bell07
    location: /var/db/repos/bell07
    sync-type: git
    sync-uri: https://github.com/bell07/gentoo-bell07_overlay
    masters: gentoo
    priority: 50

ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -march=native -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php7.3/ext-active/ /etc/php/cgi-php7.3/ext-active/ /etc/php/cli-php7.3/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-O2 -march=native -pipe"
DISTDIR="/mnt/data/distfiles"
EMERGE_DEFAULT_OPTS="--autounmask-write n"
ENV_UNSET="CARGO_HOME DBUS_SESSION_BUS_ADDRESS DISPLAY GOBIN GOPATH PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR"
FCFLAGS="-O2 -march=native -pipe"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news parallel-fetch preserve-libs protect-owned qa-unresolved-soname-deps sandbox selinux sesandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -march=native -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="de_DE.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="en de"
MAKEOPTS="-j6"
PKGDIR="/var/cache/binpkgs"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/var/tmp"
USE="acl amd64 apache2 audit avahi bzip2 cacert crypt git hardened iconv ipv6 libglvnd libtirpc logrotate maildir mbox mdnsresponder-compat multilib ncurses nls nptl openmp pam pcre pie readline samba seccomp selinux snmp split-usr sqlite ssl ssp threads unicode xattr xtpax zeroconf zlib" ABI_X86="64" ADA_TARGET="gnat_2018" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes mmx mmxext pclmul popcnt sha sse sse2 sse3 sse4_1 sse4_2 ssse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="libinput" KERNEL="linux" L10N="en de" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LUA_SINGLE_TARGET="lua5-1" LUA_TARGETS="lua5-1" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php7-3 php7-4" POSTGRES_TARGETS="postgres10 postgres11" PYTHON_SINGLE_TARGET="python3_8" PYTHON_TARGETS="python3_8" RUBY_TARGETS="ruby26" USERLAND="GNU" VIDEO_CARDS="intel" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CC, CPPFLAGS, CTARGET, CXX, INSTALL_MASK, LC_ALL, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Alexander Weber 2021-02-24 20:57:49 UTC
Created attachment 688269 [details]
build.log
Comment 2 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2021-02-24 21:03:32 UTC
This is a deprecated (now-removed) file from libselinux:
https://github.com/yo8192/fcron/issues/10.
Comment 3 Joel Parthemore 2021-02-25 21:25:43 UTC
(In reply to Sam James from comment #2)
> This is a deprecated (now-removed) file from libselinux:
> https://github.com/yo8192/fcron/issues/10.

I have the same problem on a system running Selinux in enforcing mode. I understand the problem exactly. The question is, is there an easy way to patch around it?  I am attempting to compile fcron-3.2.1-r3.
Comment 4 dan 2021-04-06 05:20:06 UTC
I am also encountering this issue, and I know it's not due to selinux directly because while my profile does use selinux, I have it DISABLED at the moment. The problem is that selinux/flask.h is so depreciated as to have been removed completely from recent selinux releases.
Comment 5 Atlant 2021-07-17 15:05:20 UTC
test patch
https://github.com/yo8192/fcron/pull/12.patch
Comment 6 Alexey 2023-02-07 08:59:47 UTC
This is fixed in 3.3.1 (currently in ~arch)