Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 674866 - sys-apps/groff-1.22.4 - ERROR: cross-compile sed failed
Summary: sys-apps/groff-1.22.4 - ERROR: cross-compile sed failed
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Cross compilation support
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-01-08 11:26 UTC by Marcus Comstedt
Modified: 2019-01-25 21:43 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Marcus Comstedt 2019-01-08 11:26:22 UTC
groff-1.22.4.ebuild contains the following code in src_prepare():

        # Make sure we can cross-compile this puppy
        if tc-is-cross-compiler ; then
                sed -i \
                        -e '/^GROFFBIN=/s:=.*:=${EPREFIX}/usr/bin/groff:' \
                        -e '/^TROFFBIN=/s:=.*:=${EPREFIX}/usr/bin/troff:' \
                        -e '/^GROFF_BIN_PATH=/s:=.*:=:' \
                        -e '/^GROFF_BIN_DIR=/s:=.*:=:' \
                        contrib/*/Makefile.sub \
                        doc/Makefile.in \
                        doc/Makefile.sub || die "cross-compile sed failed"
        fi

However, unlike groff 1.22.3, groff 1.22.4 does not contain these files.  Because of this cross compilation dies with the message

 * ERROR: sys-apps/groff-1.22.4::gentoo failed (prepare phase):
 *   cross-compile sed failed
 * 
 * Call stack:
 *     ebuild.sh, line 124:  Called src_prepare
 *   environment, line 1018:  Called die
 * The specific snippet of code:
 *           sed -i -e '/^GROFFBIN=/s:=.*:=${EPREFIX}/usr/bin/groff:' -e '/^TROFFBIN=/s:=.*:=${EPREFIX}/usr/bin/troff:' -e '/^GROFF_BIN_PATH=/s:=.*:=:' -e '/^GROFF_BIN_DIR=/s:=.*:=:' contrib/*/Makefile.sub doc/Makefile.in doc/Makefile.sub || die "cross-compile sed failed";

emerge --info output follows:

# arm-linux-gnueabihf-emerge --info
Portage 2.3.51 (python 2.7.15-final-0, default/linux/arm/17.0, gcc-8.2.0, glibc-9999, 4.4.164 aarch64)
=================================================================
System uname: Linux-4.4.164-aarch64-with-gentoo-2.6
KiB Mem:     8038432 total,    441360 free
KiB Swap:    8388604 total,   7899296 free
Timestamp of repository gentoo: Thu, 03 Jan 2019 14:30:01 +0000
Head commit of repository gentoo: 48c30bc8f547c66fbee4899eed053658502036b8
sh bash 4.4_p12
ld GNU ld (Gentoo 2.30 p5) 2.30.0
app-shells/bash:          4.4_p23::gentoo
dev-lang/perl:            5.26.2::gentoo
dev-lang/python:          2.7.15::gentoo, 3.6.6::gentoo
dev-util/pkgconfig:       0.29.2::gentoo
sys-apps/baselayout:      2.6-r1::gentoo
sys-apps/openrc:          0.40.3::gentoo
sys-devel/binutils:       2.31.1-r3::gentoo
sys-devel/gcc:            7.3.0-r3::gentoo, 8.2.0-r6::gentoo
sys-devel/gcc-config:     2.0::gentoo
sys-devel/make:           4.2.1-r4::gentoo
sys-kernel/linux-headers: 4.20::gentoo (virtual/os-headers)
sys-libs/glibc:           9999::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: rsync
    sync-uri: rsync://rsync.gentoo.org/gentoo-portage
    priority: -1000
    sync-rsync-verify-jobs: 1
    sync-rsync-verify-metamanifest: yes
    sync-rsync-extra-opts: 
    sync-rsync-verify-max-age: 24

ACCEPT_KEYWORDS="arm ~arm"
ACCEPT_LICENSE="* -@EULA"
CBUILD="aarch64-unknown-linux-gnu"
CFLAGS="-O2 -pipe -fomit-frame-pointer"
CHOST="arm-linux-gnueabihf"
CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /usr/share/config /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 /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-O2 -pipe -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
ENV_UNSET="DBUS_SESSION_BUS_ADDRESS DISPLAY GOBIN PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR"
FCFLAGS="-O2"
FEATURES="assume-digests binpkg-logs buildpkg config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync multilib-strict news nodoc noinfo noman parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="sv_SE.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
PKGDIR="/usr/arm-linux-gnueabihf/packages/"
PORTAGE_CONFIGROOT="/usr/arm-linux-gnueabihf/"
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="/usr/arm-linux-gnueabihf/tmp/"
USE="acl arm berkdb bzip2 cli crypt cxx dri fortran gdbm iconv ipv6 ncurses nls nptl openmp pcre readline seccomp ssl tcpd unicode xattr 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="karbon plan sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" 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" INPUT_DEVICES="libinput keyboard mouse" 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 postgres10" PYTHON_SINGLE_TARGET="python3_6" PYTHON_TARGETS="python2_7 python3_6" RUBY_TARGETS="ruby23 ruby24" USERLAND="GNU" VIDEO_CARDS="exynos fbdev omap dummy v4l" 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, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, LINGUAS, MAKEOPTS, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Larry the Git Cow gentoo-dev 2019-01-25 21:43:02 UTC
The bug has been closed via the following commit(s):

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

commit 26d2abf134411ea9f80c5377c5609808663370c0
Author:     James Le Cuirot <chewi@gentoo.org>
AuthorDate: 2019-01-25 21:38:47 +0000
Commit:     James Le Cuirot <chewi@gentoo.org>
CommitDate: 2019-01-25 21:39:30 +0000

    sys-apps/groff: Fix cross-compiling following build file changes
    
    Override the variables when calling make instead of changing the
    Makefiles. The comment in the Makefiles suggests that this is how
    upstream wants you to do it.
    
    Using ${EPREFIX} as before is not correct as this refer to the target
    prefix, not the build prefix. EAPI 7 provides ${BROOT} for this but
    for tools in the path, it is better to use type -P instead.
    
    groff is not in @system so there is no guarantee that it will actually
    be present on the build system. EAPI 7 did not include EAPI
    5-hdepend's targetroot USE flag feature, which prevents us from
    putting groff in BDEPEND. The preferred approach is to do a native
    build in tandem with a cross build but this makes the ebuild more
    complex so I will attempt this in a separate fix.
    
    Closes: https://bugs.gentoo.org/674866
    Package-Manager: Portage-2.3.58, Repoman-2.3.12
    Signed-off-by: James Le Cuirot <chewi@gentoo.org>

 sys-apps/groff/groff-1.22.4.ebuild | 25 ++++++++++++-------------
 1 file changed, 12 insertions(+), 13 deletions(-)