[AD] [ alleg-Bugs-2751286 ] pkg-config static libraries don't work |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
- To: noreply@xxxxxxxxxx
- Subject: [AD] [ alleg-Bugs-2751286 ] pkg-config static libraries don't work
- From: "SourceForge.net" <noreply@xxxxxxxxxx>
- Date: Sat, 18 Jul 2009 00:36:59 +0000
Bugs item #2751286, was opened at 2009-04-11 11:14
Message generated for change (Settings changed) made by tjaden
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: Closed
>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: Peter Wang (tjaden)
Date: 2009-07-17 11:30
Message:
Works now except kcm_audio doesn't pull in ALSA, etc.
----------------------------------------------------------------------
Comment By: Peter Wang (tjaden)
Date: 2009-07-08 07:54
Message:
Reopening as it's still not quite right. e.g. in the following
a5_iio-static-profile pulls in the shared version of liballegro-profile,
not the static library.
% pkg-config --libs a5_iio-static-profile-4.9
-L/usr/local/stow/allegro-4.9.12/lib -la5_iio-profile-static-4.9.12
-lallegro-profile-4.9.12
----------------------------------------------------------------------
Comment By: Elias Pschernig (elias)
Date: 2009-05-07 03: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 23: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 23: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