[AD] [ alleg-Bugs-2751286 ] pkg-config static libraries don't work

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


Bugs item #2751286, was opened at 2009-04-11 01:14
Message generated for change (Comment added) made by elias
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105665&aid=2751286&group_id=5665

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: 4.9
Status: Open
Resolution: Fixed
Priority: 4
Private: No
Submitted By: Peter Wang (tjaden)
Assigned to: Nobody/Anonymous (nobody)
Summary: pkg-config static libraries don't work

Initial Comment:
$(pkg-config --libs --static allegro-4.9) doesn't actually work. The
problem is that pkg-config will spit out -lallegro-4.9 when our static
library is called liballegro-static-4.9.a.  But also pkg-config isn't
smart enough to write the full path to the .a file, so if you have
liballegro-static-4.9.so installed as well that will be used instead.


----------------------------------------------------------------------

>Comment By: Elias Pschernig (elias)
Date: 2009-05-06 17:10

Message:
Even with the same name it would pick the wrong one (libfoo.so instead of
libfoo.a). pkg-config basically is not very well designed from the
beginning (or at least with no thought about static linking) - but it still
is really useful for the bit it does right.

Do you know of any project which uses pkg-config to enable static linking,
without using separate .pc files? If so, we can look how they do it of
course. But I don't see any solution.

----------------------------------------------------------------------

Comment By: Thomas Fjellstrom (strangemoose)
Date: 2009-05-06 13:58

Message:
I think it expects that libs have the same name (and probably should on
linux, I don't see a need for them to have different base names imo).

Whats the reason for them having different names again? libfoo.so is the
shared lib and libfoo.a is the static lib in most cases.

----------------------------------------------------------------------

Comment By: Elias Pschernig (elias)
Date: 2009-05-06 13:01

Message:
I think pkg-config is too dumb to do this right - the only way is to have
separate packages for static and dynamic versions so I changed it to do
that. Now you can do:

"pkg-config --libs --static allegro-static-4.9" and it should work as
intended.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105665&aid=2751286&group_id=5665




Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/