Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 674312 - sys-apps/bubblewrap-0.3.1-r1 USE=selinux - checking for libselinux... no /// configure: error: *** SELinux support requested but libraries not found
Summary: sys-apps/bubblewrap-0.3.1-r1 USE=selinux - checking for libselinux... no /// ...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Linux Gnome Desktop Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-01-02 09:50 UTC by Kristian
Modified: 2020-02-29 07:35 UTC (History)
3 users (show)

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


Attachments
fix missing call for finding pkg-config (bubblewrap-pkgconfig-fix.patch,580 bytes, patch)
2019-02-04 17:50 UTC, Jonas Jelten
Details | Diff
upstream ships ./configure, fix it as well (bubblewrap-pkgconfig-newconfigure.patch,5.09 KB, patch)
2019-02-04 17:51 UTC, Jonas Jelten
Details | Diff
Ebuild incorporporating patch. (bubblewrap-0.3.1-r1.ebuild,1.37 KB, text/plain)
2019-07-07 03:27 UTC, Nathan Goldstick
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Kristian 2019-01-02 09:50:49 UTC
On a selinux enabled host the configure phase of sys-libs/bubblewrap-0.3.1-r1 fails with:

checking for libselinux... no
configure: error: *** SELinux support requested but libraries not found

I could trace this back into configure.ac

PKG_CHECK_MODULES([SELINUX], [libselinux],
                [AC_DEFINE(HAVE_SELINUX, [1], [Define if SELinux is available])
                 have_selinux=yes
                 M4_DEFINES="$M4_DEFINES -DHAVE_SELINUX"],
                [have_selinux=no])

This fails, as /usr/lib64/pkgconfig/libselinux.pc seems not to be in the pkg path. I have not yet figured out why this is the case. Bugs from different packages with the same problem did not give any clues as to why or what the solution is. So I am posting this bug as I assume that this case (bubblewrap with selinux) has not been tested yet.
Comment 1 Jonas Jelten 2019-02-04 16:57:41 UTC
After staring at this for a longer time, the libraries can be found if one omits --with-bash-completion-dir or sets its value to yes.
If this is not set to a path, configure will try to find pkg-config in order to find out the bashcompletion path, and pkg-config is then also used for the selinux library check.

This is really strange, but pkg-config doesn't seem to be invoked at all (seen in strace) when bash-completion-dir is given.
Comment 2 Jonas Jelten 2019-02-04 17:28:18 UTC
quoting https://linux.die.net/man/1/pkg-config

          Note  that  if there is a possibility the first call to
          PKG_CHECK_MODULES might not happen, you should be  sure
          to  include  an explicit call to PKG_PROG_PKG_CONFIG in
          your configure.ac

          PKG_PROG_PKG_CONFIG([MIN-VERSION])

-> this call is missing, and if bash-completion stuff is provided on commandline, pkg-config is never found and thus doesn't report selinux to be found.
Comment 3 Jonas Jelten 2019-02-04 17:50:37 UTC
Created attachment 563720 [details, diff]
fix missing call for finding pkg-config
Comment 4 Jonas Jelten 2019-02-04 17:51:03 UTC
Created attachment 563722 [details, diff]
upstream ships ./configure, fix it as well
Comment 5 Kristian 2019-03-08 19:49:48 UTC
I can confirm, the patch bubblewrap-pkgconfig-newconfigure.patch fixes compilation for me. At least until it bails out because it is missing aclocal-1.15. Installing automake:1.15 gives me an installed bubblewrap. Thanks for your work.
Comment 6 Patrice Levesque 2019-05-09 11:14:17 UTC
Same issue here, and as with comment #5, applying both patches was not enough and I needed to install automake-1.15; then everything was fine.
Comment 7 tharvik 2019-05-12 14:43:04 UTC
PR on upstream: https://github.com/projectatomic/bubblewrap/pull/316
Comment 8 Amel Hodzic 2019-06-14 11:24:43 UTC
So, this seems to be resolved, but it's not reflected as such in the current version of the package in the gentoo repo.  Can someone provide an update on this issue?
Comment 9 Nathan Goldstick 2019-07-07 03:27:36 UTC
Created attachment 582090 [details]
Ebuild incorporporating patch.

Ebuild pulled from main portage repo that incorporates referenced patch (named "selinux.patch" in ebuild).
Comment 10 yesi 2019-12-31 11:47:54 UTC
Hi,

I get the same trouble to emerge with SELinux host : 

 * Package:    sys-apps/bubblewrap-0.3.1-r1
 * Repository: gentoo
 * Maintainer: gnome@gentoo.org
 * USE:        abi_x86_64 amd64 elibc_glibc kernel_linux selinux userland_GNU
 * FEATURES:   ccache network-sandbox preserve-libs sandbox selinux sesandbox userpriv usersandbox
 * Determining the location of the kernel source code
 * Found kernel source directory:
 *     /usr/src/linux
 * Found sources for kernel version:
 *     5.4.6-gentoo
 * Checking for suitable kernel configuration options...
 [ ok ]
Unable to configure loopback interface: Permission denied
>>> Unpacking source...
>>> Unpacking bubblewrap-0.3.1.tar.xz to /var/tmp/portage/sys-apps/bubblewrap-0.3.1-r1/work
>>> Source unpacked in /var/tmp/portage/sys-apps/bubblewrap-0.3.1-r1/work
Unable to configure loopback interface: Permission denied
>>> Preparing source in /var/tmp/portage/sys-apps/bubblewrap-0.3.1-r1/work/bubblewrap-0.3.1 ...
>>> Source prepared.
Unable to configure loopback interface: Permission denied
>>> Configuring source in /var/tmp/portage/sys-apps/bubblewrap-0.3.1-r1/work/bubblewrap-0.3.1 ...
 * econf: updating bubblewrap-0.3.1/build-aux/config.guess with /usr/share/gnuconfig/config.guess
 * econf: updating bubblewrap-0.3.1/build-aux/config.sub with /usr/share/gnuconfig/config.sub
./configure --prefix=/usr --build=x86_64-pc-linux-gnu --host=x86_64-pc-linux-gnu --mandir=/usr/share/man --infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc --localstatedir=/var/lib --disable-dependency-tracking --disable-silent-rules --docdir=/usr/share/doc/bubblewrap-0.3.1-r1 --htmldir=/usr/share/doc/bubblewrap-0.3.1-r1/html --libdir=/usr/lib64 --enable-selinux --enable-man --with-bash-completion-dir=/usr/share/bash-completion/completions --with-priv-mode=none
checking for x86_64-pc-linux-gnu-gcc... x86_64-pc-linux-gnu-gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether x86_64-pc-linux-gnu-gcc accepts -g... yes
checking for x86_64-pc-linux-gnu-gcc option to accept ISO C89... none needed
checking whether x86_64-pc-linux-gnu-gcc understands -c and -o together... yes
checking how to run the C preprocessor... x86_64-pc-linux-gnu-gcc -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking minix/config.h usability... no
checking minix/config.h presence... no
checking for minix/config.h... no
checking whether it is safe to define __EXTENSIONS__... yes
checking for a BSD-compatible install... /var/tmp/portage/._portage_reinstall_.4espax19/bin/ebuild-helpers/xattr/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for style of include used by make... GNU
checking whether make supports nested variables... yes
checking whether UID '250' is supported by ustar format... yes
checking whether GID '250' is supported by ustar format... yes
checking how to create a ustar tar archive... gnutar
checking dependency style of x86_64-pc-linux-gnu-gcc... none
checking whether to enable maintainer-specific portions of Makefiles... yes
checking whether make supports nested variables... (cached) yes
checking for special C compiler options needed for large files... no
checking for _FILE_OFFSET_BITS value needed for large files... no
checking for x86_64-pc-linux-gnu-gcc... (cached) x86_64-pc-linux-gnu-gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether x86_64-pc-linux-gnu-gcc accepts -g... (cached) yes
checking for x86_64-pc-linux-gnu-gcc option to accept ISO C89... (cached) none needed
checking whether x86_64-pc-linux-gnu-gcc understands -c and -o together... (cached) yes
checking sys/capability.h usability... yes
checking sys/capability.h presence... yes
checking for sys/capability.h... yes
checking for xsltproc... /usr/bin/xsltproc
checking for SELINUX... no
configure: error: *** SELinux support requested but libraries not found

!!! Please attach the following file when seeking support:
!!! /var/tmp/portage/sys-apps/bubblewrap-0.3.1-r1/work/bubblewrap-0.3.1/config.log
 * ERROR: sys-apps/bubblewrap-0.3.1-r1::gentoo failed (configure phase):
 *   econf failed
 *
 * Call stack:
 *               ebuild.sh, line  125:  Called src_configure
 *             environment, line 1738:  Called econf '--enable-selinux' '--enable-man' '--with-bash-completion-dir=/usr/share/bash-completion/completions' '--with-priv-mode=none'
 *        phase-helpers.sh, line  681:  Called __helpers_die 'econf failed'
 *   isolated-functions.sh, line  112:  Called die
 * The specific snippet of code:
 *              die "$@"
 *
 * If you need support, post the output of `emerge --info '=sys-apps/bubblewrap-0.3.1-r1::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=sys-apps/bubblewrap-0.3.1-r1::gentoo'`.
 * The complete build log is located at '/var/tmp/portage/sys-apps/bubblewrap-0.3.1-r1/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/sys-apps/bubblewrap-0.3.1-r1/temp/environment'.
 * Working directory: '/var/tmp/portage/sys-apps/bubblewrap-0.3.1-r1/work/bubblewrap-0.3.1'
 * S: '/var/tmp/portage/sys-apps/bubblewrap-0.3.1-r1/work/bubblewrap-0.3.1'
Comment 11 Mark Wright gentoo-dev 2020-01-02 03:58:29 UTC
I reproduced the problem with sys-apps/bubblewrap-0.3.1-r1

(In reply to Jonas Jelten from comment #4)
> Created attachment 563722 [details, diff] [details, diff]
> upstream ships ./configure, fix it as well

This patches fixes it for me, thanks.
Comment 12 yesi 2020-01-02 11:50:00 UTC
I created a local repo with these files, and update it.

Could someone update the ebuild, please ?
Comment 13 Larry the Git Cow gentoo-dev 2020-02-29 07:35:10 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=aa32777b624878b41d3c182737426b790c955ab6

commit aa32777b624878b41d3c182737426b790c955ab6
Author:     Jason Zaman <perfinion@gentoo.org>
AuthorDate: 2020-02-29 07:31:35 +0000
Commit:     Jason Zaman <perfinion@gentoo.org>
CommitDate: 2020-02-29 07:34:21 +0000

    sys-apps/bubblewrap: Fix USE=selinux build
    
    The ./configure checks for selinux are incorrect and fails to build
    Closes: https://bugs.gentoo.org/674312
    Package-Manager: Portage-2.3.84, Repoman-2.3.20
    Signed-off-by: Jason Zaman <perfinion@gentoo.org>

 sys-apps/bubblewrap/bubblewrap-0.3.1-r2.ebuild     |  48 +++++
 .../files/bubblewrap-0.3.1-selinux-configure.patch | 224 +++++++++++++++++++++
 2 files changed, 272 insertions(+)