Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 473856 - sys-devel/distcc - distcc-pump cross-compiles for the wrong target?
Summary: sys-devel/distcc - distcc-pump cross-compiles for the wrong target?
Status: RESOLVED OBSOLETE
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Michał Górny
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-06-19 17:45 UTC by Xavier Miller (RETIRED)
Modified: 2018-12-08 10:36 UTC (History)
1 user (show)

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


Attachments
build log (build.log,47.55 KB, text/x-log)
2013-06-19 18:26 UTC, Xavier Miller (RETIRED)
Details
build log (FEATURES="distcc -distcc-pump") (build.log,51.32 KB, text/x-log)
2013-06-21 17:18 UTC, Xavier Miller (RETIRED)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Xavier Miller (RETIRED) gentoo-dev 2013-06-19 17:45:49 UTC
Hello,

I compiled app-text/qpdfview on a ~x86 system, assisted by a ~amd64 distcc server.

Everything is well configured for distcc, but when I execute qpdfview, I got an error : "could not load PDF plugin!"

And in the console, I see :

Could not load plug-in: "libqpdfview_pdf.so" 
"The plugin '/usr/lib/qpdfview/libqpdfview_pdf.so' uses incompatible Qt library. Expected build key "i386 linux g++-4 full-config", got "x86_64 linux g++-4 full-config"

There is thus an architecture mismatch.


Reproducible: Always
Comment 1 Xavier Miller (RETIRED) gentoo-dev 2013-06-19 17:50:14 UTC
But the file is well in 32 bits:

file /usr/lib/qpdfview/libqpdfview_pdf.so 
/usr/lib/qpdfview/libqpdfview_pdf.so: ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV), dynamically linked, stripped

It looks like a qt-plugin system problem.
Comment 2 Xavier Miller (RETIRED) gentoo-dev 2013-06-19 17:52:44 UTC
Portage 2.2.0_alpha181 (default/linux/x86/13.0/desktop, gcc-4.7.3, glibc-2.17, 3.9.6-gentoo i686)
=================================================================
                        System Settings
=================================================================
System uname: Linux-3.9.6-gentoo-i686-Intel-R-_Atom-TM-_CPU_N270_@_1.60GHz-with-gentoo-2.2
KiB Mem:     1540064 total,    250112 free
KiB Swap:    1572860 total,   1572860 free
Timestamp of tree: Wed, 19 Jun 2013 14:30:01 +0000
ld GNU ld (GNU Binutils) 2.23.1
distcc 3.1 i686-gentoo-linux-gnu [disabled]
app-shells/bash:          4.2_p45
dev-java/java-config:     2.1.12-r1
dev-lang/python:          2.7.5
dev-util/cmake:           2.8.11.1
dev-util/pkgconfig:       0.28
sys-apps/baselayout:      2.2
sys-apps/openrc:          0.11.8
sys-apps/sandbox:         2.6-r1
sys-devel/autoconf:       2.13, 2.69
sys-devel/automake:       1.12.6
sys-devel/binutils:       2.23.1
sys-devel/gcc:            4.7.3
sys-devel/gcc-config:     1.8
sys-devel/libtool:        2.4.2
sys-devel/make:           3.82-r4
sys-kernel/linux-headers: 3.9 (virtual/os-headers)
sys-libs/glibc:           2.17
Repositories: gentoo local pd-overlay proaudio
ACCEPT_KEYWORDS="x86 ~x86"
ACCEPT_LICENSE="@FREE freedist as-is"
CBUILD="i686-gentoo-linux-gnu"
CFLAGS="-O2 -pipe -fomit-frame-pointer -march=prescott -mtune=generic"
CHOST="i686-gentoo-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /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 -march=prescott -mtune=generic"
DISTDIR="/var/portage/distfiles"
EMERGE_DEFAULT_OPTS="--with-bdeps y --buildpkg --quiet-build=n"
FCFLAGS="-O2 -march=i686 -pipe"
FEATURES="assume-digests binpkg-logs buildpkg candy config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"
FFLAGS="-O2 -march=i686 -pipe"
GENTOO_MIRRORS="ftp://ftp.belnet.be/mirror/rsync.gentoo.org/gentoo/"
LANG="fr_BE.utf8"
LDFLAGS="-Wl,-O1 -Wl,--sort-common -Wl,--hash-style=gnu -Wl,--as-needed"
MAKEOPTS="-j3"
PKGDIR="/var/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage/overlay /var/lib/layman/pd-overlay /var/lib/layman/pro-audio"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X a52 aac acpi alsa branding bzip2 cairo cli cracklib crypt cups cxx dbus dri dts emboss encode exif fam firefox flac gif gpm gtk iconv jack jpeg lcms libnotify libsamplerate mad mmx mng modules mp3 mp4 mpeg mudflap ncurses nls nptl ogg opengl openmp osc pam pango pcre pdf png ppds qt4 readline session sndfile spell sqlite sse sse2 ssl ssse3 startup-notification svg tcpd tiff truetype udev udisks unicode upower usb vorbis wmf wxwidgets x264 x86 xcb xinerama xml xv xvid zlib" ABI_X86="32" ALSA_CARDS="hda-intel usb-audio virmidi" 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 ubx" INPUT_DEVICES="keyboard synaptics mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="fr fr_FR" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-3" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7" QEMU_SOFTMMU_TARGETS="arm i386" QEMU_USER_TARGETS="arm i386" RUBY_TARGETS="ruby19 ruby18" USERLAND="GNU" VIDEO_CARDS="intel" 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
=================================================================

app-text/qpdfview-0.4.3 was built with the following:
USE="cups dbus pdf sqlite svg -djvu -postscript -synctex" LINGUAS="fr -ast -az -bg -bs -ca -cs -da -de -el -en_GB -eo -es -eu -fi -he -hr -id -it -ky -ms -my -pl -pt_BR -ro -ru -sk -tr -ug -uk -zh_CN"
Comment 3 Jeroen Roovers (RETIRED) gentoo-dev 2013-06-19 17:55:09 UTC
1) Please attach the entire build log to this bug report.
Comment 4 Xavier Miller (RETIRED) gentoo-dev 2013-06-19 18:26:17 UTC
Created attachment 351412 [details]
build log

Hallo Jeroen,

Here is the build.log

The resulting binaries present the mixed i386/x86_64 mismatch (at least plugin information).
Comment 5 Jeroen Roovers (RETIRED) gentoo-dev 2013-06-21 13:35:43 UTC
I cannot reproduce that. I also don't see FEATURES="distcc distcc-pump" but you are using pump somehow. Does it work if you try that instead?
Comment 6 Xavier Miller (RETIRED) gentoo-dev 2013-06-21 13:40:22 UTC
yep, FEATURES contains "distcc distcc-pump"

The emerge --info was when I disabled distcc
Comment 7 Xavier Miller (RETIRED) gentoo-dev 2013-06-21 13:41:17 UTC
I will try without distcc-pump this night or weekend.
Comment 8 Jeroen Roovers (RETIRED) gentoo-dev 2013-06-21 14:02:14 UTC
(In reply to Xavier Miller from comment #7)
> I will try without distcc-pump this night or weekend.

Do check [1] beforehand to make sure your cross-distcc environment is properly set up.


[1] http://www.gentoo.org/doc/en/cross-compiling-distcc.xml
Comment 9 Xavier Miller (RETIRED) gentoo-dev 2013-06-21 14:07:57 UTC
The cross-distcc is OK, I know the problems (link cc, c++ & co to a wrapper, same toolchain and cross-toolchain, ...).
I use distcc for years, and activated pump for some months ; this is the first case I have such subtle architecture mismatches.

For the other cases, it is obvious : remote compilation fails but is ok locally, or badly linked (and this fails to emerge). In the first case, the build is OK, in the other case, I need to disable distcc (with /etc/portage/package.env disabling FEATURES=distcc*)
Comment 10 Xavier Miller (RETIRED) gentoo-dev 2013-06-21 17:18:23 UTC
Created attachment 351576 [details]
build log (FEATURES="distcc -distcc-pump")

with FEATURES="distcc -distcc-pump", it compiles and runs fine, despite all "pump server not enabled, preprocessed locally" kind of messages.

So, the problem seems related to distcc pump mode, as you had presumed.
Comment 11 Paul Gover 2014-04-01 15:14:09 UTC
I've just hit this.

I've been using distcc for ages without much problem, and haven't needed to touch my configuration recently.  I use FEATURES="distcc distcc-pump ..." as in this bug report.  Mys etup is distcc client is 32-bit Intel Atom powered netbook, sole distcc server is 64-bit AMD Phenom desktop, so it's been proper cross-compilation, and as I say, no problems until...

... emerge updated the client's distcc package from
  sys-devel/distcc-3.1-r5
to
  sys-devel/distcc-3.1-r9

The next three ebuilds failed with 32 v 64 bit ABI conflicts: udisks, upower and network-manager.  As these have a certain history in common, I just swore and updated my package.env file to compile them locally.  Then emerge just went on to successfully compile the rest - pretty much all KDE.  So today I get to boot my shiny new system, and whoops, it appears KDE has been compiled for 64 bit operation.

Now there was a change to something in /etc caught by etc-update, but it looked like it would substitute an old default version of the file, so I discarded the change.

Perhaps the new version of distcc on the client needed a new verion on the server?  I didn't reinstall that, of course.  But looking at my emerge history, the server's been on 3.1-r9 since last October, and I've run a few emerge updates over distcc since then.

I can't see anything funny in the few messages logged by distcc to the server syslog.

on the client, CHOST="i686-pc-linux-gnu", and CFLAGS="-march=atom -mtune=atom" plus several atom-specific optimizations that you get from something like
  gcc -march=native -E -v - </dev/null 2>&1 | grep cc1
Comment 12 Paul Gover 2014-04-01 15:19:39 UTC
Sorry, to clarify my previous comment -
Adter emerge updated distcc on the client, it then stopped as the next ebuild failed (udisks, AFAIR).  So I set package.env to compile that one locally, and did emerge --resume.  That worked for udisks, but then same sequence for upower, and then again for network-manager.  Having set package.env to get network-manager compiled locally, emerge --resume worked, and went on to compile the rest of the update stack, which was KDE.  Only most of KDE seems to be now compiled for 64 bits.  :-(
Comment 13 Paul Gover 2014-06-28 12:19:08 UTC
This problem now resolved for me.  Installing a new version of distcc client overwrote the symlinks gor cc, gcc, g++ and c++ in /usr/lib/distcc/bin, as descibed in the wiki at:
     http://wiki.gentoo.org/wiki/Distcc/Cross-Compiling
I didn't have the .bashrc script in the wiki - maybe it wasn't a known issue when I installed distcc originally.

I suggest it would be worth adding an ewarn to the ebuild pkg_postinst()
function, along the lines of:
  If you use cross-compilation environments with distcc,
  updating distcc may overwrite symlinks in /usr/lib/distcc/bin
  leading to programs being compiled for incorrect target architecture.
  See the Gentoo wiki at http://wiki.gentoo.org/wiki/Distcc/Cross-Compiling
  for details.