Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 567878 - crossdev -s4 avr: gcc stage 2: libsanitizer: configure: error: C compiler cannot create executables
Summary: crossdev -s4 avr: gcc stage 2: libsanitizer: configure: error: C compiler can...
Status: RESOLVED DUPLICATE of bug 525910
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Unspecified (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Embedded Gentoo Team
Depends on:
Reported: 2015-12-09 17:17 UTC by Amadeusz Sławiński
Modified: 2015-12-11 20:42 UTC (History)
1 user (show)

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

cross-avr-info.log (cross-avr-info.log,17.27 KB, text/plain)
2015-12-09 17:19 UTC, Amadeusz Sławiński
cross-avr-gcc-stage2.log.xz (cross-avr-gcc-stage2.log.xz,119.06 KB, application/x-xz)
2015-12-09 17:20 UTC, Amadeusz Sławiński
gcc-config.logs.tar.xz (gcc-config.logs.tar.xz,51.99 KB, application/x-xz)
2015-12-09 17:20 UTC, Amadeusz Sławiński
Config logs for failed crossdev call (gcc-config.logs.tar.xz,62.45 KB, application/x-xz)
2015-12-11 11:22 UTC, Alexander Puchmayr

Note You need to log in before you can comment on or make changes to this bug.
Description Amadeusz Sławiński 2015-12-09 17:17:53 UTC
# crossdev -s4 avr
gawk: cmd. line:8: (FILENAME=- FNR=1) warning: gensub: third argument `' treated as 1
gawk: cmd. line:8: (FILENAME=- FNR=6) warning: gensub: third argument `' treated as 1
gawk: cmd. line:8: (FILENAME=- FNR=13) warning: gensub: third argument `' treated as 1
gawk: cmd. line:8: (FILENAME=- FNR=20) warning: gensub: third argument `' treated as 1
 * crossdev version:      20150716
 * Host Portage ARCH:     amd64
 * Target Portage ARCH:   *
 * Target System:         avr
 * Stage:                 4 (C/C++ compiler)
 * ABIs:                  default

 * binutils:              binutils-[latest]
 * gcc:                   gcc-[latest]
 * libc:                  avr-libc-[latest]

 * CROSSDEV_OVERLAY:      /usr/local/crossdev
 * PORT_LOGDIR:           /var/log/portage
 * Portage flags:         
  _  -  ~  -  _  -  ~  -  _  -  ~  -  _  -  ~  -  _  -  ~  -  _  -  ~  -  _  -  ~  -  _  -  ~  -  _  -  ~  -  _  -  ~  -  _  -  ~  -  _  -  ~  -  _  -  ~  -  _  -  ~  -  _  -  ~  -  _  -  ~  
 * leaving sys-devel/binutils in /usr/local/crossdev
 * leaving sys-devel/gcc in /usr/local/crossdev
 * leaving dev-embedded/avr-libc in /usr/local/crossdev
 * leaving sys-devel/gdb in /usr/local/crossdev
  _  -  ~  -  _  -  ~  -  _  -  ~  -  _  -  ~  -  _  -  ~  -  _  -  ~  -  _  -  ~  -  _  -  ~  -  _  -  ~  -  _  -  ~  -  _  -  ~  -  _  -  ~  -  _  -  ~  -  _  -  ~  -  _  -  ~  -  _  -  ~  
gawk: cmd. line:8: (FILENAME=- FNR=1) warning: gensub: third argument `' treated as 1
gawk: cmd. line:8: (FILENAME=- FNR=6) warning: gensub: third argument `' treated as 1
gawk: cmd. line:8: (FILENAME=- FNR=13) warning: gensub: third argument `' treated as 1
gawk: cmd. line:8: (FILENAME=- FNR=20) warning: gensub: third argument `' treated as 1
 * Log: /var/log/portage/cross-avr-binutils.log
 * Emerging cross-binutils ...                                                                                                                                                           [ ok ]
 * Log: /var/log/portage/cross-avr-gcc-stage1.log
 * Emerging cross-gcc-stage1 ...                                                                                                                                                         [ ok ]
 * Log: /var/log/portage/cross-avr-avr-libc.log
 * Emerging cross-avr-libc ...                                                                                                                                                           [ ok ]
 * Log: /var/log/portage/cross-avr-gcc-stage2.log
 * Emerging cross-gcc-stage2 ...

 * gcc failed :(
 * If you file a bug, please attach the following logfiles:
 * /var/log/portage/cross-avr-info.log
 * /var/log/portage/cross-avr-gcc-stage2.log.xz
 * /var/tmp/portage/cross-avr/gcc*/temp/gcc-config.logs.tar.xz

Reproducible: Always
Comment 1 Amadeusz Sławiński 2015-12-09 17:19:20 UTC
Created attachment 418884 [details]
Comment 2 Amadeusz Sławiński 2015-12-09 17:20:06 UTC
Created attachment 418886 [details]
Comment 3 Amadeusz Sławiński 2015-12-09 17:20:49 UTC
Created attachment 418888 [details]
Comment 4 Amadeusz Sławiński 2015-12-09 17:22:12 UTC
# emerge --info
Portage 2.2.26 (python 2.7.11-final-0, hardened/linux/amd64, gcc-4.9.3, glibc-2.22-r1, 4.2.6-hardened-r7 x86_64)
System uname: Linux-4.2.6-hardened-r7-x86_64-Intel-R-_Core-TM-_i7-4790K_CPU_@_4.00GHz-with-gentoo-2.2
KiB Mem:    32833260 total,  27897052 free
KiB Swap:          0 total,         0 free
Timestamp of repository gentoo: Tue, 08 Dec 2015 00:45:01 +0000
sh bash 4.3_p42
ld GNU ld (Gentoo 2.25.1 p1.1) 2.25.1
app-shells/bash:          4.3_p42::gentoo
dev-java/java-config:     2.2.0::gentoo
dev-lang/perl:            5.22.0::gentoo
dev-lang/python:          2.7.11::gentoo, 3.4.3-r2::gentoo
dev-util/cmake:           3.4.1::gentoo
dev-util/pkgconfig:       0.29::gentoo
sys-apps/baselayout:      2.2::gentoo
sys-apps/openrc:          9999::gentoo
sys-apps/sandbox:         2.9::gentoo
sys-devel/autoconf:       2.13::gentoo, 2.69-r1::gentoo
sys-devel/automake:       1.11.6-r1::gentoo, 1.12.6::gentoo, 1.13.4::gentoo, 1.14.1::gentoo, 1.15::gentoo
sys-devel/binutils:       2.25.1-r1::gentoo
sys-devel/gcc:            4.9.3::gentoo
sys-devel/gcc-config:     1.8::gentoo
sys-devel/libtool:        2.4.6-r1::gentoo
sys-devel/make:           4.1-r1::gentoo
sys-kernel/linux-headers: 4.3::gentoo (virtual/os-headers)
sys-libs/glibc:           2.22-r1::gentoo

    location: /usr/portage
    sync-type: rsync
    sync-uri: rsync://
    priority: -1000
    eclass-overrides: amade-overlay

    location: /usr/local/crossdev
    masters: gentoo amade-overlay
    priority: 0
    eclass-overrides: amade-overlay

    location: /home/amade/overlay
    masters: gentoo
    priority: 1
    eclass-overrides: amade-overlay

Installed sets: @steam
ACCEPT_KEYWORDS="amd64 ~amd64"
CFLAGS="-O2 -march=native -pipe"
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/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 -march=native -pipe"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs clean-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms splitdebug strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync webrsync-gpg xattr"
FFLAGS="-O2 -pipe"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
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"
USE="X aac acl acpi alsa amd64 audit berkdb bzip2 caps cli cracklib crypt cups cxx dbus dri ffmpeg flac gdbm gif git gnutls gold gpg hardened iconv icu ipv6 jpeg jpeg2k justify mmx mmxext mng modules mp3 multilib ncurses nls nptl ogg opencl opengl openmp pam pax_kernel pcre pie png qt5 readline seccomp session sse sse2 ssl ssp svg tcpd theora threads tiff udev unicode urandom usb v4l vaapi vdpau vim-syntax vorbis x264 xattr xcb xft xinerama xpm xtpax 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 avx2 fma3 mmx mmxext popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3" 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="evdev keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="en en_GB pl" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_4" QEMU_SOFTMMU_TARGETS="x86_64 ppc ppc64" RUBY_TARGETS="ruby22" 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"
Comment 5 Amadeusz Sławiński 2015-12-10 23:55:08 UTC
So it seems like it enables sanitizer on hardened:

Makefile:9335: recipe for target 'configure-target-libsanitizer' failed 

As far as I know sanitizer is big no-no on hardened kernels due to some incompatibilities with address space size.

I tried and added "-sanitize" and it seems to build. Perhaps use flag can be disabled on hardened profiles?
Comment 6 Alexander Puchmayr 2015-12-11 11:19:30 UTC
Same here, but I came a step further.

From Amadeusz Sławiński's gcc-config.logs.tar.xz, extract file build/avr/avr25/libsanitizer/config.log, line 85:

/usr/libexec/gcc/avr/ld: cannot open linker script file ldscripts/avr25.xn: No such file or directory

A fix for this problem is suggested in as workaround for Bug 147155; at the end of the thread setting a softlink is suggested, which seems to work fine:

ln -s /usr/lib/binutils/avr/2.25.1/ldscripts /usr/avr/lib/ldscripts

NOTE: As portage does not know anything about this link, it will have to be adjusted each time cross-avr/binutils is upgraded.

At this point, I was able to create executeables for my arduino, i.e. my simple test program compiled fine:

avr-gcc -mmcu=avr5 -O3 --save-temps hello.c

BUT: crossdev still does not finish successfully (See attached logs)
File build/avr/avrxmega4/libsanitizer/config.log, Line 82:

/usr/libexec/gcc/avr/ld: cannot find crtx64a4.o: No such file or directory

I cannot find the file crtx64a4.o on my system, so I'm getting stuck here.
Comment 7 Alexander Puchmayr 2015-12-11 11:22:08 UTC
Created attachment 418980 [details]
Config logs for failed crossdev call

USE="-openmp -sanitze" FEATURES="-distcc" crossdev -t avr -s4 -S --without-headers
Comment 8 Amadeusz Sławiński 2015-12-11 15:01:34 UTC
Alexander, is this the exact line you used?

USE="-openmp -sanitze" FEATURES="-distcc" crossdev -t avr -s4 -S --without-headers

It should be '-sanitize' not '-sanitze', just in case you misspelled.
Comment 9 SpanKY gentoo-dev 2015-12-11 20:42:55 UTC

*** This bug has been marked as a duplicate of bug 525910 ***