Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Crosscompiling x11-libs/gtk+-2.24.12 failed
View unanswered posts
View posts from last 24 hours

Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message

Joined: 16 May 2012
Posts: 14

PostPosted: Mon Oct 15, 2012 8:12 am    Post subject: Crosscompiling x11-libs/gtk+-2.24.12 failed Reply with quote

hi all ,
i have a notebook with i7-2670QM cpu that i use to compile binary packages in a chroot jail for an atom D510 but this package is failing to emerge while compiling on the atom host all is fine.
I change some CFLAGS options and i find that with -mno-movbe (Atom only specific extension) the package on i7-2670QM host is compiling fine; here the log for failing stuff.

make gtk-update-icon-cache
make[3]: Entering directory `/var/tmp/portage/x11-libs/gtk+-2.24.12/work/gtk+-2.24.12/gtk'
x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I.. -DG_LOG_DOMAIN=\"Gtk\" -DGTK_LIBDIR=\"/usr/lib64\" -DGTK_DATADIR=\"/usr/share\" -DGTK_DATA_PREFIX=\"/usr\" -DGTK_SYSCONFDIR=\"/etc\" -DGTK_VERSION=\"2.24.12\" -DGTK_BINARY_VERSION=\"2.10.0\" -DGTK_HOST=\"x86_64-pc-linux-gnu\" -DGTK_COMPILATION -DGTK_PRINT_BACKENDS=\"file,cups\" -DGTK_PRINT_PREVIEW_COMMAND=\""evince --unlink-tempfile --preview --print-settings %s %f"\" -I.. -I../gtk -I.. -I../gdk -I../gdk -DGTK_DISABLE_DEPRECATED -DGTK_FILE_SYSTEM_ENABLE_UNSUPPORTED -DGTK_PRINT_BACKEND_ENABLE_UNSUPPORTED -DG_DISABLE_CAST_CHECKS -pthread -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/pango-1.0 -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng15 -I/usr/include/libdrm -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/atk-1.0 -DG_DISABLE_SINGLE_INCLUDES -DATK_DISABLE_SINGLE_INCLUDES -DGDK_PIXBUF_DISABLE_SINGLE_INCLUDES -DGTK_DISABLE_SINGLE_INCLUDES -DGDK_PIXBUF_DISABLE_DEPRECATED -march=atom -O2 -pipe -mno-aes -mno-avx -O2 -Wall -c updateiconcache.c
/bin/sh ../libtool --tag=CC --mode=link x86_64-pc-linux-gnu-gcc -DGDK_PIXBUF_DISABLE_DEPRECATED -march=atom -O2 -pipe -mno-aes -mno-avx -O2 -Wall -Wl,-O1 -Wl,--as-needed -o gtk-update-icon-cache updateiconcache.o -lgdk_pixbuf-2.0 -lgobject-2.0 -lglib-2.0
libtool: link: x86_64-pc-linux-gnu-gcc -DGDK_PIXBUF_DISABLE_DEPRECATED -march=atom -O2 -pipe -mno-aes -mno-avx -O2 -Wall -Wl,-O1 -o gtk-update-icon-cache updateiconcache.o -Wl,--as-needed -lgdk_pixbuf-2.0 -lgobject-2.0 -lglib-2.0
make[3]: Leaving directory `/var/tmp/portage/x11-libs/gtk+-2.24.12/work/gtk+-2.24.12/gtk'
./gtk-update-icon-cache --force --ignore-theme-index \
--source builtin_icons stock-icons > gtkbuiltincache.h.tmp && \
mv gtkbuiltincache.h.tmp gtkbuiltincache.h
/bin/sh: line 2: 9686 Illegal instruction ./gtk-update-icon-cache --force --ignore-theme-index --source builtin_icons stock-icons > gtkbuiltincache.h.tmp
make[2]: *** [gtkbuiltincache.h] Error 132
make[2]: Leaving directory `/var/tmp/portage/x11-libs/gtk+-2.24.12/work/gtk+-2.24.12/gtk'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/var/tmp/portage/x11-libs/gtk+-2.24.12/work/gtk+-2.24.12'
make: *** [all] Error 2
* ERROR: x11-libs/gtk+-2.24.12 failed (compile phase):
* emake failed
* If you need support, post the output of `emerge --info '=x11-libs/gtk+-2.24.12'`,
* the complete build log and the output of `emerge -pqv '=x11-libs/gtk+-2.24.12'`.
* The complete build log is located at '/var/tmp/portage/x11-libs/gtk+-2.24.12/temp/build.log'.
* The ebuild environment file is located at '/var/tmp/portage/x11-libs/gtk+-2.24.12/temp/environment'.
* Working directory: '/var/tmp/portage/x11-libs/gtk+-2.24.12/work/gtk+-2.24.12'
* S: '/var/tmp/portage/x11-libs/gtk+-2.24.12/work/gtk+-2.24.12'

# emerge --info '=x11-libs/gtk+-2.24.12'
Portage (default/linux/amd64/10.0/desktop/kde, gcc-4.5.4, glibc-2.15-r2, 3.4.9-gentoo x86_64)
System Settings
System uname: Linux-3.4.9-gentoo-x86_64-Intel-R-_Core-TM-_i7-2670QM_CPU_@_2.20GHz-with-gentoo-2.1
Timestamp of tree: Fri, 12 Oct 2012 14:45:01 +0000
app-shells/bash: 4.2_p37
dev-java/java-config: 2.1.11-r3
dev-lang/python: 2.7.3-r2, 3.2.3
dev-util/cmake: 2.8.8-r3
dev-util/pkgconfig: 0.27.1
sys-apps/baselayout: 2.1-r1
sys-apps/sandbox: 2.5
sys-devel/autoconf: 2.13, 2.68
sys-devel/automake: 1.11.6
sys-devel/binutils: 2.22-r1
sys-devel/gcc: 4.5.4
sys-devel/gcc-config: 1.7.3
sys-devel/libtool: 2.4-r1
sys-devel/make: 3.82-r3
sys-kernel/linux-headers: 3.4-r2 (virtual/os-headers)
sys-libs/glibc: 2.15-r2
Repositories: gentoo x-portage
CFLAGS="-march=atom -O2 -pipe -mno-aes -mno-avx"
CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt /usr/share/openvpn/easy-rsa /var/bind"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-march=atom -O2 -pipe -mno-aes -mno-avx"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs buildpkg config-protect-if-modified distlocks ebuild-locks fixlafiles news parallel-fetch parse-eapi-ebuild-head protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"
FFLAGS="-O2 -pipe"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
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"
USE="X a52 aac acl acpi alsa amd64 bluetooth branding bzip2 cairo cdda cdr cli consolekit cracklib crypt cups cxx dbus declarative device-mapper dri dts dvd dvdr emboss encode exif fam firefox flac fortran gdbm gif gpm gudev iconv icu iproute2 jpeg kde kipi lcms libnotify lxde mad mmx mng modules mp3 mp4 mpeg mudflap multilib ncurses nls nptl nsplugin ogg opengl openmp pango pcre pdf phonon plasma png policykit ppds pppd qt3support qt4 readline sdl session spell sse sse2 ssl ssse3 startup-notification svg syslog tcpd tiff truetype udev udisks unicode upower usb utf8 vlc vorbis wxwidgets x264 xcb xcomposite xml xscreensaver xv xvid zlib" 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" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" 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" 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 mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" PHP_TARGETS="php5-3" PYTHON_TARGETS="python3_2 python2_7" RUBY_TARGETS="ruby18 ruby19" SANE_BACKENDS="hp net" 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"

Package Settings

x11-libs/gtk+-2.24.12 was built with the following:
USE="(consolekit) cups introspection (multilib) (policykit) (-aqua) -debug -examples -test -vim-syntax -xinerama"
CFLAGS="-march=atom -O2 -pipe -mno-aes -mno-avx -mno-movbe -O2"
CXXFLAGS="-march=atom -O2 -pipe -mno-aes -mno-avx -mno-movbe -O2"

Mybe is a dumb question but , compiling with gcc for other cpu like Atom why i get " Illegal instruction" ?
Back to top
View user's profile Send private message

Joined: 02 May 2003
Posts: 6574

PostPosted: Mon Oct 15, 2012 8:32 am    Post subject: Reply with quote

because the package need to run a tools to end the build, and unlucky for you, that tools is build within the package, so for the atom, and optimized with the instruction not handle by the i7.
build it for atom -> x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I.. -DG_LOG_...--as-needed -o gtk-update-icon-cache...
run a script with /bin/bash -> /bin/sh: line 2: 9686 Illegal instruction
line 2 in script call gtk-update-icon-cache you've made for atom -> ./gtk-update-icon-cache --force --ignore-theme-index -make gtk-update-icon-cache
Back to top
View user's profile Send private message

Joined: 05 Aug 2006
Posts: 2151
Location: Berlin, Germany

PostPosted: Mon Oct 15, 2012 8:33 am    Post subject: Reply with quote

 /bin/sh: line 2: 9686 Illegal instruction ./gtk-update-icon-cache --force --ignore-theme-index --source builtin_icons stock-icons > gtkbuiltincache.h.tmp
Yes, this indeed means that an Atom-specific instruction was used which is not supported by your i7. If you want to use the movbe instruction while still building on the i7, then you will have to properly setup cross-compilation and not just chroot.
Back to top
View user's profile Send private message

Joined: 16 May 2012
Posts: 14

PostPosted: Mon Oct 15, 2012 10:59 am    Post subject: Reply with quote

Ok thank you very much , i understood the problem :)
Back to top
View user's profile Send private message

Joined: 29 Jul 2005
Posts: 661
Location: Belgium

PostPosted: Tue Dec 11, 2012 8:19 pm    Post subject: Reply with quote

I just ran into the same thing. Before I look into it further, could you tell me what "properly setting up cross compilation" exactly changes to this situation?
Back to top
View user's profile Send private message

Joined: 16 May 2012
Posts: 14

PostPosted: Wed Dec 12, 2012 11:51 am    Post subject: Reply with quote

Hi ,
the CFLAGS that resolve the problem , for me , was

CFLAGS="-march=atom -O2 -pipe -mno-aes -mno-avx -mno-movbe"

in the make.conf of the chroot.
The flag that fixed the problema was -mno-movbe .

I hope this fixes your problem too.

Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum