Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 632490 - sys-libs/libselinux-2.7[pcre2]: libselinux.pc still refers to libpcre.pc instead of libpcre2-posix.pc
Summary: sys-libs/libselinux-2.7[pcre2]: libselinux.pc still refers to libpcre.pc inst...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: SE Linux Bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-09-30 09:37 UTC by Dennis Schridde
Modified: 2018-10-12 21:16 UTC (History)
0 users

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


Attachments
build.log (xz-compressed) (build.log.xz,26.45 KB, application/x-xz)
2017-09-30 09:37 UTC, Dennis Schridde
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Dennis Schridde 2017-09-30 09:37:29 UTC
Created attachment 497194 [details]
build.log (xz-compressed)

/usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/../../../../lib64/libselinux.a(regex.o): In function `regex_version':
(.text+0xcb): undefined reference to `pcre2_config_8'
/usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/../../../../lib64/libselinux.a(regex.o): In function `regex_version':
(.text+0xee): undefined reference to `pcre2_config_8'
/usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/../../../../lib64/libselinux.a(regex.o): In function `regex_writef':
(.text+0x170): undefined reference to `pcre2_serialize_encode_8'
/usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/../../../../lib64/libselinux.a(regex.o): In function `regex_writef':
(.text+0x1fa): undefined reference to `pcre2_serialize_free_8'
/usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/../../../../lib64/libselinux.a(regex.o): In function `regex_data_free':
(.text+0x255): undefined reference to `pcre2_code_free_8'
/usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/../../../../lib64/libselinux.a(regex.o): In function `regex_data_free':
(.text+0x263): undefined reference to `pcre2_match_data_free_8'
/usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/../../../../lib64/libselinux.a(regex.o): In function `regex_match':
(.text+0x32b): undefined reference to `pcre2_match_8'
/usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/../../../../lib64/libselinux.a(regex.o): In function `regex_cmp':
(.text+0x3c9): undefined reference to `pcre2_pattern_info_8'
/usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/../../../../lib64/libselinux.a(regex.o): In function `regex_cmp':
(.text+0x3e0): undefined reference to `pcre2_pattern_info_8'
/usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/../../../../lib64/libselinux.a(regex.o): In function `regex_prepare_data':
(.text+0x54c): undefined reference to `pcre2_compile_8'
/usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/../../../../lib64/libselinux.a(regex.o): In function `regex_prepare_data':
(.text+0x563): undefined reference to `pcre2_match_data_create_from_pattern_8'
/usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/../../../../lib64/libselinux.a(regex.o): In function `regex_load_mmap':
(.text+0x674): undefined reference to `pcre2_serialize_get_number_of_codes_8'
/usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/../../../../lib64/libselinux.a(regex.o): In function `regex_load_mmap':
(.text+0x69a): undefined reference to `pcre2_serialize_decode_8'
/usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/../../../../lib64/libselinux.a(regex.o): In function `regex_load_mmap':
(.text+0x6ad): undefined reference to `pcre2_match_data_create_from_pattern_8'
/usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/../../../../lib64/libselinux.a(regex.o): In function `regex_format_error':
(.text+0x765): undefined reference to `pcre2_get_error_message_8'
collect2: error: ld returned 1 exit status

Portage 2.3.8 (python 3.4.5-final-0, hardened/linux/amd64/selinux, gcc-5.4.0, glibc-2.23-r4, 4.12.5-gentoo x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-4.12.5-gentoo-x86_64-AMD_Athlon-tm-_64_Processor_3700+-with-gentoo-2.3
KiB Mem:     2051752 total,    218144 free
KiB Swap:    4194300 total,   3696236 free
Timestamp of repository gentoo: Wed, 27 Sep 2017 11:45:01 +0000
Head commit of repository gentoo: 92c9bd32f5707a72a1bb23dbab5c37209027ca53
sh bash 4.3_p48-r1
ld GNU ld (Gentoo 2.26.1 p1.0) 2.26.1
distcc 3.2rc1 x86_64-pc-linux-gnu [disabled]
app-shells/bash:          4.3_p48-r1::gentoo
dev-lang/perl:            5.24.1-r2::gentoo
dev-lang/python:          2.7.12::gentoo, 3.4.5::gentoo
dev-util/cmake:           3.7.2::gentoo
sys-apps/baselayout:      2.3::gentoo
sys-apps/sandbox:         2.10-r3::gentoo
sys-devel/autoconf:       2.69::gentoo
sys-devel/automake:       1.13.4::gentoo, 1.15-r2::gentoo
sys-devel/binutils:       2.26.1::gentoo, 2.28-r2::gentoo, 2.28.1::gentoo
sys-devel/gcc:            5.4.0-r3::gentoo
sys-devel/gcc-config:     1.8-r1::gentoo
sys-devel/libtool:        2.4.6-r3::gentoo
sys-devel/make:           4.2.1::gentoo
sys-kernel/linux-headers: 4.4::gentoo (virtual/os-headers)
sys-libs/glibc:           2.23-r4::gentoo
Repositories:

gentoo
    location: /var/cache/portage/gentoo
    sync-type: rsync
    sync-uri: rsync://rsync.europe.gentoo.org/gentoo-portage
    priority: -1000

local
    location: /var/cache/portage/local
    masters: gentoo

hhvm
    location: /var/lib/layman/hhvm
    sync-type: laymansync
    sync-uri: git://github.com/reanimus/hhvm-overlay.git
    masters: gentoo
    priority: 50

ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-pipe -mtune=generic -O2"
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/gconf /etc/gentoo-release /etc/php/apache2-php5.6/ext-active/ /etc/php/apache2-php7.1/ext-active/ /etc/php/cgi-php5.6/ext-active/ /etc/php/cgi-php7.1/ext-active/ /etc/php/cli-php5.6/ext-active/ /etc/php/cli-php7.1/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-pipe -mtune=generic -O2"
DISTDIR="/var/cache/portage/distfiles"
EMERGE_DEFAULT_OPTS="--keep-going --nospinner --usepkg --buildpkg --binpkg-respect-use --binpkg-changed-deps=y --rebuilt-binaries=y --rebuild-if-unbuilt=y --verbose-conflicts"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs buildpkg compressdebug config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync multilib-strict news parallel-fetch parallel-install preserve-libs protect-owned sandbox selinux sesandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://ftp.spline.inf.fu-berlin.de/mirrors/gentoo/ http://ftp-stud.fht-esslingen.de/pub/Mirrors/gentoo/ http://distfiles.gentoo.org"
LANG="en_GB.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,--hash-style=gnu"
MAKEOPTS="-j2"
PKGDIR="/var/cache/portage/packages"
PORTAGE_COMPRESS="xz"
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 audit berkdb bzip2 caps cli cracklib crypt cxx dri gdbm gpg hardened iconv idn ipv6 jemalloc jit justify libidn2 luajit lz4 lzma lzo modules multilib ncurses nls nptl open_perms openmp pam pax_kernel pcre pcre2 pie readline sctp seccomp selinux session ssl ssp systemd tcpd udev unconfined unicode urandom utempter vhosts xattr xtpax xz zlib" ABI_X86="64" 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="kexi words flow plan sheets stage tables krita karbon braindump author" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="3dnow 3dnowext mmx mmxext sse sse2 sse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-6 php7-1" POSTGRES_TARGETS="postgres9_5" PYTHON_SINGLE_TARGET="python3_4" PYTHON_TARGETS="python2_7 python3_4 pypy pypy3" RUBY_TARGETS="ruby22" USERLAND="GNU" 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_BUNZIP2_COMMAND, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

=================================================================
                        Package Settings
=================================================================

sys-apps/busybox-1.25.1::gentoo was built with the following:
USE="ipv6 (selinux) static systemd -debug -livecd -make-symlinks -math -mdev -pam -savedconfig -sep-usr -syslog" ABI_X86="(64)"
CFLAGS="-pipe -mtune=generic -O2 -fno-strict-aliasing"
CXXFLAGS="-pipe -mtune=generic -O2 -fno-strict-aliasing"


dev-libs/libpcre2-10.30::gentoo was built with the following:
USE="bzip2 jit readline recursion-limit static-libs unicode zlib -libedit -pcre16 -pcre32" ABI_X86="(64) -32 (-x32)"


sys-libs/libselinux-2.7::gentoo was built with the following:
USE="pcre2 (python) (static-libs) -ruby" ABI_X86="(64) -32 (-x32)" PYTHON_TARGETS="python2_7 python3_4 (-python3_5) (-python3_6)" RUBY_TARGETS="ruby22 -ruby21 (-ruby23)"
Comment 1 Dennis Schridde 2017-12-26 20:57:36 UTC
Fixed in: https://github.com/devurandom/gentoo-overlay/commit/010971406488234701070d91523ff4f12bb72e85

I split "busybox_config_set()" out from busybox_config_option(), in order to be able to easily set string values, and then used that to set CONFIG_EXTRA_LDLIBS, if use selinux && use static && has_version 'sys-libs/libselinux[pcre2]'.  I am not sure whether this would also require me to set DEPEND="dev-libs/libpcre2" -- I left that out for now.
Comment 2 SpanKY gentoo-dev 2018-01-24 04:47:49 UTC
this is a bug in libselinux, not busybox.  busybox has no knowledge of pcre or pcre2, it just queries libselinux deps via `pkg-config --libs --static libselinux`.

looks like the libselinux.pc still says "libpcre" Requires.private instead of libpcre2-posix (or something).
Comment 3 Dennis Schridde 2018-01-29 10:31:38 UTC
Indeed I see:
# pkg-config --libs --static libselinux
-lselinux -lsepol -lpcre -pthread

I changed libselinux.pc:
-Requires.private: libsepol libpcre
+Requires.private: libsepol libpcre2-posix

Now I get:
# pkg-config --libs --static libselinux
-lselinux -lsepol -lpcre2-posix -lpcre2-8 -pthread

And sys-apps/busybox-1.28.0 builds fine.
Comment 4 Jason Zaman gentoo-dev 2018-04-07 14:52:48 UTC
This is already fixed upstream, it'll be in 2.8 soon

commit 80d6927b69b5d1411fde52cf693e05746aa6ad49
Author: Petr Lautrbach <plautrba@redhat.com>
Date:   Wed Oct 11 16:53:45 2017

    libselinux: Add support for pcre2 to pkgconfig definition
    
    When libselinux is built using USE_PCRE2 libselinux.pc needs to require
    libpcre2-8 instead of libpcre.
    
    Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1487521
    
    Signed-off-by: Petr Lautrbach <plautrba@redhat.com>
Comment 5 Mira Ressel 2018-10-12 21:16:34 UTC
Fixed in 2.8.