Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 541618 - app-admin/setools fails to build with ABI X32
Summary: app-admin/setools fails to build with ABI X32
Status: RESOLVED OBSOLETE
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: SELinux (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: SE Linux Bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-02-28 10:32 UTC by Matheus Izvekov
Modified: 2017-01-23 18:01 UTC (History)
1 user (show)

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


Attachments
possible fix for setools' configure.ac (fix-selib.patch,878 bytes, patch)
2015-02-28 10:32 UTC, Matheus Izvekov
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Matheus Izvekov 2015-02-28 10:32:03 UTC
Created attachment 397656 [details, diff]
possible fix for setools' configure.ac

libselinux fails building with the following error:
   error: /usr/lib/libsepol.a: No such file or directory

The issue here is in the ebuild. When building pywrap and rubywrap, LIBDIR and SHLIBDIR needs to be set...

So just adding:
   LIBDIR="\$(PREFIX)/$(get_libdir)" \
   SHLIBDIR="\$(DESTDIR)/$(get_libdir)" \

to the emake call of both pywrap and rubywrap fixes this.

-----------------------

setools fails building with the following errors:
   skipping incompatible /usr/lib64/libselinux.so when searching for -lselinux
   ...etcetera...

The problem with setools is a bit more complicated. It's configure.ac script 
makes certain invalid assumptions.

'with-sepol-devel' and 'with-selinux-devel' are supposed to select where libsepol and libselinux includes and libraries are located. The script assumes that the libraries it can use will be located in either lib64/ or lib/ inside those directories.

One way to fix this is applying the attached patch, and then fixing the ebuild by passing the following parameters to econf:
   --with-sepol-devel="/usr/$(get_libdir)/.." \
   --with-selinux-devel="/usr/$(get_libdir)/.." \
Comment 1 Matheus Izvekov 2015-02-28 14:28:42 UTC
checkpolicy also fails building with:
   error: /usr/lib/libsepol.a: No such file or directory

To fix, it's ebuild needs to be modified so that LIBDIR is specified when calling the makefile. Like this:

    emake CC="$(tc-getCC)" YACC="bison -y" LIBDIR="/usr/$(get_libdir)"
Comment 2 Matheus Izvekov 2015-02-28 14:43:05 UTC
Same as above for policycoreutils, it needs LIBDIR set:

   emake -C "${BUILD_DIR}" AUDIT_LOG_PRIVS="y" AUDITH="${use_audit}" PAMH="${use_pam}" INOTIFYH="${use_dbus}" SESANDBOX="${use_sesandbox}" CC="$(tc-getCC)" PYLIBVER="${EPYTHON}" LIBDIR="/usr/$(get_libdir)" || die
Comment 3 Sven Vermeulen (RETIRED) gentoo-dev 2015-03-04 16:08:48 UTC
I committed updates to the ebuilds of the following packages. I did took the freedom to use \$(PREFIX)/$(get_libdir) where possible. I hope that is okay.

sys-libs/libselinux-2.4
sys-apps/policycoreutils-2.4
sys-apps/checkpolicy-2.4

I have not touched setools on this matter yet though.
Comment 4 Sven Vermeulen (RETIRED) gentoo-dev 2015-06-09 10:58:51 UTC
The regular userspace (2.4) is stable.

app-admin/setools is not taken up yet, I'm not sure if this will considering that development on setools-3 is moved to a maintenance mode by tresys (upstream) and effort is focusing on setools-4.

Anyway, updating title to reflect setools scope only for now.
Comment 5 Jason Zaman gentoo-dev 2017-01-23 18:01:56 UTC
setoos4 is stable in the tree now and is a complete re-write so this is obsolete now.