Bug 130374 - Updates to make sys-cluster/charm-5.9 work with GCC 4.1.0.
Bug#: 130374 Product:  Gentoo Linux Version: 2005.1 Platform: All
OS/Version: Linux Status: RESOLVED Severity: enhancement Priority: P2
Resolution: FIXED Assigned To: markusle@gentoo.org Reported By: gentoo@gecka.us
Component: Ebuilds
URL: 
Summary: Updates to make sys-cluster/charm-5.9 work with GCC 4.1.0.
Keywords:  
Status Whiteboard: 
Opened: 2006-04-18 09:32 0000
Description:   Opened: 2006-04-18 09:32 0000
(Side note: This package uses 'smp' as the use flag for enabling threading
rather than 'threads')


charm-5.9/net-linux/tmp/MsgPacker.h, line 86:
        MsgPacker::MsgPacker(CkQ<char *> &msgq, int n_msgs);

This file is generated from: src/ck-com/MsgPacker.h

Removing "MsgPacker::" from this line allows this build to compile using GCC
4.1.0 and GCC 3.4.5.





Tail end of the failing emerge:

make[2]: Leaving directory
`/var/tmp/portage/charm-5.9/work/charm-5.9/net-linux/tmp/libs/ck-libs/multicast'
../bin/charmc  -march=athlon-tbird -Os -pipe -fomit-frame-pointer  -c -I.
ComlibManager.C
MsgPacker.h:86: error: extra qualification 'MsgPacker::' on member 'MsgPacker'
Fatal Error by charmc in directory
/var/tmp/portage/charm-5.9/work/charm-5.9/net-linux/tmp
   Command g++ -fPIC -Wno-deprecated -I../bin/../include -D__CHARMC__=1 -I.
-march=athlon-tbird -Os -pipe -fomit-frame-pointer -c ComlibManager.C -o
ComlibManager.o returned error code 1
charmc exiting...
make[1]: *** [ComlibManager.o] Error 1
make[1]: Leaving directory
`/var/tmp/portage/charm-5.9/work/charm-5.9/net-linux/tmp'
make: *** [charm++] Error 2
-------------------------------------------------
Charm++ NOT BUILT. Either cd into net-linux/tmp and try
to resolve the problems yourself, visit
    http://charm.cs.uiuc.edu/
for more information. Otherwise, email the developers at ppl@cs.uiuc.edu

!!! ERROR: sys-cluster/charm-5.9 failed.
Call stack:
  ebuild.sh, line 1532:   Called dyn_compile
  ebuild.sh, line 929:   Called src_compile
  charm-5.9.ebuild, line 82:   Called die

!!! Failed to build charm++
!!! If you need support, post the topmost build error, and the call stack if
relevant.

------- Comment #1 From Markus Dittrich 2006-04-18 10:12:09 0000 -------
Hi Brady,

Thank you very much for your note! I just checked the latest CVS
snapshot, and the change you indicated is already in cvs head. 
I'll check if I notice any additional gcc-4.1 specific fixes and merge
them into a cumulative patch if necessary.

Best,
Markus

------- Comment #2 From Markus Dittrich 2006-04-19 16:48:52 0000 -------
Created an attachment (id=84987) [details]
patch to fix compile problems with gcc4

Could you please give the attached patch a spin; it works for me.
It pretty much consists of your fix plus a few missing virtual destructors
that could cause problems down the road.

Thanks,
Markus

------- Comment #3 From Brady Catherman 2006-04-20 11:01:28 0000 -------
Worked great! =)

I just added an epatch line and it flied right through =)

Thanks for the help with this! =)

------- Comment #4 From Markus Dittrich 2006-04-20 19:59:56 0000 -------
Hi Brady,

Thank you very much for testing and the fix is
in cvs.

best,
Markus