Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 594572 - cross-avr/gcc-5.4.0[jit]: avr-devices.o:( multiple definition of `avr_arch_types'
Summary: cross-avr/gcc-5.4.0[jit]: avr-devices.o:( multiple de...
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Crossdev team
: 626740 658162 (view as bug list)
Depends on:
Blocks: crossdev-bugs
  Show dependency tree
Reported: 2016-09-21 04:00 UTC by Maciej Piechotka
Modified: 2019-04-27 19:52 UTC (History)
5 users (show)

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

cross-avr:gcc-5.4.0:20160921-034833.log.gz (cross-avr:gcc-5.4.0:20160921-034833.log.gz,94.05 KB, application/x-gzip)
2016-09-21 04:00 UTC, Maciej Piechotka

Note You need to log in before you can comment on or make changes to this bug.
Description Maciej Piechotka 2016-09-21 04:00:51 UTC
Created attachment 446998 [details]

cc1-checksum.o libbackend.a main.o  libcommon-target.a libcommon.a ../libcpp/libcpp.a ../libdecnumber/libdecnumber.a libcommon.a ../libcpp/libcpp.a   ../libbacktrace/.libs/libbacktrace.a ../libiberty/pic/libiberty.a ../libdecnumber/libdecnumber.a   -lmpc -lmpfr -lgmp -rdynamic -ldl  -lz
avr-devices.o:( multiple definition of `avr_arch_types'
libbackend.a(avr-devices.o):( first defined here
avr-devices.o:( multiple definition of `avr_mcu_types'
libbackend.a(avr-devices.o):( first defined here
avr-devices.o: In function `avr_inform_devices()':
avr-devices.c:(.text+0x2c4): multiple definition of `avr_inform_devices()'
libbackend.a(avr-devices.o):avr-devices.c:(.text+0x2c4): first defined here
avr-devices.o: In function `avr_inform_core_architectures()':
avr-devices.c:(.text+0x304): multiple definition of `avr_inform_core_architectures()'
libbackend.a(avr-devices.o):avr-devices.c:(.text+0x304): first defined here
collect2: error: ld returned 1 exit status
distcc[27695] ERROR: compile (null) on localhost failed
make[2]: *** [/var/tmp/portage/cross-avr/gcc-5.4.0/work/gcc-5.4.0/gcc/jit/] Error 1
make[2]: *** Waiting for unfinished jobs....
rm gcc.pod
make[2]: Leaving directory '/var/tmp/portage/cross-avr/gcc-5.4.0/work/build/gcc'
make[1]: *** [Makefile:4094: all-gcc] Error 2
make[1]: Leaving directory '/var/tmp/portage/cross-avr/gcc-5.4.0/work/build'
make: *** [Makefile:852: all] Error 2

Portage 2.3.0 (python 3.4.5-final-0, default/linux/amd64/13.0/desktop/gnome, gcc-5.4.0, glibc-2.23-r2, 4.7.3-gentoo x86_64)
                         System Settings
System uname: Linux-4.7.3-gentoo-x86_64-Intel-R-_Core-TM-_i7-3820QM_CPU_@_2.70GHz-with-gentoo-2.3
KiB Mem:    16314208 total,   7458832 free
KiB Swap:   18874360 total,  18874240 free
Timestamp of repository gentoo: Tue, 20 Sep 2016 16:45:01 +0000
sh dash 0.5.9
ld GNU ld (Gentoo 2.25.1 p1.1) 2.25.1
distcc 3.2rc1 x86_64-pc-linux-gnu [enabled]
app-shells/bash:          4.3_p46-r1::gentoo
dev-java/java-config:     2.2.0-r3::gentoo
dev-lang/perl:            5.24.0-r1::gentoo
dev-lang/python:          2.7.12::gentoo, 3.4.5::gentoo
dev-util/cmake:           3.6.2::gentoo
dev-util/pkgconfig:       0.29.1::gentoo
sys-apps/baselayout:      2.3::gentoo
sys-apps/openrc:          0.21.7::gentoo
sys-apps/sandbox:         2.10-r2::gentoo
sys-devel/autoconf:       2.13::gentoo, 2.69-r2::gentoo
sys-devel/automake:       1.11.6-r2::gentoo, 1.12.6-r1::gentoo, 1.13.4-r1::gentoo, 1.14.1-r1::gentoo, 1.15-r2::gentoo
sys-devel/binutils:       2.25.1-r1::gentoo, 2.26.1::gentoo
sys-devel/gcc:            4.9.3::gentoo, 4.9.4::gentoo, 5.3.0::gentoo, 5.4.0::gentoo
sys-devel/gcc-config:     1.8-r1::gentoo
sys-devel/libtool:        2.4.6-r2::gentoo
sys-devel/make:           4.2.1::gentoo
sys-kernel/linux-headers: 4.7::gentoo (virtual/os-headers)
sys-libs/glibc:           2.23-r2::gentoo
ACCEPT_KEYWORDS="amd64 ~amd64"
CFLAGS="-O2 -pipe -ggdb -Wa,--compress-debug-sections -march=ivybridge -mmmx -mno-3dnow -msse -msse2 -msse3 -mssse3 -mno-sse4a -mcx16 -msahf -mno-movbe -maes -mno-sha -mpclmul -mpopcnt -mno-abm -mno-lwp -mno-fma -mno-fma4 -mno-xop -mno-bmi -mno-bmi2 -mno-tbm -mavx -mno-avx2 -msse4.2 -msse4.1 -mno-lzcnt -mno-rtm -mno-hle -mrdrnd -mf16c -mfsgsbase -mno-rdseed -mno-prfchw -mno-adx -mfxsr -mxsave -mxsaveopt -mno-avx512f -mno-avx512er -mno-avx512cd -mno-avx512pf -mno-prefetchwt1 -mno-clflushopt -mno-xsavec -mno-xsaves -mno-avx512dq -mno-avx512bw -mno-avx512vl -mno-avx512ifma -mno-avx512vbmi -mno-clwb -mno-pcommit -mno-mwaitx --param l1-cache-size=32 --param l1-cache-line-size=64 --param l2-cache-size=8192 -mtune=ivybridge -fgcse-sm -fgcse-las -fgcse-after-reload -floop-block -floop-interchange -ftree-loop-distribution -floop-strip-mine"
CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /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 -ggdb -Wa,--compress-debug-sections -march=ivybridge -mmmx -mno-3dnow -msse -msse2 -msse3 -mssse3 -mno-sse4a -mcx16 -msahf -mno-movbe -maes -mno-sha -mpclmul -mpopcnt -mno-abm -mno-lwp -mno-fma -mno-fma4 -mno-xop -mno-bmi -mno-bmi2 -mno-tbm -mavx -mno-avx2 -msse4.2 -msse4.1 -mno-lzcnt -mno-rtm -mno-hle -mrdrnd -mf16c -mfsgsbase -mno-rdseed -mno-prfchw -mno-adx -mfxsr -mxsave -mxsaveopt -mno-avx512f -mno-avx512er -mno-avx512cd -mno-avx512pf -mno-prefetchwt1 -mno-clflushopt -mno-xsavec -mno-xsaves -mno-avx512dq -mno-avx512bw -mno-avx512vl -mno-avx512ifma -mno-avx512vbmi -mno-clwb -mno-pcommit -mno-mwaitx --param l1-cache-size=32 --param l1-cache-line-size=64 --param l2-cache-size=8192 -mtune=ivybridge -fgcse-sm -fgcse-las -fgcse-after-reload -floop-block -floop-interchange -ftree-loop-distribution -floop-strip-mine"
EMERGE_DEFAULT_OPTS="-j24 --load-average=7"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs clean-logs compress-build-logs compressdebug config-protect-if-modified distcc distcc-pump distlocks ebuild-locks fail-clean fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms split-elog splitdebug strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,--hash-style=both -Wl,--sort-common -Wl,--no-keep-memory"
MAKEOPTS="-j24 -l7"
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"
USE="X a52 aac acl acpi aes alsa amd64 autoipd avahi avx berkdb bluetooth branding bzip2 bzr c++0x cairo caps cdda cdr cli clutter colord cracklib crypt cryptsetup cups cxx dbus dconf debugger device-mapper dri dri3 dts dvd dvdr eds egl emacs emboss encode evo exif fam ffmpeg firefox flac flash fontconfig fortran fprint fuse g3dvl gbm gdbm gdm gegl gif git glamor gmp gnome gnome-keyring gnome-online-accounts gnuefi gnuplot google gpm grilo gsettings gstreamer gtk gtk3 gtkstyle gui iconv inotify introspection iproute2 ipsec ipv6 ipython irc ithreads jabber jemalloc jit jpeg kerberos laptop latex lcms ldap libkms libnotify libproxy libsecret llvm lvm lzma mad map mercurial mmx mmxext mng modules mp3 mp4 mpeg mtp multilib nautilus ncurses networking networkmanager nls nptl nsplugin nss ogg opencl opengl openmp oss pam pango parted pch pcre pdf perl pkcs11 plotutils png policykit popcnt postgres ppds profiler pulseaudio python python3 qemu qt4 rdp readline realtime rss samba scanner sdl seccomp session smartcard sna spell spice sqlite sse sse2 sse3 sse4_1 sse4_2 ssh ssl ssse3 startup-notification steamruntime subversion svg symlink systemd tcpd telepathy theora threads tiff tracker truetype udev udisks unicode upnp upower usb v4l vaapi vala vdpau virt-network virtfs vorbis vpx wayland webkit wxwidgets x264 xattr xcb xcomposite xinerama xml xrandr xv xvid zeitgeist zeroconf zlib zsh-completion" ABI_X86="32 64" 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" 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" CPU_FLAGS_X86="aes avx mmx mmxext popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3" CURL_SSL="openssl" DRACUT_MODULES="caps crypt lvm" 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" GRUB_PLATFORMS="pc efi-64" INPUT_DEVICES="evdev synaptics mouse mutouch" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="en pl en_GB" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-6" PYTHON_SINGLE_TARGET="python3_4" PYTHON_TARGETS="python3_4 python2_7" QEMU_SOFTMMU_TARGETS="arm x86_64 i386" QEMU_USER_TARGETS="arm x86_64 i386" RUBY_TARGETS="ruby23 ruby22 ruby21 ruby20" SANE_BACKENDS="gt68xx" USERLAND="GNU" VIDEO_CARDS="intel nvidia nouveau" 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"
USE_PYTHON="2.7 3.4"

                        Package Settings

cross-avr/gcc-4.9.3::local was built with the following:
USE="multilib nls nptl vtv (-altivec) -awt -cilk -cxx -debug -doc (-fixed-point) -fortran -gcj -go -graphite -hardened -libssp -nopie -nossp -objc -objc++ -objc-gc -openmp -regression-test -sanitize -vanilla" ABI_X86="64"
CFLAGS="-O2 -pipe"

cross-avr/gcc-5.3.0::local was built with the following:
USE="cxx multilib nls nptl openmp (-altivec) -awt -cilk -debug -doc (-fixed-point) -fortran -gcj -go -graphite -hardened -jit -libssp -multislot -nopie -nossp -objc -objc++ -objc-gc -regression-test -sanitize -vanilla" ABI_X86="64"
CFLAGS="-O2 -pipe"
Comment 1 Conrad Kostecki gentoo-dev 2016-11-03 20:17:34 UTC
Same Problem here.

Portage 2.3.2 (python 3.5.2-final-0, default/linux/amd64/13.0, gcc-5.4.0, glibc-2.23-r2, 4.8.6-gentoo x86_64)
System uname: Linux-4.8.6-gentoo-x86_64-Intel-R-_Atom-TM-_CPU_C2758_@_2.40GHz-with-gentoo-2.3
KiB Swap:   36700156 total,  36700156 free
Timestamp of repository gentoo: Thu, 03 Nov 2016 17:45:01 +0000
sh bash 4.4-r1
ld GNU ld (Gentoo 2.26.1 p1.0) 2.26.1
distcc 3.2rc1 x86_64-pc-linux-gnu [disabled]
ccache version 3.2.7 [enabled]
app-shells/bash:          4.4-r1::gentoo
dev-lang/perl:            5.24.0-r2::gentoo
dev-lang/python:          2.7.12::gentoo, 3.4.5::gentoo, 3.5.2::gentoo
dev-util/ccache:          3.2.7::gentoo
dev-util/cmake:           3.6.2::gentoo
dev-util/pkgconfig:       0.29.1::gentoo
sys-apps/baselayout:      2.3::gentoo
sys-apps/openrc:          0.22.2::gentoo
sys-apps/sandbox:         2.10-r2::gentoo
sys-devel/autoconf:       2.13::gentoo, 2.69-r2::gentoo
sys-devel/automake:       1.11.6-r2::gentoo, 1.13.4-r1::gentoo, 1.14.1-r1::gentoo, 1.15-r2::gentoo
sys-devel/binutils:       2.26.1::gentoo
sys-devel/gcc:            5.4.0::gentoo
sys-devel/gcc-config:     1.8-r1::gentoo
sys-devel/libtool:        2.4.6-r2::gentoo
sys-devel/make:           4.2.1::gentoo
sys-kernel/linux-headers: 4.7::gentoo (virtual/os-headers)
sys-libs/glibc:           2.23-r2::gentoo

    location: /usr/portage
    sync-type: rsync
    sync-uri: rsync://
    priority: -1000
    sync-rsync-extra-opts: --exclude-from=/etc/portage/rsync_excludes

    location: /usr/local/portage
    masters: gentoo

ACCEPT_KEYWORDS="amd64 ~amd64"
CFLAGS="-march=native -mfpmath=sse,387 -mtune=intel -O3 -fomit-frame-pointer -malign-data=abi -mtls-dialect=gnu2 -pipe"
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/php/apache2-php7.0/ext-active/ /etc/php/cgi-php7.0/ext-active/ /etc/php/cli-php7.0/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/splash /etc/terminfo"
CXXFLAGS="-march=native -mfpmath=sse,387 -mtune=intel -O3 -fomit-frame-pointer -malign-data=abi -mtls-dialect=gnu2 -pipe -fvisibility-inlines-hidden"
EMERGE_DEFAULT_OPTS="--autounmask=n --quiet-build=n --with-bdeps=y"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs ccache config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
INSTALL_MASK="/etc/xinetd.d/* /usr/lib/systemd/system/*"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,--sort-common -Wl,-z,now"
MAKEOPTS="-j9 -l8"
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"
USE="X aac acl alsa amd64 berkdb bzip2 cairo caps cddb cgi cjk cracklib crypt ctype curl cvs cxx dbus djvu encode exif ffmpeg flite fontconfig ftp gd gif git gmp gnutls gpm graphviz hddtemp iconv icu idn imlib inotify introspection ipv6 javascript jit jpeg jpeg2k lcms libcaca libsamplerate lm_sensors lzma lzo maildir mbox mhash mikmod mime mmap modplug mp3 mysql mysqli ncurses nls nntp nptl offensive ogg openal opencl opengl openmp orc oss pam pcre pdf perl png posix postproc postscript pulseaudio python raw readline samba seccomp session simplexml slang sndfile sockets spell sqlite ssl subversion suid svg symlink syslog tcpd theora threads tiff truetype udev unicode usb vaapi vdpau vhosts vim-syntax vorbis wavpack webp wmf x264 xattr xcb xml xmp xpm xvid zeroconf zlib zsh-completion" ABI_X86="32 64" COLLECTD_PLUGINS="apcups cgroups conntrack contextswitch cpu cpusleep df disk dns entropy ethstat exec filecount hddtemp interface ipc ipmi irq load lvm md memory mysql netlink nfs nginx ntpd openvpn ping processes protocols rrdcached sensors serial smart swap syslog tcpconns thermal unixsock uptime users wireless" CPU_FLAGS_X86="aes mmx mmxext sse sse2 sse3 ssse3 sse4_1 sse4_2" CURL_SSL="openssl" ELIBC="glibc" GRUB_PLATFORMS="pc" INPUT_DEVICES="libinput" KERNEL="linux" L10N="de de_DE" LCD_DEVICES="crystalfontz lcd2usb" LINGUAS="de de_DE" NGINX_MODULES_HTTP="access auth_basic autoindex charset fancyindex fastcgi geo geoip gunzip gzip proxy realip rewrite stub_status upstream_keepalive" NGINX_MODULES_STREAM="access geo geoip realip ssl_preread" PHP_TARGETS="php7-0" PYTHON_SINGLE_TARGET="python3_5" PYTHON_TARGETS="python2_7 python3_4 python3_5" USERLAND="GNU" VIDEO_CARDS="ast"
USE_PYTHON="2.7 3.4 3.5"
Comment 2 Conrad Kostecki gentoo-dev 2016-12-11 16:16:03 UTC
I found the cause. Compiling with USE="-jit" works. Using USE="jit" shows the error here.
Comment 3 Marek Szuba archtester gentoo-dev 2017-04-20 12:48:37 UTC
I can confirm both the error and that the workaround suggested by Conrad works.
Comment 4 Jeroen Roovers (RETIRED) gentoo-dev 2017-08-26 09:27:34 UTC
*** Bug 626740 has been marked as a duplicate of this bug. ***
Comment 5 2018-02-03 20:10:17 UTC
I can also confirm this on latest stable gcc-6.4.0-r1.
I also used USE="-pie" on 17 profile.

complete command:
USE="-openmp -jit -hardened -sanitize -vtv -pie" crossdev -s4 --stable --portage --verbose --target avr
Comment 6 Marcin Kowalski 2018-06-18 16:13:31 UTC
*** Bug 658162 has been marked as a duplicate of this bug. ***
Comment 7 Marco Sirabella 2019-04-25 17:17:26 UTC
Can confirm the problem and also the above fix.

A bit of investigation showed these duplicated symbols:

$ nm avr-devices.o  | grep avr_info
0000000000000000 T _Z29avr_inform_core_architecturesv
$ nm libbackend.a  | grep avr_info
                 U _Z29avr_inform_core_architecturesv
0000000000000000 T _Z29avr_inform_core_architecturesv
Comment 8 Larry the Git Cow gentoo-dev 2019-04-27 19:52:21 UTC
The bug has been closed via the following commit(s):

commit 5f7c4162b1bf2e3b2123cbe4189f675eebcd1a1d
Author:     Sergei Trofimovich <>
AuthorDate: 2019-04-27 19:42:02 +0000
Commit:     Sergei Trofimovich <>
CommitDate: 2019-04-27 19:52:08 +0000

    toolchain.eclass: disable USE=jit for cross-compilers, bug #594572
    USE=jit is not very useful for a cross-compiler as it assumes
    running generated code on the host. At least avr-* targets
    can't build
    The change disables IUSE=jit for cross-compilers only.
    Cross-built compilers could still get built for a
    Reported-by: Maciej Piechotka
    Reported-by: Marco Sirabella
    Signed-off-by: Sergei Trofimovich <>

 eclass/toolchain.eclass | 4 ++++
 1 file changed, 4 insertions(+)