Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 179843 - media-libs/devil uses invalid typedef to void for argumentless functions
Summary: media-libs/devil uses invalid typedef to void for argumentless functions
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] GCC Porting (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Games
URL:
Whiteboard:
Keywords:
: 208402 (view as bug list)
Depends on:
Blocks: gcc-4.2
  Show dependency tree
 
Reported: 2007-05-26 07:46 UTC by Philipp
Modified: 2008-02-01 10:29 UTC (History)
4 users (show)

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


Attachments
Changes (ILvoid) to (void) (devil_void.patch,49.23 KB, patch)
2007-05-26 07:47 UTC, Philipp
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Philipp 2007-05-26 07:46:28 UTC
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() {}
Comment 1 Philipp 2007-05-26 07:47:23 UTC
Created attachment 120348 [details, diff]
Changes (ILvoid) to (void)
Comment 2 Attila Fazekas 2007-06-04 12:42:43 UTC
I changed typedef to 
#define ILvoid void

Comment 3 Ryan Hill (RETIRED) gentoo-dev 2007-06-06 03:23:07 UTC
might want to change the homepage to http://openil.sourceforge.net/ too (unless of course you enjoy hentai links). ;)

this patch appears correct.
Comment 4 Mr. Bones. (RETIRED) gentoo-dev 2007-06-06 03:59:53 UTC
In portage.  Thanks for checking it out.

http://www.imagelib.org/ works fine for me so I left that as the homepage.
Comment 5 James Ausmus 2007-08-14 17:16:20 UTC
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
Comment 6 Tristan Heaven (RETIRED) gentoo-dev 2007-08-14 17:21:58 UTC
done
Comment 7 Tristan Heaven (RETIRED) gentoo-dev 2008-02-01 10:29:55 UTC
*** Bug 208402 has been marked as a duplicate of this bug. ***