Attention is currently required from: neels.
laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-pfcp/+/31760 )
Change subject: libosmo-pfcp.pc: move libosmogsm to Requires ......................................................................
Patch Set 1:
(1 comment)
Patchset:
PS1:
And indeed, the linker command while building libosmo-pfcp seems to be: […]
So in libosmoi-pfcp/Makefile.am you are
* including LIBOSMOGSM_LIBS in AM_LDFLAGS (where it doesn't belong, but let's set that aside for now) * then overriding those flags by using libosmo_pfcp_la_LDFLAGS *without* including LDFLAGS. So all other programs/libraries/targets (that don't have a prog_name_LDFLAGS) will be linked against libosmocore, but not the library itself
As a result, you have a library that depens on other librarires, but which doesn't express this dependency to the dynamic linker at runtime.
pkg-config can't fix that. pkg-config is just metadata for easy discovery of linker flags / cflags, and it has to assume the libraries are correctly linked in the first place.