Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 602126 - dev-libs/elfutils: fails to compile on musl: TEMP_FAILURE_RETRY undefined
Summary: dev-libs/elfutils: fails to compile on musl: TEMP_FAILURE_RETRY undefined
Status: CONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo musl team
URL: https://sourceware.org/PR21002
Whiteboard:
Keywords:
Depends on:
Blocks: musl-porting
  Show dependency tree
 
Reported: 2016-12-09 09:37 UTC by Michael Jones
Modified: 2020-03-21 10:37 UTC (History)
1 user (show)

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


Attachments
build.log.gz (build.log.gz,5.54 KB, application/gzip)
2016-12-09 09:37 UTC, Michael Jones
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Jones 2016-12-09 09:37:12 UTC
Created attachment 455606 [details]
build.log.gz

Note: This is with argp-standalone installed.





armv7a-hardfp-musl-hardened ~ # emerge --info elfutils
Portage 2.3.1 (python 2.7.12-final-0, hardened/linux/musl/arm/armv7a, gcc-4.9.4, musl-1.1.15-r2, 4.7.10-hardened armv7l)
=================================================================
                         System Settings
=================================================================
System uname: Linux-4.7.10-hardened-armv7l-with-gentoo-2.3
KiB Mem:    65970600 total,  22450740 free
KiB Swap:   10485756 total,  10470988 free
Timestamp of repository gentoo: Fri, 09 Dec 2016 08:22:13 +0000
sh bash 4.3_p48
ld GNU ld (Gentoo 2.25.1 p1.1) 2.25.1
app-shells/bash:          4.3_p48::gentoo
dev-lang/perl:            5.22.2::gentoo
dev-lang/python:          2.7.12::gentoo, 3.4.5::gentoo
dev-util/cmake:           3.5.2-r1::gentoo
dev-util/pkgconfig:       0.28-r2::gentoo
sys-apps/baselayout:      2.3::gentoo
sys-apps/openrc:          0.21.7::gentoo
sys-apps/sandbox:         2.10-r1::musl
sys-devel/autoconf:       2.69::gentoo
sys-devel/automake:       1.11.6-r1::gentoo, 1.14.1::gentoo, 1.15::gentoo
sys-devel/binutils:       2.25.1-r1::gentoo
sys-devel/gcc:            4.9.4-r99::musl
sys-devel/gcc-config:     1.7.3::gentoo
sys-devel/libtool:        2.4.6::gentoo
sys-devel/make:           4.1-r1::gentoo
sys-kernel/linux-headers: 4.3::musl (virtual/os-headers)
sys-libs/musl:            1.1.15-r2::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/gentoo
    priority: -1000

musl
    location: /usr/portage-overlays/musl
    sync-type: git
    sync-uri: git://anongit.gentoo.org/proj/musl.git
    masters: gentoo

Installed sets: @archive, @arm-base-system, @portage, @vcs
ACCEPT_KEYWORDS="arm"
ACCEPT_LICENSE="* -@EULA"
CBUILD="armv7a-hardfloat-linux-musleabi"
CFLAGS="-O2 -pipe -march=armv7-a -mfpu=vfpv3-d16 -mfloat-abi=hard"
CHOST="armv7a-hardfloat-linux-musleabi"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-O2 -pipe -march=armv7-a -mfpu=vfpv3-d16 -mfloat-abi=hard"
DISTDIR="/usr/portage-distfiles"
EMERGE_DEFAULT_OPTS=" --jobs --keep-going --newuse --deep --backtrack=3000 --complete-graph --with-bdeps=y"
FCFLAGS="-O2 -pipe -march=armv7-a -mfpu=vfpv3-d16 -mfloat-abi=hard"
FEATURES="assume-digests binpkg-logs buildpkg clean-logs compress-build-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch parallel-install preserve-libs protect-owned sandbox sfperms split-elog split-log strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe -march=armv7-a -mfpu=vfpv3-d16 -mfloat-abi=hard"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
INSTALL_MASK="charset.alias"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j30"
PKGDIR="/usr/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="a52 aac acpi alsa apng arm avahi bindist branding cairo cdda cdr cli cracklib crypt cxx d-pau dbus dconf dri dts dvd dvdr egl emboss encode exif fam ffmpeg flac fortran gcj gd gif gnome-keyring gpm gstreamer gtk gudev hardened iconv icu ipv6 jpeg lcms libnotify libsecret lm_sensors mad minizip mng modules mp3 mp4 mpeg ncurses networkmanager nls nptl ogg opengl openmp pam pango pax_kernel pcre pdf pic png policykit ppds pulseaudio python qt5 readline samba sdl seccomp session sound spell sqlite ssl startup-notification svg tcpd theora threads tiff truetype udev udisks unicode upower usb vaapi vorbis wayland widevine wifi xattr xcb xinerama xml xv xvid zeroconf zlib" 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" ELIBC="musl" 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" GRUB_PLATFORMS="coreboot efi-64 emu qemu pc" INPUT_DEVICES="evdev mouse keyboard libinput" KERNEL="linux" L10N="en en-US" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="en en_US" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-6" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_4" QEMU_SOFTMMU_TARGETS="arm aarch64 x86_64" QEMU_USER_TARGETS="arm aarch64 x86_64" RUBY_TARGETS="ruby21 ruby21" USERLAND="GNU" VIDEO_CARDS="vesa modesetting fbdev" 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, LANG, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON







In file included from /var/tmp/portage/dev-libs/elfutils-0.166/work/elfutils-0.166/lib/crc32_file.c:33:0:
/var/tmp/portage/dev-libs/elfutils-0.166/work/elfutils-0.166/lib/system.h: In function ‘pwrite_retry’:
/var/tmp/portage/dev-libs/elfutils-0.166/work/elfutils-0.166/lib/system.h:79:7: warning: implicit declaration of function ‘TEMP_FAILURE_RETRY’ [-Wimplicit-function-declaration]
       ssize_t ret = TEMP_FAILURE_RETRY (pwrite (fd, buf + recvd, len - recvd,
       ^
In file included from /var/tmp/portage/dev-libs/elfutils-0.166/work/elfutils-0.166/lib/xstrndup.c:34:0:
/var/tmp/portage/dev-libs/elfutils-0.166/work/elfutils-0.166/lib/system.h: In function ‘pwrite_retry’:
/var/tmp/portage/dev-libs/elfutils-0.166/work/elfutils-0.166/lib/system.h:79:7: warning: implicit declaration of function ‘TEMP_FAILURE_RETRY’ [-Wimplicit-function-declaration]
       ssize_t ret = TEMP_FAILURE_RETRY (pwrite (fd, buf + recvd, len - recvd,
       ^
/var/tmp/portage/dev-libs/elfutils-0.166/work/elfutils-0.166/lib/xmalloc.c:33:19: fatal error: error.h: No such file or directory
 #include <error.h>
                   ^
compilation terminated.
In file included from /var/tmp/portage/dev-libs/elfutils-0.166/work/elfutils-0.166/lib/sha1.c:40:0:
/var/tmp/portage/dev-libs/elfutils-0.166/work/elfutils-0.166/lib/system.h: In function ‘pwrite_retry’:
/var/tmp/portage/dev-libs/elfutils-0.166/work/elfutils-0.166/lib/system.h:79:7: warning: implicit declaration of function ‘TEMP_FAILURE_RETRY’ [-Wimplicit-function-declaration]
       ssize_t ret = TEMP_FAILURE_RETRY (pwrite (fd, buf + recvd, len - recvd,
       ^
Makefile:411: recipe for target 'xmalloc.o' failed
make[2]: *** [xmalloc.o] Error 1
make[2]: *** Waiting for unfinished jobs....
In file included from /var/tmp/portage/dev-libs/elfutils-0.166/work/elfutils-0.166/lib/xstrdup.c:34:0:
/var/tmp/portage/dev-libs/elfutils-0.166/work/elfutils-0.166/lib/system.h: In function ‘pwrite_retry’:
/var/tmp/portage/dev-libs/elfutils-0.166/work/elfutils-0.166/lib/system.h:79:7: warning: implicit declaration of function ‘TEMP_FAILURE_RETRY’ [-Wimplicit-function-declaration]
       ssize_t ret = TEMP_FAILURE_RETRY (pwrite (fd, buf + recvd, len - recvd,
       ^
/var/tmp/portage/dev-libs/elfutils-0.166/work/elfutils-0.166/lib/color.c:35:19: fatal error: error.h: No such file or directory
 #include <error.h>
                   ^
compilation terminated.
Makefile:411: recipe for target 'color.o' failed
make[2]: *** [color.o] Error 1
In file included from /var/tmp/portage/dev-libs/elfutils-0.166/work/elfutils-0.166/lib/md5.c:40:0:
/var/tmp/portage/dev-libs/elfutils-0.166/work/elfutils-0.166/lib/system.h: In function ‘pwrite_retry’:
/var/tmp/portage/dev-libs/elfutils-0.166/work/elfutils-0.166/lib/system.h:79:7: warning: implicit declaration of function ‘TEMP_FAILURE_RETRY’ [-Wimplicit-function-declaration]
       ssize_t ret = TEMP_FAILURE_RETRY (pwrite (fd, buf + recvd, len - recvd,
       ^
In file included from /var/tmp/portage/dev-libs/elfutils-0.166/work/elfutils-0.166/lib/crc32.c:29:0:
/var/tmp/portage/dev-libs/elfutils-0.166/work/elfutils-0.166/lib/system.h: In function ‘pwrite_retry’:
/var/tmp/portage/dev-libs/elfutils-0.166/work/elfutils-0.166/lib/system.h:79:7: warning: implicit declaration of function ‘TEMP_FAILURE_RETRY’ [-Wimplicit-function-declaration]
       ssize_t ret = TEMP_FAILURE_RETRY (pwrite (fd, buf + recvd, len - recvd,
       ^
Makefile:482: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
Makefile:398: recipe for target 'all' failed
make: *** [all] Error 2
 * ERROR: dev-libs/elfutils-0.166::gentoo failed (compile phase):
 *   emake failed
 *
 * If you need support, post the output of `emerge --info '=dev-libs/elfutils-0.166::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=dev-libs/elfutils-0.166::gentoo'`.
 * The complete build log is located at '/var/tmp/portage/dev-libs/elfutils-0.166/temp/build.log.gz'.
 * The ebuild environment file is located at '/var/tmp/portage/dev-libs/elfutils-0.166/temp/environment'.
 * Working directory: '/var/tmp/portage/dev-libs/elfutils-0.166/work/elfutils-0.166-.arm'
 * S: '/var/tmp/portage/dev-libs/elfutils-0.166/work/elfutils-0.166'
Comment 1 SpanKY gentoo-dev 2016-12-15 15:08:59 UTC
musl guys prob need to debate w/upstream musl and/or elfutils wrt this macro
Comment 2 Felix Janda 2016-12-16 00:23:17 UTC
TEMP_FAILURE_RETRY is the tip of the iceberg. elfutils also uses the
following by musl unsupported interfaces:

- <error.h>
- argp
- obstacks
- fts

There is a patched ebuild in:

https://github.com/lluixhi/musl-extras/tree/master/dev-libs/elfutils
Comment 3 Matthew Thode ( prometheanfire ) archtester Gentoo Infrastructure gentoo-dev Security 2019-07-22 17:25:06 UTC
it seems like 0.176 (in the overlay) works, should that be moved over to the tree (updated with the patch r1 adds to the tree), stabilized in the overlay or what (and if stabilized in the overlay, add it to unmask for the overlay)?
Comment 4 Michael 'veremitz' Everitt 2019-07-22 17:48:33 UTC
#(In reply to Matthew Thode ( prometheanfire ) from comment #3)
> it seems like 0.176 (in the overlay) works, should that be moved over to the
> tree (updated with the patch r1 adds to the tree), stabilized in the overlay
> or what (and if stabilized in the overlay, add it to unmask for the overlay)?

https://gitweb.gentoo.org/proj/musl.git/tree/dev-libs/elfutils/elfutils-0.176.ebuild for reference.

Probably should be stabilised and unmasked, yes.
Comment 5 Sergei Trofimovich (RETIRED) gentoo-dev 2019-07-22 19:08:13 UTC
I suggest working with upstream to push patches. It looks like there was some unfinished movement there:
    - https://sourceware.org/PR21002
    - https://sourceware.org/PR21008
    - https://sourceware.org/PR21010
Comment 6 Larry the Git Cow gentoo-dev 2020-03-21 10:37:27 UTC
The bug has been referenced in the following commit(s):

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

commit 92db444e22b25bae835d273dc4e93d0d3534a0be
Author:     Sergei Trofimovich <slyfox@gentoo.org>
AuthorDate: 2020-03-21 10:32:04 +0000
Commit:     Sergei Trofimovich <slyfox@gentoo.org>
CommitDate: 2020-03-21 10:37:18 +0000

    profiles/features/musl/package.mask: mask dev-libs/elfutils
    
    I'm specifically masking elfutils because it's a widespread
    dependency that pops up all the time when I try to build ::gentoo
    packages against musl profiles.
    
    In ::gentoo dev-libs/elfutils needs an upstream port to
    musl: #602126, #701478
    - https://sourceware.org/PR21002
    - https://sourceware.org/PR21008
    - https://sourceware.org/PR21010
    
    Overlays that carry out-of-tree patches can remove the mask
    via `profiles/package.mask`:
    
    ```
        # unmask in ::${overlay}
        -dev-libs/elfutils
    ```
    
    Bug: https://bugs.gentoo.org/602126
    Closes: https://bugs.gentoo.org/701478
    Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>

 profiles/features/musl/package.mask | 8 ++++++++
 1 file changed, 8 insertions(+)