Bug 218210 - dev-embedded/gpsim-0.22.0 fails to build with GCC 4.3
Bug#: 218210 Product:  Gentoo Linux Version: unspecified Platform: All
OS/Version: Linux Status: RESOLVED Severity: normal Priority: P2
Resolution: FIXED Assigned To: dev-embedded@gentoo.org Reported By: flameeyes@gentoo.org
Component: Ebuilds
URL: 
Summary: dev-embedded/gpsim-0.22.0 fails to build with GCC 4.3
Keywords:  
Status Whiteboard: 
Opened: 2008-04-18 05:14 0000
Description:   Opened: 2008-04-18 05:14 0000
x86_64-pc-linux-gnu-g++ -DHAVE_CONFIG_H -I. -I.. -I/usr/include/glib-2.0
-I/usr/lib64/glib-2.0/include -march=athlon64 -O2 -ftracer -pipe
-ftree-vectorize -Wno-error -Wformat=2 -g -ggdb -Wstrict-aliasing=2
-fvisibility-inlines-hidden -MT parse.lo -MD -MP -MF .deps/parse.Tpo -c
parse.cc  -fPIC -DPIC -o .libs/parse.o
In file included from ../src/registers.h:34,
                 from ../src/ui.h:11,
                 from ../src/cmd_gpsim.h:5,
                 from misc.h:24,
                 from parse.yy:33:
../src/value.h: In function ‘bool operator!=(String&, String&)’:
../src/value.h:590: error: ‘strcmp’ was not declared in this scope
parse.cc: In function ‘int yyparse()’:
parse.cc:2802: warning: deprecated conversion from string constant to
‘char*’
parse.cc:2806: warning: deprecated conversion from string constant to
‘char*’
parse.cc:2927: warning: deprecated conversion from string constant to
‘char*’
make[2]: *** [parse.lo] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2

But this is just the point of the iceberg. There is a definition error between
a list method and std::list. Lovely that they destroy the whole idea of
namespaces by "using namespace std". I don't really want to start changing
gpsim sources all over to drop the using namespace, nor I'd like to change the
name of the method. I'm afraid to say, work it out with upstream :/

------- Comment #1 From Peter Alfredsen 2008-04-18 16:08:53 0000 -------
Upstream bug:
http://sourceforge.net/tracker/index.php?func=detail&aid=1945925&group_id=2341&atid=102341

------- Comment #2 From Arseny Solokha 2008-04-22 13:00:16 0000 -------
Created an attachment (id=150587) [details]
Can my patch be useful?

------- Comment #3 From Denis Dupeyron 2008-04-22 13:03:41 0000 -------
(In reply to comment #2)
> Created an attachment (id=150587) [edit] [details]
> Can my patch be useful?

Definitely. I have just emerged gcc-4.3 and I'm processing all the related bugs
right now. So this will be fixed sooner rather than later.

Denis.

------- Comment #4 From Denis Dupeyron 2008-04-28 22:00:52 0000 -------
(In reply to comment #2)
> Created an attachment (id=150587) [edit] [details]
> Can my patch be useful?

Does your patch fully fix compiling with gcc-4.3 for you ? Here it doesn't seem
to be enough, I'm hitting the following error:

In file included from scan.ll:45:
../src/processor.h:567: error: declaration of 'virtual void
Processor::list(unsigned int, unsigned int, int, int)'
/usr/lib/gcc/i686-pc-linux-gnu/4.3.0/include/g++-v4/bits/stl_list.h:417: error:
changes meaning of 'list' from 'class std::list<ProgramMemoryAccess*,
std::allocator<ProgramMemoryAccess*> >'

Denis.

------- Comment #5 From GerbilSoft 2008-05-30 02:32:59 0000 -------
Created an attachment (id=154781) [details]
gpsim-0.22.0 gcc-4.3 patch

This patch fixes all the gcc-4.3 compile problems in gpsim-0.22.0, including
missing <typeinfo> headers and the std::list conflict.

------- Comment #6 From Denis Dupeyron 2008-06-17 11:33:29 0000 -------
Fixed, thanks a lot.

Denis.