Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 51821 - galib doesn't compile due to template errors
Summary: galib doesn't compile due to template errors
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Science Related Packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-05-23 06:47 UTC by Nick Hofstede
Modified: 2004-05-27 06:38 UTC (History)
0 users

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


Attachments
Patches the source as specified in the mail to make it compile with gcc 3.3 (patch-gcc3.patch,5.13 KB, patch)
2004-05-23 06:49 UTC, Nick Hofstede
Details | Diff
files/patch-gcc3.patch (patch-gcc3.patch,5.13 KB, patch)
2004-05-23 07:22 UTC, Nick Hofstede
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Nick Hofstede 2004-05-23 06:47:34 UTC
gcc3.3 is more standards-conformant and refuses to compile galib due to wrong template code

Reproducible: Always
Steps to Reproduce:
1.emerge galib

Actual Results:  
In file included from ex21.C:17:
../ga/GARealGenome.h:59: error: ISO C++ forbids declaration of `allele' with no
   type
../ga/GARealGenome.h:59: error: template-id `allele<>' for `int
   GAAlleleSet<float>::allele(unsigned int) const' does not match any template
   declaration
../ga/GARealGenome.h:59: error: syntax error before `{' token
../ga/GARealGenome.h:65: error: `n' was not declared in this scope
../ga/GARealGenome.h:66: error: parse error before `if'
../ga/GARealGenome.h:69: error: ISO C++ forbids declaration of `value' with no
   type
../ga/GARealGenome.h:69: error: `core' was not declared in this scope
../ga/GARealGenome.h:69: error: `i' was not declared in this scope
../ga/GARealGenome.h:69: error: `core' was not declared in this scope
../ga/GARealGenome.h:70: error: parse error before `if'
../ga/GARealGenome.h:74: error: ISO C++ forbids declaration of `value' with no
   type
../ga/GARealGenome.h:74: error: redefinition of `int value'
../ga/GARealGenome.h:69: error: `int value' previously defined here
../ga/GARealGenome.h:74: error: `core' was not declared in this scope
../ga/GARealGenome.h:75: error: parse error before `}' token
{standard input}: Assembler messages:
{standard input}:21: Error: symbol `value' is already defined
make[1]: *** [ex21.o] Error 1
make[1]: Leaving directory
`/var/tmp/portage/galib-2.4.5/work/galib245/examples'make: *** [all] Error 2
 
!!! ERROR: dev-libs/galib-2.4.5 failed.
!!! Function src_compile, Line 19, Exitcode 2
!!! make failed
 


Expected Results:  
install 

solution for this error:
http://mailman.mit.edu/pipermail/galib/2003-December/000896.html
Comment 1 Nick Hofstede 2004-05-23 06:49:11 UTC
Created attachment 31887 [details, diff]
Patches the source as specified in the mail to make it compile with gcc 3.3
Comment 2 Nick Hofstede 2004-05-23 06:51:56 UTC
added the following line in the ebuild in the function src_compile():
epatch ${FILESDIR}/patch-gcc3.patch

This works, but I'm sure it isn't the correct way to apply patches in an ebuild. Could someone please do this the right way?
Comment 3 Nick Hofstede 2004-05-23 07:21:44 UTC
Oops ... patch was wrong ...
attaching good patch ...
ebuild just needs to be cleaned up now before it can get committed
Comment 4 Nick Hofstede 2004-05-23 07:22:47 UTC
Created attachment 31889 [details, diff]
files/patch-gcc3.patch
Comment 5 Patrick Kursawe (RETIRED) gentoo-dev 2004-05-27 06:38:17 UTC
Well, I preferred to add prototypes to the header instead of moving the implementation there, but thanks for reporting this and even providing a workaround! CVS revision 1.3 should fix this.