Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 602192 - dev-util/strace-4.13 build failure with distcc due to `gcc` usage for build tools
Summary: dev-util/strace-4.13 build failure with distcc due to `gcc` usage for build t...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-12-09 20:23 UTC by Fab
Modified: 2016-12-24 15:57 UTC (History)
0 users

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


Attachments
build log (strace-build.log,34.87 KB, text/plain)
2016-12-09 20:24 UTC, Fab
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Fab 2016-12-09 20:23:21 UTC
Hi,

My distcc server and client are configured to communicate through a reversed SSH tunnel. See [1].
In this setup, dev-util/strace-4.13 is failing to build with :
> ioctlsort0.o: file not recognized: File format not recognized

1. https://wiki.gentoo.org/wiki/Talk:Distcc#Another_SSH_usage_example

Reproducible: Always




# emerge --info
Portage 2.3.0 (python 3.4.5-final-0, default/linux/arm/13.0/armv7a, gcc-4.9.4, glibc-2.22-r4, 3.4.113 armv7l)
=================================================================
System uname: Linux-3.4.113-armv7l-ARMv7_Processor_rev_4_-v7l-with-gentoo-2.3
KiB Mem:      913628 total,    149792 free
KiB Swap:     262140 total,    260248 free
Timestamp of repository gentoo: Fri, 09 Dec 2016 10:00:01 +0000
sh bash 4.3_p48
ld GNU ld (Gentoo 2.25.1 p1.1) 2.25.1
distcc 3.2rc1 armv7a-hardfloat-linux-gnueabi [enabled]
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::gentoo
sys-devel/autoconf:       2.69::gentoo
sys-devel/automake:       1.14.1::gentoo, 1.15::gentoo
sys-devel/binutils:       2.25.1-r1::gentoo
sys-devel/gcc:            4.9.3::gentoo, 4.9.4::gentoo
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::gentoo (virtual/os-headers)
sys-libs/glibc:           2.22-r4::gentoo
Repositories:

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

cubieboard-overlay
    location: /portage/trees/cubieboard
    sync-type: git
    sync-uri: https://github.com/ksa242/gentoo-cubieboard-overlay.git
    masters: gentoo
    priority: 0

voyageur
    location: /portage/trees/voyageur
    sync-type: git
    sync-uri: https://cafarelli.fr/git/voyageur-overlay/
    masters: gentoo
    priority: 0

ACCEPT_KEYWORDS="arm"
ACCEPT_LICENSE="* -@EULA"
CBUILD="armv7a-hardfloat-linux-gnueabi"
CFLAGS="-O2 -pipe -march=armv7-a -mfpu=vfpv3-d16 -mfloat-abi=hard"
CHOST="armv7a-hardfloat-linux-gnueabi"
CONFIG_PROTECT="/etc /var/bind"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /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"
CXXFLAGS="-O2 -pipe -march=armv7-a -mfpu=vfpv3-d16 -mfloat-abi=hard"
DISTDIR="/portage/distfiles/"
EMERGE_DEFAULT_OPTS="--with-bdeps=y"
FCFLAGS="-O2 -pipe -march=armv7-a"
FEATURES="assume-digests binpkg-logs binpkg-multi-instance buildpkg config-protect-if-modified distcc distlocks ebuild-locks fixlafiles merge-sync news nodoc noinfo noman parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans usersync xattr"
FFLAGS="-O2 -pipe -march=armv7-a"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="fr_FR.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j13 -l2"
PKGDIR="/portage/packages/armv7-a/"
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="arm armv5te armv6 armv6t2 berkdb bzip2 cli cracklib crypt cxx dri fortran gdbm iconv ipv6 modules mysql ncurses nls nptl openmp pam pcre readline seccomp session 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="kexi words flow plan sheets stage tables krita karbon braindump author" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" 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" L10N="en fr" 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" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_4" RUBY_TARGETS="ruby21" USERLAND="GNU" VIDEO_CARDS="exynos fbdev omap omapfb 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, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON
Comment 1 Fab 2016-12-09 20:24:08 UTC
Created attachment 455700 [details]
build log
Comment 2 SpanKY gentoo-dev 2016-12-22 18:14:56 UTC
the build doesn't care how your compiler is configured.  if your system is producing bad objects, then you should track that down.  if you need help triaging your system, please try the forums or the gentoo-user mailing list.

if you're also using ccache, try clearing your caches on all sides.
Comment 3 Fab 2016-12-23 15:42:06 UTC
I do not use ccache anywhere.

And yes, the build system sets a specific compiler to build ioctlsort.c.
Please see the following commands :

> # pwd
> /var/tmp/portage/dev-util/strace-4.13/work/strace-4.13
>
> # grep AX_PROG_CC_FOR_BUILD configure.ac 
> AX_PROG_CC_FOR_BUILD
>
> # grep CC_FOR_BUILD Makefile.am
> ioctlsort_CC = $(CC_FOR_BUILD)
>
> # grep CC_FOR_BUILD Makefile
> CC_FOR_BUILD = gcc
> ac_ct_CC_FOR_BUILD = gcc
> ioctlsort_CC = $(CC_FOR_BUILD)

So, strace is unable to cross-compile (and distcc is finally not the problem).
Comment 4 SpanKY gentoo-dev 2016-12-23 18:00:53 UTC
(In reply to Fab from comment #3)

the strace behavior is correct -- it needs to compile & run ioctlsort locally.  it doesn't install it.

we should change it to use $(tc-getBUILD_CC) explicitly so it uses a better default than just `gcc`.
Comment 5 SpanKY gentoo-dev 2016-12-24 09:08:08 UTC
i've pushed this rework:
https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2201dbb7de7aaf045761d78735a445cecca16f44

can you see if that makes a difference for you ?
Comment 6 Fab 2016-12-24 11:32:14 UTC
(In reply to SpanKY from comment #5)
> i've pushed this rework:
> https://gitweb.gentoo.org/repo/gentoo.git/commit/
> ?id=2201dbb7de7aaf045761d78735a445cecca16f44
> 
> can you see if that makes a difference for you ?

Yes, builds fine with distcc up now :

> Dec 24 12:23:49 coreI5 distccd[3307]: (dcc_job_summary) client: 127.0.0.1:52320 COMPILE_OK exit:0 sig:0 core:0 ret:0 time:1959ms armv7a-hardfloat-linux-gnueabi-gcc ./ioctlsort.c

Thank you.