For sys-apps/policycoreutils-1.24-r1, there is a compile error. However, going up to sys-apps/policycoreutils-1.24, it works fine. Please knock this 1.24 to stable (or take 1.24-r1 out). Reproducible: Always Steps to Reproduce: 1. emerge policycoreutils 2. 3. Actual Results: gcc -Werror -Wall -mcpu=i686 -O2 -pipe -W audit2why.c /usr/lib/libsepol.a -l selinux -o audit2why In file included from audit2why.c:11: /usr/include/selinux/selinux.h:94: error: redefinition of `struct av_decision' audit2why.c: In function `main': audit2why.c:33: error: `sepol_security_id_t' undeclared (first use in this funct ion) audit2why.c:33: error: (Each undeclared identifier is reported only once audit2why.c:33: error: for each function it appears in.) audit2why.c:33: error: syntax error before "ssid" audit2why.c:34: error: `sepol_security_class_t' undeclared (first use in this fu nction) audit2why.c:35: error: `sepol_access_vector_t' undeclared (first use in this fun ction) audit2why.c:36: error: storage size of `avd' isn't known audit2why.c:112: warning: implicit declaration of function `sepol_genbools_polic ydb' audit2why.c:113: warning: implicit declaration of function `sepol_genusers_polic ydb' audit2why.c:183: error: `ssid' undeclared (first use in this function) audit2why.c:202: error: `tsid' undeclared (first use in this function) audit2why.c:221: error: `tclass' undeclared (first use in this function) audit2why.c:229: error: `av' undeclared (first use in this function) audit2why.c:235: error: `perm' undeclared (first use in this function) audit2why.c:245: warning: implicit declaration of function `sepol_compute_av_rea son' audit2why.c:260: error: `SEPOL_COMPUTEAV_TE' undeclared (first use in this funct ion) audit2why.c:266: error: `SEPOL_COMPUTEAV_CONS' undeclared (first use in this fun ction) audit2why.c:272: error: `SEPOL_COMPUTEAV_RBAC' undeclared (first use in this fun ction) audit2why.c:36: warning: unused variable `avd' make[1]: *** [audit2why] Error 1 make[1]: Leaving directory `/var/tmp/portage/policycoreutils-1.24-r1/work/policy coreutils-1.24/audit2why' make: *** [all] Error 1 make: Leaving directory `/var/tmp/portage/policycoreutils-1.24-r1/work/policycor eutils-1.24' !!! ERROR: sys-apps/policycoreutils-1.24-r1 failed. !!! Function src_compile, Line 100, Exitcode 2 !!! (no error message) !!! If you need support, post the topmost build error, NOT this status message. Expected Results: clean compile cdimage policycoreutils # emerge info !!! SELinux not loaded: SELinux is not enabled. Portage 2.0.51.22-r3 (selinux/2005.1/x86, gcc-3.3.5-20050130, glibc-2.3.5-r0, 2.4.21-gss i686) ================================================================= System uname: 2.4.21-gss i686 Pentium III (Coppermine) Gentoo Base System version 1.6.13 dev-lang/python: 2.3.5 sys-apps/sandbox: 1.2.11 sys-devel/autoconf: 2.13, 2.59-r6 sys-devel/automake: 1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r1 sys-devel/binutils: 2.15.92.0.2-r10 sys-devel/libtool: 1.5.18-r1 virtual/os-headers: 2.6.11-r2 ACCEPT_KEYWORDS="x86" AUTOCLEAN="yes" CBUILD="i686-pc-linux-gnu" CFLAGS="-mcpu=i686 -O2 -pipe" CHOST="i686-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config /usr/share/config /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d" CXXFLAGS="-mcpu=i686 -O2 -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="autoconfig distlocks sandbox selinux sfperms strict" GENTOO_MIRRORS="http://gentoo.cs.lewisu.edu/gentoo/ http://gentoo.mirrored.ca/ ftp://gentoo.llarian.net/pub/gentoo http://206.75.218.53/" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="X aac aim alsa apache2 apm avi bash-completion berkdb bzip2 cdr crypt cups curl dga dri encode ethereal examples expat fbcon ffmpeg flac ftp geoip gif gnome gphoto2 gstreamer hardened imap ipv6 java javascript jikes jpeg kerberos ldap mad mng mp3 mpeg ncurses nls nptl ogg opengl pam pcmcia pcre pda perl php pic png posix python qt quicktime readline samba sasl scanner sdl selinux skey sockets sse ssl svga sysvipc tcltk tcpd truetype usb v4l vcd vorbis wifi win32codecs wmf x86 xmms xpm xv xvid zlib userland_GNU kernel_linux elibc_glibc" Unset: ASFLAGS, CTARGET, LANG, LC_ALL, LDFLAGS, LINGUAS, PORTDIR_OVERLAY
i can reproduce this error on my system with sys-apps/policycoreutils-1.24-r2 with following output: >>> Unpacking source... >>> Unpacking policycoreutils-1.24.tgz to /var/tmp/portage/policycoreutils-1.24-r2/work >>> Unpacking policycoreutils-extra-1.13.tar.bz2 to /var/tmp/portage/policycoreutils-1.24-r2/work * Applying policycoreutils-1.24-genhomedircon-quiet.diff ... [ ok ] >>> Source unpacked. * Compiling policycoreutils make: Entering directory `/var/tmp/portage/policycoreutils-1.24-r2/work/policycoreutils-1.24' make[1]: Entering directory `/var/tmp/portage/policycoreutils-1.24-r2/work/policycoreutils-1.24/setfiles' cc -Werror -D_FILE_OFFSET_BITS=64 -Wall -O2 -mcpu=i686 -pipe -W -c -o setfiles.o setfiles.c `-mcpu=' is deprecated. Use `-mtune=' or '-march=' instead. cc -o setfiles setfiles.o -lselinux -lsepol make[1]: Leaving directory `/var/tmp/portage/policycoreutils-1.24-r2/work/policycoreutils-1.24/setfiles' make[1]: Entering directory `/var/tmp/portage/policycoreutils-1.24-r2/work/policycoreutils-1.24/load_policy' cc -Werror -DUSE_NLS -DLOCALEDIR="\"/usr/share/locale\"" -DPACKAGE="\"policycoreutils\"" -Wall -O2 -mcpu=i686 -pi pe -W load_policy.c -lsepol -lselinux -o load_policy `-mcpu=' is deprecated. Use `-mtune=' or '-march=' instead. make[1]: Leaving directory `/var/tmp/portage/policycoreutils-1.24-r2/work/policycoreutils-1.24/load_policy' make[1]: Entering directory `/var/tmp/portage/policycoreutils-1.24-r2/work/policycoreutils-1.24/newrole' cc -Werror -DUSE_NLS -DUSE_PAM -DLOCALEDIR="\"/usr/share/locale\"" -DPACKAGE="\"policycoreutils\"" -Wall -O2 -mcp u=i686 -pipe -W newrole.c -lselinux -lpam -lpam_misc -o newrole `-mcpu=' is deprecated. Use `-mtune=' or '-march=' instead. make[1]: Leaving directory `/var/tmp/portage/policycoreutils-1.24-r2/work/policycoreutils-1.24/newrole' make[1]: Entering directory `/var/tmp/portage/policycoreutils-1.24-r2/work/policycoreutils-1.24/run_init' cc -Werror -DUSE_NLS -DUSE_PAM -DLOCALEDIR="\"/usr/share/locale\"" -DPACKAGE="\"policycoreutils\"" -Wall -O2 -mcp u=i686 -pipe -W open_init_pty.c -ldl -lutil -o open_init_pty `-mcpu=' is deprecated. Use `-mtune=' or '-march=' instead. cc -Werror -DUSE_NLS -DUSE_PAM -DLOCALEDIR="\"/usr/share/locale\"" -DPACKAGE="\"policycoreutils\"" -Wall -O2 -mcp u=i686 -pipe -W run_init.c -lselinux -lpam -lpam_misc -o run_init `-mcpu=' is deprecated. Use `-mtune=' or '-march=' instead. make[1]: Leaving directory `/var/tmp/portage/policycoreutils-1.24-r2/work/policycoreutils-1.24/run_init' make[1]: Entering directory `/var/tmp/portage/policycoreutils-1.24-r2/work/policycoreutils-1.24/restorecon' cc -Werror -D_FILE_OFFSET_BITS=64 -Wall -O2 -mcpu=i686 -pipe -W -c -o restorecon.o restorecon.c `-mcpu=' is deprecated. Use `-mtune=' or '-march=' instead. cc -o restorecon restorecon.o -lselinux make[1]: Leaving directory `/var/tmp/portage/policycoreutils-1.24-r2/work/policycoreutils-1.24/restorecon' make[1]: Entering directory `/var/tmp/portage/policycoreutils-1.24-r2/work/policycoreutils-1.24/audit2allow' make[1]: Nothing to be done for `all'. make[1]: Leaving directory `/var/tmp/portage/policycoreutils-1.24-r2/work/policycoreutils-1.24/audit2allow' make[1]: Entering directory `/var/tmp/portage/policycoreutils-1.24-r2/work/policycoreutils-1.24/audit2why' cc -Werror -Wall -O2 -mcpu=i686 -pipe -W audit2why.c /usr/lib/libsepol.a -lselinux -o audit2why `-mcpu=' is deprecated. Use `-mtune=' or '-march=' instead. audit2why.c:10:28: sepol/services.h: No such file or directory audit2why.c: In function `main': audit2why.c:33: error: `sepol_security_id_t' undeclared (first use in this function) audit2why.c:33: error: (Each undeclared identifier is reported only once audit2why.c:33: error: for each function it appears in.) audit2why.c:33: error: parse error before "ssid" audit2why.c:34: error: `sepol_security_class_t' undeclared (first use in this function) audit2why.c:35: error: `sepol_access_vector_t' undeclared (first use in this function) audit2why.c:36: error: storage size of 'avd' isn't known audit2why.c:39: error: `sidtab_t' undeclared (first use in this function) audit2why.c:39: error: parse error before "sidtab" audit2why.c:40: error: `policydb_t' undeclared (first use in this function) audit2why.c:41: error: storage size of 'pf' isn't known audit2why.c:47: warning: implicit declaration of function `strncpy' audit2why.c:51: warning: implicit declaration of function `strerror' audit2why.c:51: warning: format argument is not a pointer (arg 5) audit2why.c:70: warning: format argument is not a pointer (arg 4) audit2why.c:85: warning: format argument is not a pointer (arg 5) audit2why.c:94: error: `PF_USE_STDIO' undeclared (first use in this function) audit2why.c:95: warning: implicit declaration of function `policydb_read' audit2why.c:95: error: `policydb' undeclared (first use in this function) audit2why.c:101: warning: implicit declaration of function `sepol_set_policydb' audit2why.c:112: warning: implicit declaration of function `sepol_genbools_policydb' audit2why.c:113: warning: implicit declaration of function `sepol_genusers_policydb' audit2why.c:119: warning: implicit declaration of function `sepol_sidtab_init' audit2why.c:119: error: `sidtab' undeclared (first use in this function) audit2why.c:125: warning: implicit declaration of function `sepol_set_sidtab' audit2why.c:129: warning: implicit declaration of function `strlen' audit2why.c:136: warning: implicit declaration of function `strncmp' audit2why.c:157: warning: implicit declaration of function `memcpy' audit2why.c:183: warning: implicit declaration of function `sepol_context_to_sid' audit2why.c:183: error: `ssid' undeclared (first use in this function) audit2why.c:202: error: `tsid' undeclared (first use in this function) audit2why.c:221: error: `tclass' undeclared (first use in this function) audit2why.c:229: error: `av' undeclared (first use in this function) audit2why.c:235: error: `perm' undeclared (first use in this function) audit2why.c:245: warning: implicit declaration of function `sepol_compute_av_reason' audit2why.c:260: error: `SEPOL_COMPUTEAV_TE' undeclared (first use in this function) audit2why.c:266: error: `SEPOL_COMPUTEAV_CONS' undeclared (first use in this function) audit2why.c:272: error: `SEPOL_COMPUTEAV_RBAC' undeclared (first use in this function) audit2why.c:36: warning: unused variable `avd' audit2why.c:41: warning: unused variable `pf' Portage 2.0.53 (selinux/2005.1/x86, gcc-3.4.4, glibc-2.3.5-r2, 2.6.14-hardened-r1 i686) ================================================================= System uname: 2.6.14-hardened-r1 i686 Pentium II (Klamath) Gentoo Base System version 1.6.14 distcc 2.18.3 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled] dev-lang/python: 2.3.5-r2, 2.4.2 sys-apps/sandbox: 1.2.17 sys-devel/autoconf: 2.13, 2.59-r6 sys-devel/automake: 1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r1 sys-devel/binutils: 2.16.1 sys-devel/libtool: 1.5.20 virtual/os-headers: 2.4.19-r1, 2.6.11-r3 ACCEPT_KEYWORDS="x86" AUTOCLEAN="yes" CBUILD="i686-pc-linux-gnu" CFLAGS="-O2 -mcpu=i686 -pipe" CHOST="i686-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config /usr/share/config /var/bind /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d" CXXFLAGS="-O2 -mcpu=i686 -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="autoconfig candy distlocks loadpolicy sandbox selinux sfperms strict usersandbox" GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" SYNC="rsync://gentoo-distfiles.local.nil.nul/gentoo-portage" USE="acpi apache2 bash-completion berkdb bzip2 crypt expat gd gdbm gif hardened ipv6 jpeg libwww logrotate mhash mls mpm-threadpool mysql ncurses nls oav pam perl php pic pie png python readline selinux slang snmp ssl tcpd threads truetype udev x86 xml2 zlib userland_GNU kernel_linux elibc_glibc" Unset: ASFLAGS, CTARGET, LANG, LC_ALL, LDFLAGS, LINGUAS, MAKEOPTS, PORTDIR_OVERLAY
your system is missing /usr/include/sepol/services.h which is part of the libsepol-1.6 package. also make sure you have the 'pam' USE flag enabled.
sorry, but the only files that has anything common with that name has moved to another path in libsepol-1.10, which is installed on my machine: * Contents of sys-libs/libsepol-1.10: /lib /lib/libsepol.so.1 /usr /usr/bin /usr/bin/chkcon /usr/include /usr/include/sepol /usr/include/sepol/boolean_record.h /usr/include/sepol/booleans.h /usr/include/sepol/context_record.h /usr/include/sepol/debug.h /usr/include/sepol/handle.h /usr/include/sepol/iface_record.h /usr/include/sepol/interfaces.h /usr/include/sepol/module.h /usr/include/sepol/policydb /usr/include/sepol/policydb.h /usr/include/sepol/policydb/avrule_block.h /usr/include/sepol/policydb/avtab.h /usr/include/sepol/policydb/conditional.h /usr/include/sepol/policydb/constraint.h /usr/include/sepol/policydb/context.h /usr/include/sepol/policydb/ebitmap.h /usr/include/sepol/policydb/expand.h /usr/include/sepol/policydb/flask.h /usr/include/sepol/policydb/flask_types.h /usr/include/sepol/policydb/hashtab.h /usr/include/sepol/policydb/hierarchy.h /usr/include/sepol/policydb/link.h /usr/include/sepol/policydb/mls_types.h /usr/include/sepol/policydb/module.h /usr/include/sepol/policydb/policydb.h /usr/include/sepol/policydb/services.h /usr/include/sepol/policydb/sidtab.h /usr/include/sepol/policydb/symtab.h /usr/include/sepol/port_record.h /usr/include/sepol/ports.h /usr/include/sepol/roles.h /usr/include/sepol/sepol.h /usr/include/sepol/user_record.h /usr/include/sepol/users.h /usr/lib /usr/lib/libsepol.a /usr/lib/libsepol.so -> ../../lib/libsepol.so.1 /usr/share /usr/share/man /usr/share/man/man3 /usr/share/man/man3/sepol_check_context.3.gz /usr/share/man/man3/sepol_genbools.3.gz /usr/share/man/man3/sepol_genusers.3.gz /usr/share/man/man8 /usr/share/man/man8/chkcon.8.gz /usr/share/man/man8/genpolbools.8.gz /usr/share/man/man8/genpolusers.8.gz ---- /usr/include/sepol/services.h has moved to /usr/include/sepol/policydb/services.h I hope they serve the same purpose.
does this compile with libsepol 1.4?
merging of libselinux-1.4 doesnt work, because no ebuild is there. merging of libselinux-1.6 finally did merge, but didn't install... following error-message came on installing the ready build tee: symbol lookup error: /lib/libselinux.so.1: undefined symbol: sepol_policydb_read i screwed up my system with this, can do hardly anything, without this message (command does vary, message behind is the same). Any ideas?
(In reply to comment #5) > merging of libselinux-1.4 doesnt work, because no ebuild is there. > > merging of libselinux-1.6 finally did merge, but didn't install... > > following error-message came on installing the ready build > > > tee: symbol lookup error: /lib/libselinux.so.1: undefined symbol: > sepol_policydb_read > > i screwed up my system with this, can do hardly anything, without this message > (command does vary, message behind is the same). > > Any ideas? sory, i meant libsepol, not libselinux
ok, that was my mistake to suggest the downgrade. The main point is to not mix and match stable and unstable selinux userland. I will fix the dependencies in policycoreutils to require a good version. If you have ~x86 libsepol and libselinux, you must also have ~x86 policycoreutils.
ok, back off... i solved my problem.. i used a mixture of x86 and ~x86 packages... and tried to get policycore-utils to work with libsepol-1.10... which definitelly didn't work... thanx to pebenito for the help via irc. Steve: just try to switch policycoreutils to ~x86 (version 1.28)... that will work... i.e. it worked for me now.
closing
(In reply to comment #8) > Steve: just try to switch policycoreutils to ~x86 (version 1.28)... that will > work... i.e. it worked for me now. Yep, that did it... Thanks guys...