Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 558240 - sys-devel/gcc-4.8.4: build fails on ppc - multiple previous declarations from <string.h>
Summary: sys-devel/gcc-4.8.4: build fails on ppc - multiple previous declarations from...
Status: RESOLVED DUPLICATE of bug 487398
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: PPC Linux
: Normal normal (vote)
Assignee: Gentoo Toolchain Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-08-20 10:42 UTC by Karl Lindén
Modified: 2015-08-23 18:15 UTC (History)
0 users

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


Attachments
build.log (build.log,216.79 KB, text/plain)
2015-08-20 10:43 UTC, Karl Lindén
Details
gcc-build-logs.tar.bz2 (gcc-build-logs.tar.bz2,67.24 KB, application/x-bzip2)
2015-08-20 10:55 UTC, Karl Lindén
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Karl Lindén 2015-08-20 10:42:07 UTC
When I try to emerge sys-devel/gcc-4.8.4 on ppc I run into the following compiler error:

powerpc-unknown-linux-gnu-g++ -c -DEFAULT_SSP     -DHOST_GENERATOR_FILE  -DIN_GCC   -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wmissing-format-attribute -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings   -DHAVE_CONFIG_H -I. -I. -I/var/tmp/portage/sys-devel/gcc-4.8.4/work/gcc-4.8.4/gcc -I/var/tmp/portage/sys-devel/gcc-4.8.4/work/gcc-4.8.4/gcc/. -I/var/tmp/portage/sys-devel/gcc-4.8.4/work/gcc-4.8.4/gcc/../include -I/var/tmp/portage/sys-devel/gcc-4.8.4/work/gcc-4.8.4/gcc/../libcpp/include  -I/var/tmp/portage/sys-devel/gcc-4.8.4/work/gcc-4.8.4/gcc/../libdecnumber -I/var/tmp/portage/sys-devel/gcc-4.8.4/work/gcc-4.8.4/gcc/../libdecnumber/dpd -I../libdecnumber -I/var/tmp/portage/sys-devel/gcc-4.8.4/work/gcc-4.8.4/gcc/../libbacktrace -DCLOOG_INT_GMP    /var/tmp/portage/sys-devel/gcc-4.8.4/work/gcc-4.8.4/gcc/gengtype.c -o gengtype.o
In file included from /var/tmp/portage/sys-devel/gcc-4.8.4/work/gcc-4.8.4/gcc/gengtype.c:26:0:
/var/tmp/portage/sys-devel/gcc-4.8.4/work/gcc-4.8.4/gcc/system.h:500:34: error: declaration of C function 'const char* strsignal(int)' conflicts with
 extern const char *strsignal (int);
                                  ^
In file included from /usr/lib/gcc/powerpc-unknown-linux-gnu/4.8.4/include/g++-v4/cstring:42:0,
                 from /var/tmp/portage/sys-devel/gcc-4.8.4/work/gcc-4.8.4/gcc/system.h:205,
                 from /var/tmp/portage/sys-devel/gcc-4.8.4/work/gcc-4.8.4/gcc/gengtype.c:26:
/usr/include/string.h:563:14: error: previous declaration 'char* strsignal(int)' here
 extern char *strsignal (int __sig) __THROW;
              ^
In file included from /var/tmp/portage/sys-devel/gcc-4.8.4/work/gcc-4.8.4/gcc/system.h:645:0,
                 from /var/tmp/portage/sys-devel/gcc-4.8.4/work/gcc-4.8.4/gcc/gengtype.c:26:
/var/tmp/portage/sys-devel/gcc-4.8.4/work/gcc-4.8.4/gcc/../include/libiberty.h:110:36: error: new declaration 'char* basename(const char*)'
 extern char *basename (const char *);
                                    ^
In file included from /usr/lib/gcc/powerpc-unknown-linux-gnu/4.8.4/include/g++-v4/cstring:42:0,
                 from /var/tmp/portage/sys-devel/gcc-4.8.4/work/gcc-4.8.4/gcc/system.h:205,
                 from /var/tmp/portage/sys-devel/gcc-4.8.4/work/gcc-4.8.4/gcc/gengtype.c:26:
/usr/include/string.h:600:26: error: ambiguates old declaration 'const char* basename(const char*)'
 extern "C++" const char *basename (const char *__filename)
                          ^
In file included from /var/tmp/portage/sys-devel/gcc-4.8.4/work/gcc-4.8.4/gcc/gengtype.c:26:0:
/var/tmp/portage/sys-devel/gcc-4.8.4/work/gcc-4.8.4/gcc/system.h:289:56: error: 'CHAR_BIT' was not declared in this scope
                              ? ~ (t) 0 << (sizeof(t) * CHAR_BIT - 1) : (t) 0))
                                                        ^
/var/tmp/portage/sys-devel/gcc-4.8.4/work/gcc-4.8.4/gcc/system.h:290:44: note: in expansion of macro 'INTTYPE_MINIMUM'
 #define INTTYPE_MAXIMUM(t) ((t) (~ (t) 0 - INTTYPE_MINIMUM (t)))
                                            ^
/var/tmp/portage/sys-devel/gcc-4.8.4/work/gcc-4.8.4/gcc/system.h:294:20: note: in expansion of macro 'INTTYPE_MAXIMUM'
 # define UCHAR_MAX INTTYPE_MAXIMUM (unsigned char)
                    ^
/var/tmp/portage/sys-devel/gcc-4.8.4/work/gcc-4.8.4/gcc/gengtype.h:455:23: note: in expansion of macro 'UCHAR_MAX'
   CHAR_TOKEN_OFFSET = UCHAR_MAX + 1,
                       ^
Makefile:1070: recipe for target 'gengtype.o' failed
make[3]: *** [gengtype.o] Error 1
make[3]: Leaving directory '/var/tmp/portage/sys-devel/gcc-4.8.4/work/build/gcc'
Makefile:4153: recipe for target 'all-stage1-gcc' failed
make[2]: *** [all-stage1-gcc] Error 2
make[2]: Leaving directory '/var/tmp/portage/sys-devel/gcc-4.8.4/work/build'
Makefile:17631: recipe for target 'stage1-bubble' failed
make[1]: *** [stage1-bubble] Error 2
make[1]: Leaving directory '/var/tmp/portage/sys-devel/gcc-4.8.4/work/build'
Makefile:17946: recipe for target 'bootstrap-lean' failed
make: *** [bootstrap-lean] Error 2

# emerge -pqv '=sys-devel/gcc-4.8.4::gentoo'
[ebuild   R   ] sys-devel/gcc-4.8.4  USE="altivec cxx fortran graphite nptl openmp -awt -debug% -doc (-fixed-point) -gcj -go (-hardened) (-libssp) -mudflap (-multilib) (-multislot) -nls -nopie -nossp -objc -objc++ -objc-gc -regression-test -sanitize -vanilla"

Reproducible: Always
Comment 1 Karl Lindén 2015-08-20 10:42:35 UTC
# emerge --info '=sys-devel/gcc-4.8.4::gentoo'
Portage 2.2.18 (python 2.7.9-final-0, default/linux/powerpc/ppc32/13.0, gcc-4.8.4, glibc-2.20-r2, 3.18.11-gentoo ppc)
=================================================================
                         System Settings
=================================================================
System uname: Linux-3.18.11-gentoo-ppc-7455,_altivec_supported-with-gentoo-2.2
KiB Mem:      770668 total,     47820 free
KiB Swap:    1572860 total,   1564188 free
Timestamp of repository gentoo: Sun, 16 Aug 2015 13:00:01 +0000
sh bash 4.3_p33-r2
ld GNU ld (Gentoo 2.24 p1.4) 2.24
distcc 3.1 powerpc-unknown-linux-gnu [enabled]
app-shells/bash:          4.3_p33-r2::gentoo
dev-lang/perl:            5.20.2::gentoo
dev-lang/python:          2.7.9-r1::gentoo, 3.3.5-r1::gentoo
dev-util/cmake:           2.8.12.2-r1::gentoo
dev-util/pkgconfig:       0.28-r2::gentoo
sys-apps/baselayout:      2.2::gentoo
sys-apps/openrc:          0.13.11::gentoo
sys-apps/sandbox:         2.6-r1::gentoo
sys-devel/autoconf:       2.69::gentoo
sys-devel/automake:       1.11.6-r1::gentoo, 1.13.4::gentoo, 1.14.1::gentoo
sys-devel/binutils:       2.24-r3::gentoo
sys-devel/gcc:            4.8.4::gentoo
sys-devel/gcc-config:     1.7.3::gentoo
sys-devel/libtool:        2.4.6::gentoo
sys-devel/make:           4.1-r1::gentoo
sys-kernel/linux-headers: 3.18::gentoo (virtual/os-headers)
sys-libs/glibc:           2.20-r2::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: rsync
    sync-uri: rsync://192.168.1.15/gentoo-portage
    priority: -1000

lilrc
    location: /usr/local/lilrc-overlay
    masters: gentoo
    priority: 0

proaudio
    location: /usr/local/proaudio
    masters: gentoo
    priority: 1

ACCEPT_KEYWORDS="ppc"
ACCEPT_LICENSE="* -@EULA"
CBUILD="powerpc-unknown-linux-gnu"
CFLAGS="-O2 -pipe -O2 -fomit-frame-pointer -pipe -fno-stack-protector -floop-interchange -floop-strip-mine -floop-block -fgraphite-identity -mcpu=G4"
CHOST="powerpc-unknown-linux-gnu"
CONFIG_PROTECT="/etc"
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"
CXXFLAGS="-O2 -pipe -O2 -fomit-frame-pointer -pipe -fno-stack-protector -floop-interchange -floop-strip-mine -floop-block -fgraphite-identity -mcpu=G4"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="                      --binpkg-changed-deps=y --binpkg-respect-use=y                      --buildpkg-exclude app-emulation/virtualbox-modules                      --buildpkg-exclude sys-fs/vhba                      --buildpkg-exclude sys-kernel/*                      --buildpkg-exclude virtual/*                      --buildpkg-exclude www-client/firefox"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distcc distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="rsync://192.168.1.15/gentoo-portage/ http://distfiles.gentoo.org http://ftp.df.lth.se/pub/gentoo/ rsync://ftp.df.lth.se/pub/gentoo/ http://mirror.mdfnet.se/gentoo"
LANG="C"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j5 -l2"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
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"
PORTAGE_TMPDIR="/var/tmp"
USE="X a52 aac alloca alsa altivec aspell bindist cairo cd cdda cddb cdr cracklib crypt curl dri drm dssi dvd dvdr exif ffmpeg fftw flac fltk gallium gif gimp glib gmp gnuplot gnutls gtk gtk2 gtkstyle gudev hwdb imap inotify javascript jit jpeg keymap ladspa lame libkms libsamplerate mad mp3 mpeg netifrc nptl ogg opengl openmp openrc pdf png ppc qt4 readline spell ssl startup-notification subversion svg svn theora threads thunar tiff truetype udev unicode usb vlc vorbis webgl x264 xcb xcomposite xorg zlib" ABI_PPC="32" CURL_SSL="gnutls" ELIBC="glibc" GRUB_PLATFORMS="ieee1275" INPUT_DEVICES="evdev" KERNEL="linux" PYTHON_SINGLE_TARGET="python3_4" PYTHON_TARGETS="python2_7 python3_4" SANE_BACKENDS="plustek" USERLAND="GNU" VIDEO_CARDS="nouveau" XFCE_PLUGINS="trash"
Unset:  CPPFLAGS, CTARGET, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON

=================================================================
                        Package Settings
=================================================================

sys-devel/gcc-4.8.4::gentoo was built with the following:
USE="altivec cxx fortran graphite nptl openmp -awt -doc (-fixed-point) -gcj -go (-hardened) (-libssp) -mudflap (-multilib) (-multislot) -nls -nopie -nossp -objc -objc++ -objc-gc -regression-test -sanitize -vanilla"
CFLAGS="-O2 -pipe -O2 -pipe -fno-stack-protector -mcpu=G4"
CXXFLAGS="-O2 -pipe -O2 -pipe -fno-stack-protector -mcpu=G4"
Comment 2 Karl Lindén 2015-08-20 10:43:54 UTC
Created attachment 409556 [details]
build.log
Comment 3 Karl Lindén 2015-08-20 10:55:58 UTC
Created attachment 409558 [details]
gcc-build-logs.tar.bz2
Comment 4 Anthony Basile gentoo-dev 2015-08-23 12:51:17 UTC
All of these errors are due to clashing declarations which should be taken care of by <string.h>.  From your emerge info though, it seems that you have gcc-4.8.4 already installed.  What triggered the rebuild is -debug%.  Can you play around with that flag and see if enabling/disabling makes a difference.  (I have access to ppc, but $real_life.)
Comment 5 SpanKY gentoo-dev 2015-08-23 18:15:16 UTC
you need to repo sync and get the latest patchset

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