Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 554580 - sys-apps/systemd-222: error: undefined reference to 'cap_free'
Summary: sys-apps/systemd-222: error: undefined reference to 'cap_free'
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo systemd Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-07-12 04:12 UTC by LE GARREC Vincent
Modified: 2015-08-18 16:30 UTC (History)
1 user (show)

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


Attachments
systemd-222-build.log.gz (systemd-222-build.log.gz,26.38 KB, application/x-tar-gz)
2015-07-12 04:12 UTC, LE GARREC Vincent
Details
systemd-222-cap.patch (systemd-222-cap.patch,326 bytes, patch)
2015-07-12 04:13 UTC, LE GARREC Vincent
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description LE GARREC Vincent 2015-07-12 04:12:19 UTC
Created attachment 406580 [details]
systemd-222-build.log.gz

=================================================================
                         System Settings
=================================================================
System uname: Linux-3.18.14-gentoo-x86_64-Intel-R-_Core-TM-_i7-3770_CPU_@_3.40GHz-with-gentoo-2.2
KiB Mem:     8130792 total,   3604816 free
KiB Swap:    9767516 total,   9767516 free
Timestamp of repository gentoo: Sun, 12 Jul 2015 02:30:01 +0000
sh bash 4.3_p39
ld GNU ld (Gentoo 2.25 p1.2) 2.25
app-shells/bash:          4.3_p39::gentoo
dev-java/java-config:     2.2.0::gentoo
dev-lang/perl:            5.20.2-r1::gentoo
dev-lang/python:          2.7.10::gentoo, 3.3.5-r1::gentoo, 3.4.3::gentoo
dev-util/cmake:           3.2.3::gentoo
dev-util/pkgconfig:       0.28-r3::gentoo
sys-apps/baselayout:      2.2::gentoo
sys-apps/openrc:          0.17::gentoo
sys-apps/sandbox:         2.6-r1::gentoo
sys-devel/autoconf:       2.13::gentoo, 2.69-r1::gentoo
sys-devel/automake:       1.11.6-r1::gentoo, 1.13.4::gentoo, 1.14.1::gentoo, 1.15::gentoo
sys-devel/binutils:       2.25-r1::gentoo
sys-devel/gcc:            4.6.4::gentoo, 4.7.4::gentoo, 4.8.5::gentoo, 4.9.3::gentoo
sys-devel/gcc-config:     1.8::gentoo
sys-devel/libtool:        2.4.6-r1::gentoo
sys-devel/make:           4.1-r1::gentoo
sys-kernel/linux-headers: 3.18::gentoo (virtual/os-headers)
sys-libs/glibc:           2.20-r2::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: rsync
    sync-uri: rsync://rsync.gentoo.org/gentoo-portage
    priority: -1000

crossdev
    location: /home/legarrec/info/overlay
    masters: gentoo
    priority: 0

science
    location: /var/lib/layman/science
    masters: gentoo
    priority: 50

steam-overlay
    location: /var/lib/layman/steam-overlay
    masters: gentoo
    priority: 50

ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O0 -ggdb2 -g2 -pipe -fno-omit-frame-pointer"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /usr/share/config /usr/share/gnupg/qualified.txt /var/lib/hsqldb"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.6/ext-active/ /etc/php/cgi-php5.6/ext-active/ /etc/php/cli-php5.6/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-march=native -O0 -ggdb2 -g2 -pipe -fno-omit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="-j9 --load-average=9"
FCFLAGS="-march=native -O0 -ggdb2 -g2 -pipe -fno-omit-frame-pointer"
FEATURES="assume-digests binpkg-logs compressdebug config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news noclean parallel-fetch preserve-libs protect-owned sandbox sfperms splitdebug strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync"
FFLAGS="-march=native -O0 -ggdb2 -g2 -pipe -fno-omit-frame-pointer"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="fr_FR.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,-O0"
MAKEOPTS="-j9"
PKGDIR="/usr/portage/packages"
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"
PORTAGE_TMPDIR="/home/legarrec/info"
USE="X a52 aac accessibility acpi aes alsa amd64 avx berkdb branding bzip2 cairo cdda cdr cjk cli colord cracklib crypt cuda cups cxx dbus declarative dhcpcd djvu doc dri dts dvd dvdr eds emboss encode evo exif fam fftw firefox flac fontconfig fortran gdbm gif gl glamor gnome gnome-keyring gnome-online-accounts gnuplot gold gpm gstreamer gtk gtk3 gudev iconv introspection ipv6 jabber jpeg jpeg2k kde kdrive kipi lapack lcms ldap libav libnotify libsecret lm_sensors mad mmx mmxext mng modules mp3 mp4 mpeg mpi multilib natspec nautilus ncurses nls nptl ogg opencl opengl openmp pam pango pcre pdf perl phonon plasma png policykit popcnt postscript ppds pulseaudio python qt3support qt4 readline sdl semantic-desktop session spell sqlite sse sse2 sse3 sse4 sse4_1 sse4_2 ssl ssse3 startup-notification svg systemd tcpd threads tiff tracker truetype udev udisks unicode upower usb vorbis webkit wxwidgets x264 x265 xcb xcomposite xinerama xml xscreensaver xv xvid zlib" ABI_X86="64 32" 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" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes avx mmx mmxext popcnt sse sse2 sse3 sse4 sse4_1 sse4_2 ssse3" CURL_SSL="openssl" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="fr en ja" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-6" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_3" RUBY_TARGETS="ruby19 ruby20 ruby22" USERLAND="GNU" VIDEO_CARDS="nvidia" 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:  CPPFLAGS, CTARGET, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON

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

sys-apps/systemd-222::gentoo was built with the following:
USE="kdbus kmod lz4 pam policykit seccomp ssl -acl -apparmor -audit -cryptsetup -curl -elfutils -gcrypt -gnuefi -http -idn -importd -lzma -nat -qrcode (-selinux) -sysv-utils -terminal -test -vanilla -xkb" ABI_X86="32 64 -x32"
CXXFLAGS="-O2 -pipe"
Comment 1 LE GARREC Vincent 2015-07-12 04:13:02 UTC
Created attachment 406582 [details, diff]
systemd-222-cap.patch

Proposal patch
Comment 2 Mike Gilbert gentoo-dev 2015-07-12 16:00:09 UTC
Interesting; seems to be something in your CFLAGS or LDFLAGS that is catching this.

Can you please report this upstream? Or send them a pull request.

https://github.com/systemd/systemd/issues
Comment 3 Mike Gilbert gentoo-dev 2015-07-12 16:30:04 UTC
(In reply to Mike Gilbert from comment #2)
> Interesting; seems to be something in your CFLAGS or LDFLAGS that is
> catching this.

I can reproduce with -O0 in CFLAGS.
Comment 4 LE GARREC Vincent 2015-07-12 17:37:18 UTC
Working on reporting the problem but having a minimal case is really hard. -O0 is not the only parameter.
Comment 5 LE GARREC Vincent 2015-07-12 18:45:08 UTC
I finally found the problem. This is due to "ac_cv_search_cap_init=" in the ebuild. Removing it solves the problem. So it does not look like the problem comes from systemd. Any idea why theses lines was added with systemd-206-r2 during the migration to multilib support ? (https://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/sys-apps/systemd/systemd-206-r2.ebuild?hideattic=0&revision=1.1&view=markup)
Thanks,
Comment 6 Mike Gilbert gentoo-dev 2015-07-12 19:39:39 UTC
(In reply to LE GARREC Vincent from comment #5)

Nice catch. I assume we wanted to avoid depending on libcap when building for the non-native abis. However, it seems like libcap has since become a hard dependency.

I will revbump.
Comment 7 Mike Gilbert gentoo-dev 2015-07-12 20:17:31 UTC
+*systemd-222-r1 (12 Jul 2015)
+
+  12 Jul 2015; Mike Gilbert <floppym@gentoo.org> +systemd-222-r1.ebuild,
+  systemd-9999.ebuild:
+  Quit playing games to avoid depending on libcap and libmount for non-native
+  abis. Bug 554580 by LE GARREC Vincent.