Red Hat Bugzilla – Bug 509795
Unresolved allegro-dependency when linking with DevIL library
Last modified: 2009-07-15 13:34:54 EDT
Description of problem:
Trying to link a program against one of the DevIL-libraries results in an unresolved-symbol error, which only goes away by linking in allegro too. This is bad, because the program doesn't use allegro at all, and such a workaround is not needed on any other distro.
Version-Release number of selected component (if applicable):
Happens in Fedora 11, but was also reported in earlier versions.
Steps to Reproduce:
1. Link a program with DevIL, but not allegro
Linker fails due to unresolved symbols.
DevIL should either not depend on allegro, like in other distributions, or should be linked against it by itself.
This is based on numerous user reports, so I apologize in advance if I made something up here.
Thanks for the report. First of all, can you provide some more details,
such as which program you're trying to compile, and if possible compiler output,
or if you've only got users saying so but don't use Fedora yourself, some
simple build instructions ?
About what you're seeing your program is most likely using DevIL's ILUT
(this is the only part which requires allegro). Which can do things such as
create windows, get keyboard input for you, etc. If it is not, then you
should not use -lILUT while linking.
It can do this using either allegro or SDL and Fedora's version supports
The reason this makes it require allegro being linked into the binary using
it is that allegro uses some non PIC asm bits, which are part
of a library called liballeg_unsharable.a . Since libraries cannot contain non
PIC code, these bits need to put in the binary itself. So the fix
is to add -lalleg_unsharable when compiling on Fedora. I know this aint pretty,
but this is not Fedora specific (probably the other distro's have compiled DevIL without allegro support).
The good news is that liballeg_unsharable and does this problem is going away in
the next upstream allegro release for which allegro upstream currently has a testing release available.
The program in question was the Spring RTS engine (http://springrts.com/). We use SDL for window / input handling, and it turned out that linking ILUT was unnecessary, IL and ILU where the only parts needed. Sorry for the trouble.
And yes, I don't have any fedora installation to test, so unfortunately I cannot test. Also, bugreports weren't that detailed.
(In reply to comment #2)
> The program in question was the Spring RTS engine (http://springrts.com/). We
> use SDL for window / input handling, and it turned out that linking ILUT was
> unnecessary, IL and ILU where the only parts needed. Sorry for the trouble.
> And yes, I don't have any fedora installation to test, so unfortunately I
> cannot test. Also, bugreports weren't that detailed.
Ok, thanks for letting me know this is fixed now, closing this bug.