Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 286251 (PR41500) - sys-devel/gcc-4.4.1 fails to rebuild itself on ARM
Summary: sys-devel/gcc-4.4.1 fails to rebuild itself on ARM
Status: RESOLVED FIXED
Alias: PR41500
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: ARM Linux
: High normal (vote)
Assignee: Gentoo Toolchain Maintainers
URL: http://gcc.gnu.org/PR41500
Whiteboard:
Keywords:
: 295024 (view as bug list)
Depends on:
Blocks: 278687
  Show dependency tree
 
Reported: 2009-09-24 15:45 UTC by Raúl Porcel (RETIRED)
Modified: 2009-11-30 16:05 UTC (History)
6 users (show)

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


Attachments
config.log (config.log,13.29 KB, text/plain)
2009-09-24 15:46 UTC, Raúl Porcel (RETIRED)
Details
gcc_strace (gcc_strace,8.85 KB, text/plain)
2009-09-28 17:07 UTC, Robert Sebastian Gerus
Details
config.log from gcc-4.3.4 (config.log,12.75 KB, text/plain)
2009-09-29 07:43 UTC, Robert Sebastian Gerus
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Raúl Porcel (RETIRED) gentoo-dev 2009-09-24 15:45:19 UTC
It fails on OABI and EABI.

ortage 2.1.6.13 (default/linux/arm/2008.0, gcc-4.4.1, glibc-2.9_p20081201-r3, 2.6.31-01335-g86d7101 armv5tel)
=================================================================
System uname: Linux-2.6.31-01335-g86d7101-armv5tel-Feroceon_rev_0_-v5l-with-gentoo-2.0.1
Timestamp of tree: Thu, 24 Sep 2009 03:00:01 +0000
app-shells/bash:     4.0_p33
dev-lang/python:     2.5.4-r2, 2.6.2-r2, 3.1.1-r1
sys-apps/baselayout: 2.0.1
sys-apps/openrc:     0.4.3-r3
sys-apps/sandbox:    2.1
sys-devel/autoconf:  2.63-r1
sys-devel/automake:  1.10.2, 1.11
sys-devel/binutils:  2.18-r4
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.2.6a
virtual/os-headers:  2.6.30-r1
ACCEPT_KEYWORDS="arm ~arm"
CBUILD="armv5tel-softfloat-linux-gnueabi"
CFLAGS="-Os -march=armv5te -pipe"
CHOST="armv5tel-softfloat-linux-gnueabi"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/udev/rules.d"
CXXFLAGS="-Os -march=armv5te -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="bindist buildpkg distlocks fixpackages parallel-fetch protect-owned sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"
LDFLAGS="-Wl,-O1"
PKGDIR="/usr/portage/packages/armv5tel-softfloat-linux-gnueabi/unstable"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X aac acl arm berkdb bzip2 cli cracklib crypt dbus fbcon flac fortran gdbm gpm iconv ipv6 isdnlog jpeg kdrive modules mudflap ncurses nls nptl nptlonly ntp openmp pam pcre perl png pppd python readline reflection session spl ssl sysfs tcpd tiff unicode xorg zlib" 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="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 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" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev touchscreen void" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" USERLAND="GNU" VIDEO_CARDS="dummy fbdev"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LANG, LC_ALL, LINGUAS, MAKEOPTS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY

The failing part is
hecking for armv5tel-softfloat-linux-gnueabi-ar... /usr/armv5tel-softfloat-linux-gnueabi/bin/ar
checking for armv5tel-softfloat-linux-gnueabi-lipo... lipo
checking for armv5tel-softfloat-linux-gnueabi-nm... /var/tmp/portage/sys-devel/gcc-4.4.1/work/build/./gcc/nm
checking for armv5tel-softfloat-linux-gnueabi-ranlib... /usr/armv5tel-softfloat-linux-gnueabi/bin/ranlib
checking for armv5tel-softfloat-linux-gnueabi-strip... /usr/armv5tel-softfloat-linux-gnueabi/bin/strip
checking whether ln -s works... yes
checking for armv5tel-softfloat-linux-gnueabi-gcc... /var/tmp/portage/sys-devel/gcc-4.4.1/work/build/./gcc/xgcc -B/var/tmp/portage/sys-devel/gcc-4.4.1/work/build/./gcc/ -B/usr/armv5tel-softfloat-linux-gnueabi/bin/ -B/usr/armv5tel-softfloat-linux-gnueabi/lib/ -isystem /usr/armv5tel-softfloat-linux-gnueabi/include -isystem /usr/armv5tel-softfloat-linux-gnueabi/sys-include
checking for suffix of object files... configure: error: in `/var/tmp/portage/sys-devel/gcc-4.4.1/work/build/armv5tel-softfloat-linux-gnueabi/libgcc':
configure: error: cannot compute suffix of object files: cannot compile
See `config.log' for more details.
make[2]: *** [configure-stage1-target-libgcc] Error 1
make[2]: Leaving directory `/var/tmp/portage/sys-devel/gcc-4.4.1/work/build'
make[1]: *** [stage1-bubble] Error 2
make[1]: Leaving directory `/var/tmp/portage/sys-devel/gcc-4.4.1/work/build'
----------------------------------------

--------------------------------------
libgcc/config.log contains the following relevant part:
configure:2391: $? = 0
configure:2393: /var/tmp/portage/sys-devel/gcc-4.4.1/work/build/./gcc/xgcc -B/var/tmp/portage/sys-devel/gcc-4.4.1/work/build/./gcc/ -B/usr/armv5tel-softfloat-linux-gnueabi/bin/ -B/usr/armv5tel-softfloat-linux-gnueabi/lib/ -isystem /usr/armv5tel-softfloat-linux-gnueabi/include -isystem /usr/armv5tel-softfloat-linux-gnueabi/sys-include -V </dev/null >&5
xgcc: '-V' must come at the start of the command line
configure:2396: $? = 1
configure:2415: /var/tmp/portage/sys-devel/gcc-4.4.1/work/build/./gcc/xgcc -B/var/tmp/portage/sys-devel/gcc-4.4.1/work/build/./gcc/ -B/usr/armv5tel-softfloat-linux-gnueabi/bin/ -B/usr/armv5tel-softfloat-linux-gnueabi/lib/ -isystem /usr/armv5tel-softfloat-linux-gnueabi/include -isystem /usr/armv5tel-softfloat-linux-gnueabi/sys-include -o conftest -g -march=armv5te -pipe -O2     conftest.c  >&5
conftest.c: In function 'main':
conftest.c:15: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://bugs.gentoo.org/> for instructions.
configure:2418: $? = 1
configure:2590: checking for suffix of object files
configure:2611: /var/tmp/portage/sys-devel/gcc-4.4.1/work/build/./gcc/xgcc -B/var/tmp/portage/sys-devel/gcc-4.4.1/work/build/./gcc/ -B/usr/armv5tel-softfloat-linux-gnueabi/bin/ -B/usr/armv5tel-softfloat-linux-gnueabi/lib/ -isystem /usr/armv5tel-softfloat-linux-gnueabi/include -isystem /usr/armv5tel-softfloat-linux-gnueabi/sys-include -c -g -march=armv5te -pipe -O2    conftest.c >&5
conftest.c: In function 'main':
conftest.c:15: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://bugs.gentoo.org/> for instructions.
configure:2614: $? = 1
Comment 1 Raúl Porcel (RETIRED) gentoo-dev 2009-09-24 15:46:14 UTC
Created attachment 205122 [details]
config.log
Comment 2 Raúl Porcel (RETIRED) gentoo-dev 2009-09-25 13:30:35 UTC
I've marked gcc-4.4.1 -arm meanwhile
Comment 3 Maksim 'max_posedon' Melnikau 2009-09-27 21:42:50 UTC
Bug is invalid, gcc compilation fails because of lacking of memory.

I reproduced in on Sheevaplug(512Mb ram), then add 1G swap, and compilation was successfully done.

Please at least return ~arm keyword!
Comment 4 Robert Sebastian Gerus 2009-09-28 17:06:15 UTC
I'm also hit by this bug. The compiler seems to segfault when it encounters line 47 of /usr/include/bits/stdio.h:
 44 __STDIO_INLINE int
 45 getchar (void)
 46 {
 47   return _IO_getc (stdin);
 48 }

Will attach a strace of it.

paludis 0.40.1
Paludis build information:
    Compiler:
        CXX:                   armv5tel-softfloat-linux-gnueabi-g++ 4.4.1
        CXXFLAGS:               -Os -march=armv5te -pipe -pedantic
        LDFLAGS:               -Wl,-O1
        DATE:                  2009-09-20T07:53:28+0200

    Libraries:
        C++ Library:           GNU libstdc++ 20090722

    Paths:
        DATADIR:               /usr/share
        LIBDIR:                /usr/lib
        LIBEXECDIR:            /usr/libexec
        SYSCONFDIR:            /etc
        PYTHONINSTALLDIR:      
        RUBYINSTALLDIR:        

System:
    Linux stalker 2.6.31-openrd #7 PREEMPT Wed Sep 23 10:15:21 CEST 2009 armv5tel Feroceon 88FR131 rev 1 (v5l) Marvell OpenRD Client Board GNU/Linux

Reduced Privs:
    reduced_uid:               101
    reduced_uid->name:         paludisbuild
    reduced_uid->dir:          /var/tmp/paludis
    reduced_gid:               1000
    reduced_gid->name:         paludisbuild

Environment:
    Format:                    paludis
    Config dir:                /etc/paludis
    World file:                /var/db/pkg/world

Repository installed-virtuals:
    format:                    installed_virtuals
    root:                      /

Repository virtuals:
    format:                    virtuals

Repository gentoo:
    format:                    ebuild
    location:                  /data0/repositories/gentoo
    append_repository_name_to_write_cache: true
    binary_destination:        false
    binary_keywords:           
    binary_uri_prefix:         
    builddir:                  /data0/builddir
    cache:                     /var/lib/repositories/gentoo/metadata/cache
    distdir:                   /data0/web/distfiles
    eapi_when_unknown:         0
    eapi_when_unspecified:     0
    eclassdirs:                /var/lib/repositories/gentoo/eclass
    ignore_deprecated_profiles: false
    layout:                    traditional
    names_cache:               /var/cache/paludis/names
    newsdir:                   /data0/repositories/gentoo/metadata/news
    profile_eapi_when_unspecified: 0
    profiles:                  /var/lib/repositories/gentoo/profiles/default/linux/arm/2008.0/server /var/lib/repositories/local/profiles/base_override
    securitydir:               /data0/repositories/gentoo/metadata/glsa
    setsdir:                   /var/lib/repositories/gentoo/sets
    sync:                      rsync://ftp.vectranet.pl/gentoo-portage
    sync_options:              
    use_manifest:              use
    write_cache:               /var/cache/paludis/metadata

    Package information:
        app-admin/eselect-compiler: (none)
        app-shells/bash:       4.0_p33
        dev-java/java-config:  (none)
        dev-lang/python:       2.6.2-r2
        dev-python/pycrypto:   (none)
        dev-util/ccache:       (none)
        dev-util/cmake:        (none)
        dev-util/confcache:    (none)
        sys-apps/baselayout:   2.0.1
        sys-apps/openrc:       0.4.3-r3
        sys-apps/sandbox:      2.1
        sys-devel/autoconf:    2.63-r1
        sys-devel/automake:    1.10.2 1.11
        sys-devel/binutils:    2.19.1-r1
        sys-devel/gcc-config:  1.4.1
        sys-devel/libtool:     2.2.6a
        virtual/os-headers:    2.6.30-r1 (for sys-kernel/linux-headers::installed)

Repository installed:
    format:                    vdb
    location:                  /var/db/pkg
    builddir:                  /data0/builddir
    eapi_when_unknown:         0
    names_cache:               /var/cache/paludis/names
    provides_cache:            /var/cache/paludis/provides
    root:                      /

Repository installed-unpackaged:
    format:                    installed_unpackaged
    location:                  /var/db/unpackaged
    root:                      /

Repository arachnist_overlay:
    format:                    ebuild
    location:                  /data0/repositories/local
    append_repository_name_to_write_cache: true
    binary_destination:        false
    binary_keywords:           
    binary_uri_prefix:         
    builddir:                  /data0/builddir
    cache:                     /var/empty
    distdir:                   /data0/web/distfiles
    eapi_when_unknown:         0
    eapi_when_unspecified:     0
    eclassdirs:                /var/lib/repositories/gentoo/eclass /var/lib/repositories/local/eclass
    ignore_deprecated_profiles: false
    layout:                    traditional
    master_repository:         gentoo
    names_cache:               /var/cache/paludis/names
    newsdir:                   /var/lib/repositories/local/metadata/news
    profile_eapi_when_unspecified: 0
    profiles:                  /var/lib/repositories/gentoo/profiles/default/linux/arm/2008.0/server /var/lib/repositories/local/profiles/base_override
    securitydir:               /var/lib/repositories/local/metadata/glsa
    setsdir:                   /var/lib/repositories/local/sets
    sync:                      git://github.com/arachnist/arachnist-ebuilds.git
    sync_options:              
    use_manifest:              use
    write_cache:               /var/cache/paludis/metadata

Package sys-devel/gcc-4.4.1::installed:

        [32;01m>>>[0m Running ebuild phase killold as paludisbuild:paludisbuild...
        [32;01m>>>[0m Starting builtin_killold
        [32;01m>>>[0m Done builtin_killold
        [32;01m>>>[0m Completed ebuild phase killold
        [32;01m>>>[0m Running ebuild phases initmisc infovars info as paludisbuild:paludisbuild...
        [32;01m>>>[0m Starting builtin_initmisc
        [32;01m>>>[0m Done builtin_initmisc
        [32;01m>>>[0m Starting builtin_infovars
        ACCEPT_KEYWORDS=
        CBUILD=armv5tel-softfloat-linux-gnueabi
        CFLAGS=-march=armv5te -pipe -O2
        CHOST=armv5tel-softfloat-linux-gnueabi
        CONFIG_PROTECT= 
        CONFIG_PROTECT_MASK= 
        CPPFLAGS=
        CTARGET=armv5tel-softfloat-linux-gnueabi
        CXXFLAGS=-march=armv5te -pipe -O2
        DISTDIR=/var/db/pkg/sys-devel/gcc-4.4.1
        FEATURES=distlocks fixpackages parallel-fetch protect-owned sandbox sfperms strict unmerge-orphans userfetch
        FFLAGS=
        GENTOO_MIRRORS=
        INSTALL_MASK=
        LANG=
        LC_ALL=C
        LDFLAGS=-Wl,-O1
        LINGUAS=
        MAKEOPTS=-j2
        PORTAGE_COMPRESS=
        PORTAGE_COMPRESS_FLAGS=
        PORTAGE_CONFIGROOT=
        PORTAGE_RSYNC_EXTRA_OPTS=
        PORTAGE_RSYNC_OPTS=
        PORTAGE_TMPDIR=/data0/builddir
        PORTDIR=/var/db/pkg/sys-devel/gcc-4.4.1
        PORTDIR_OVERLAY=
        SYNC=
        USE=arm elibc_glibc kernel_linux nptl openmp userland_GNU
Comment 5 Robert Sebastian Gerus 2009-09-28 17:07:30 UTC
Created attachment 205501 [details]
gcc_strace

Strace of gcc failing
Comment 6 Robert Sebastian Gerus 2009-09-28 17:13:14 UTC
Btw, I'm on a openrd-client (which also has 512MB of ram).
Comment 7 Robert Sebastian Gerus 2009-09-29 07:42:33 UTC
Looks like gcc-4.4.1 fails to rebuild also gcc-4.3.4.
In the config.log it looks identically as the 4.4 failure.



make[3]: Leaving directory `/data0/builddir/sys-devel-gcc-4.3.4/work/build/gcc'
mkdir -p -- armv5tel-softfloat-linux-gnueabi/libgcc
Checking multilib configuration for libgcc...
Configuring stage 1 in armv5tel-softfloat-linux-gnueabi/libgcc
configure: creating cache ./config.cache
checking for --enable-version-specific-runtime-libs... no
checking for a BSD-compatible install... /usr/bin/install -c
checking for gawk... gawk
checking build system type... armv5tel-softfloat-linux-gnueabi
checking host system type... armv5tel-softfloat-linux-gnueabi
checking for armv5tel-softfloat-linux-gnueabi-ar... /usr/armv5tel-softfloat-linux-gnueabi/bin/ar
checking for armv5tel-softfloat-linux-gnueabi-lipo... lipo
checking for armv5tel-softfloat-linux-gnueabi-nm... /data0/builddir/sys-devel-gcc-4.3.4/work/build/./gcc/nm
checking for armv5tel-softfloat-linux-gnueabi-ranlib... /usr/armv5tel-softfloat-linux-gnueabi/bin/ranlib
checking for armv5tel-softfloat-linux-gnueabi-strip... /usr/armv5tel-softfloat-linux-gnueabi/bin/strip
checking whether ln -s works... yes
checking for armv5tel-softfloat-linux-gnueabi-gcc... /data0/builddir/sys-devel-gcc-4.3.4/work/build/./gcc/xgcc -B/data0/builddir/sys-devel-gcc-4.3.4/work/build/./gcc/ -B/usr/armv5tel-softfloat-linux-gnueabi/bin/ -B/usr/armv5tel-softfloat-linux-gnueabi/lib/ -isystem /usr/armv5tel-softfloat-linux-gnueabi/include -isystem /usr/armv5tel-softfloat-linux-gnueabi/sys-include
checking for suffix of object files... configure: error: cannot compute suffix of object files: cannot compile
See `config.log' for more details.
make[2]: Leaving directory `/data0/builddir/sys-devel-gcc-4.3.4/work/build'
make[1]: Leaving directory `/data0/builddir/sys-devel-gcc-4.3.4/work/build'
make[2]: *** [configure-stage1-target-libgcc] Error 1
make[1]: *** [stage1-bubble] Error 2
make: *** [bootstrap-lean] Error 2
/usr/libexec/paludis/utils/emake: emake returned error 2

!!! ERROR in sys-devel/gcc-4.3.4::gentoo:
!!! In gcc_do_make at line 3953
!!! emake failed with bootstrap-lean
Comment 8 Robert Sebastian Gerus 2009-09-29 07:43:22 UTC
Created attachment 205561 [details]
config.log from gcc-4.3.4
Comment 9 Raúl Porcel (RETIRED) gentoo-dev 2009-09-29 13:11:08 UTC
Filed upstream as http://gcc.gnu.org/PR41500
Comment 10 Raúl Porcel (RETIRED) gentoo-dev 2009-09-30 13:59:00 UTC
(In reply to comment #3)
> Bug is invalid, gcc compilation fails because of lacking of memory.
> 
> I reproduced in on Sheevaplug(512Mb ram), then add 1G swap, and compilation was
> successfully done.
> 
> Please at least return ~arm keyword!
>

Since everyone at upstream is looking at this comment, i'll provide more info wrt it:
Maksim 'max_posedon' Melnikau on irc said:
Sep 26 23:38:49 <max_posedon>   armin76, reproduced
Sep 26 23:39:04 <max_posedon>   {standard input}: Assembler messages:
Sep 26 23:39:04 <max_posedon>   {standard input}:49835: Warning: end of file not at end of a line; newline inserted
Sep 26 23:39:04 <max_posedon>   xgcc: Internal error: Killed (program cc1)
Sep 26 23:39:04 <max_posedon>   Please submit a full bug report.
Sep 26 23:39:04 <max_posedon>   See <http://bugs.gentoo.org/> for instructions.
Sep 27 00:48:45 <max_posedon>   armin76, I just checked dmesg I understand that RAM is key to problems
Sep 27 00:48:59 <max_posedon>   512Mb sheevaplug isn't enough, retrying with 1G swap

Later, he said:
Sep 27 21:32:04 <max_posedon>   armin76, hi!
Sep 27 21:32:21 <max_posedon>   so, I confirm that gcc compilation problem is because of memory
Sep 27 21:32:33 <max_posedon>   with 1G swap it recompiled successfully
Sep 27 21:32:39 <max_posedon>   lu
Sep 27 21:32:42 <max_posedon>   <luke-jr> max_posedon: try memory limits on GCC?
Sep 27 21:32:53 <max_posedon>   hi, luke-jr !, how I can do it/
Sep 27 21:32:54 <max_posedon>   ?
Sep 27 21:37:12 <max_posedon>   armin76, returm me ~arm for gcc-4.4.1!)
Sep 27 21:39:05 <kolla> luke-jr: why?
Sep 27 21:40:32 <max_posedon>   armin76, if it works with -j3 it doesn't prove that it will works with -j2, so, -j1 is only correct workaround(about python/ppc/etc)

So, if thats the error he got, its not related to this one. This one is obviously about a segfault, not a process being killed by the kernel due to running out of memory.  I've tried this on a box with 3GB of RAM(Marvell Discovery Innovation), and on the dmesg there is *NO* error regarding it running out of memory.

As i've said on the upstream bug report, it works if instead of using:
make LDFLAGS=-Wl,-O1 STAGE1_CFLAGS=-O
LIBPATH=/usr/lib/gcc/armv5tel-softfloat-linux-gnueabi/4.4.1 'BOOT_CFLAGS=
-march=armv5te -pipe -O2' bootstrap-lean
as the make command, i use
make LDFLAGS=-Wl,-O1 STAGE1_CFLAGS=-O2
LIBPATH=/usr/lib/gcc/armv5tel-softfloat-linux-gnueabi/4.4.1 'BOOT_CFLAGS=
-march=armv5te -pipe -O2' bootstrap-lean

That is, replacing STAGE1_CFLAGS=-O with -O2.
Comment 11 Raúl Porcel (RETIRED) gentoo-dev 2009-11-10 15:04:46 UTC
gcc-4.4.2 works fine, closing
Comment 12 SpanKY gentoo-dev 2009-11-30 16:05:57 UTC
*** Bug 295024 has been marked as a duplicate of this bug. ***