Re: problem with non PIC code
#include <hallo.h>
* Alexandre Pineau [Sun, Feb 15 2004, 12:40:28PM]:
> The allegro's maintainer suggests to me that "I need to ensure the
> executable wich need alogg links with alleg_unsharable and exports
> its symbols to the library alogg with -rdynamic". But I don't know how
> to do this.
> - The executable (Ire) links with alleg_unsharable.
Okay.
> - If I have well understanded, I must build libalogg without alleg_unsharable.
No. alleg_unsharable contains non-PIC code (x86-optimised object files).
> I try to do it with the option --warn-unresolved-symbols but after I fail to build
> IRE due to unresolved symbols (normal, after all). Any ideas?
You must link the application with that what `allegro-config --libs`
gives you but you must NOT use exactly this to link the library. You can
weed out following components from its output, then it should be okay:
-lalleg_unsharable -lXxf86dga -lXxf86vm -lXext -lX11
If your lib fails to link because of references to Xf86... symbols,
than your upstream simply expects that static X libs are linked with the
lib. In this case you would have to add the libraries from xlibs-pic
package to the linker call.
Regards,
Eduard (former Allegro maintainer ;).
Reply to: