Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 549300 - dev-cpp/gccxml-0.9.0_pre20131217 fails to build with gcc-5.1 - toplev.c error: redefinition of ‘exact_log2’
Summary: dev-cpp/gccxml-0.9.0_pre20131217 fails to build with gcc-5.1 - toplev.c error...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] GCC Porting (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: C++ Team [disbanded]
URL: https://github.com/gccxml/gccxml/issu...
Whiteboard:
Keywords:
Depends on:
Blocks: gcc-5
  Show dependency tree
 
Reported: 2015-05-12 21:01 UTC by Petros
Modified: 2016-04-02 21:25 UTC (History)
0 users

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


Attachments
build.log (dev-cpp:gccxml-0.9.0_pre20131217:20150512-203021.log,969.96 KB, text/plain)
2015-05-12 21:01 UTC, Petros
Details
emerge --info (info,28.81 KB, text/plain)
2015-05-12 21:02 UTC, Petros
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Petros 2015-05-12 21:01:30 UTC
Created attachment 403156 [details]
build.log

The above package can't be built with GCC 5.1.0.

There is no problem when it is compiled with GCC 4.9.2
Comment 1 Petros 2015-05-12 21:02:16 UTC
Created attachment 403158 [details]
emerge --info
Comment 2 Denis Kaganovich 2015-07-14 14:20:43 UTC
Use "-std=gnu89" cflag (old default). New default is gnu11.
Comment 3 Gert Wollny 2015-08-05 21:04:30 UTC
Please note that gccxml has been abandoned in favour of castxml: 

  https://github.com/CastXML/CastXML

See also the relevant discussion in Debian: 

  http://comments.gmane.org/gmane.linux.debian.devel.bugs.general/1272091
Comment 4 Toralf Förster gentoo-dev 2015-12-16 20:42:37 UTC
* Package:    dev-cpp/gccxml-0.9.0_pre20131217
failed here too at the tinderbox image amd64-13.0-unstable_20151211-113822 while revdep-rebuilding after gcc-5 upgrade:

[ 72%] Building C object GCC/gcc/CMakeFiles/backend.dir/toplev.c.o
cd /var/tmp/portage/dev-cpp/gccxml-0.9.0_pre20131217/work/gccxml-0.9.0_pre20131217_build/GCC/gcc && /usr/bin/x86_64-pc-linux-gnu-gcc  -DALMOST_STDC -DHAVE_CONFIG_H -DIN_GCC -I/var/tmp/portage/dev-cpp/gccxml-0.9.0_pre20131217/work/gccxml-0.9.0_pre20131217_build/GCC/gcc -I/var/tmp/portage/dev-cpp/gccxml-0.9.0_pre20131217/work/gccxml-0.9.0_pre20131217/GCC/gcc/config -I/var/tmp/portage/dev-cpp/gccxml-0.9.0_pre20131217/work/gccxml-0.9.0_pre20131217/GCC/gcc -I/var/tmp/portage/dev-cpp/gccxml-0.9.0_pre20131217/work/gccxml-0.9.0_pre20131217/GCC/libdecnumber -I/var/tmp/portage/dev-cpp/gccxml-0.9.0_pre20131217/work/gccxml-0.9.0_pre20131217/GCC/libcpp/include -I/var/tmp/portage/dev-cpp/gccxml-0.9.0_pre20131217/work/gccxml-0.9.0_pre20131217/GCC/include   -DNDEBUG -march=native -O2 -pipe   -w   -DTARGET_NAME=x86_64-unknown-linux-gnu -o CMakeFiles/backend.dir/toplev.c.o -c /var/tmp/portage/dev-cpp/gccxml-0.9.0_pre20131217/work/gccxml-0.9.0_pre20131217/GCC/gcc/toplev.c
/var/tmp/portage/dev-cpp/gccxml-0.9.0_pre20131217/work/gccxml-0.9.0_pre20131217/GCC/gcc/toplev.c:546:1: error: redefinition of ‘floor_log2’
 floor_log2 (unsigned HOST_WIDE_INT x)
 ^
In file included from /var/tmp/portage/dev-cpp/gccxml-0.9.0_pre20131217/work/gccxml-0.9.0_pre20131217/GCC/gcc/toplev.c:59:0:
/var/tmp/portage/dev-cpp/gccxml-0.9.0_pre20131217/work/gccxml-0.9.0_pre20131217/GCC/gcc/toplev.h:174:1: note: previous definition of ‘floor_log2’ was here
 floor_log2 (unsigned HOST_WIDE_INT x)
 ^
Comment 5 Pacho Ramos gentoo-dev 2015-12-25 11:23:37 UTC
wasn't this caused by missing emerge -e world after gcc5 update?
Comment 6 SpanKY gentoo-dev 2016-01-12 17:01:37 UTC
most likely due to change in default standard.  this package looks like a snapshot of older gcc, so you can probably workaround it by adding to the ebuild:
  append-flags -std=gnu89
Comment 7 David Seifert gentoo-dev 2016-04-02 21:25:01 UTC
I've committed the usual gnu89 inline fix. I'm closing the bug, as the fix can't be upstreamed and the issue is solved for Gentoo.

commit fec653cc75b95b4cbf48e16f1c0bf7999454f54c
Author: David Seifert <soap@gentoo.org>
Date:   Sat Apr 2 23:22:31 2016 +0200

    dev-cpp/gccxml: add -std=gnu89 to CFLAGS to restore pre-GCC5 semantics
    
    Gentoo-Bug: 549300
    * EAPI=6