DevIL does something like the following: typedef void ILvoid; ILvoid some_devil_func(ILvoid); The last ILvoid is illegal as void is only a special case to describe an argumentless function in C. C++'s syntax disallows the use of a typedef here to denote this special case. So every C++ packet that includes any of devil's headers is affected. To fix the problem every (ILvoid) must be replaced with (void) before emerging devil. This could be done with a sed script or a patch which I will add here. Reproducible: Always Steps to Reproduce: 1. use gcc-4.2 2. emerge devil. 3. try to compile with g++: #include <IL/il.h> int main() {}
Created attachment 120348 [details, diff] Changes (ILvoid) to (void)
I changed typedef to #define ILvoid void
might want to change the homepage to http://openil.sourceforge.net/ too (unless of course you enjoy hentai links). ;) this patch appears correct.
In portage. Thanks for checking it out. http://www.imagelib.org/ works fine for me so I left that as the homepage.
Why did this not cause a revision bump? I'm running into this issue with media-libs/devil-1.6.7-r1 installed from 2006-11-20, and it is the latest version available in Portage. I tried to update cegui, but it failed due to the ILvoid issues mentioned above - I'm now using gcc-4.2.0. As more people switch to gcc-4.2.x, there are going to be a lot of compile failures due to this - can the revision be bumped so that this gets picked up in updates, instead of having to break a compile and have the user try to hunt down the issue, and be confused as to why it's not already fixed? -James
done
*** Bug 208402 has been marked as a duplicate of this bug. ***