Bug 509795 - Unresolved allegro-dependency when linking with DevIL library
Unresolved allegro-dependency when linking with DevIL library
Status: CLOSED NOTABUG
Product: Fedora
Classification: Fedora
Component: DevIL (Show other bugs)
11
All Linux
low Severity medium
: ---
: ---
Assigned To: Hans de Goede
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2009-07-06 05:18 EDT by k-r.ernst
Modified: 2009-07-15 13:34 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-07-15 13:34:54 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description k-r.ernst 2009-07-06 05:18:49 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

Actual results:
Linker fails due to unresolved symbols.

Expected results:
DevIL should either not depend on allegro, like in other distributions, or should be linked against it by itself.

Additional info:
This is based on numerous user reports, so I apologize in advance if I made something up here.
Comment 1 Hans de Goede 2009-07-06 05:34:26 EDT
Hi,

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
both methods.

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.
Comment 2 k-r.ernst 2009-07-15 10:05:50 EDT
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.
Comment 3 Hans de Goede 2009-07-15 13:34:54 EDT
(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.

Note You need to log in before you can comment on or make changes to this bug.