Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[1.x] Please install .pc file for easy discoverability #3523

Open
yurivict opened this issue Feb 28, 2025 · 3 comments
Open

[1.x] Please install .pc file for easy discoverability #3523

yurivict opened this issue Feb 28, 2025 · 3 comments
Labels
enhancement multistream Related to Janus 1.x

Comments

@yurivict
Copy link

yurivict commented Feb 28, 2025

The ustream project that uses janus fails to find the janus headers:
In file included from src/acap.c:43:
In file included from src/logging.h:23:
/usr/local/include/janus/plugins/plugin.h:162:10: fatal error: 'refcount.h' file not found
162 | #include "refcount.h"
| ^~~~~~~~~~~~
1 error generated.

This is because janus doesn't provide any way to discover it or to determine what CFLAGS does it need.

The actual reason is that this CFLAGS argument is missing: -I$(PREFIX)/include/janson.

CFLAGS and LDFLAGS should be supplied by the .pc file so that pkg-config --cflags --libs janus would print all necessary flags.

@mdevaev
Copy link
Contributor

mdevaev commented Mar 1, 2025

If I will use I$(PREFIX)/include/janus, I will loose ability to include header with janus/ path part like #include <janus/debug.h> and I'll have to do #include <debug.h>. This is quite inconvenient because the file name is too general and may overlap with something else.

I have my own Janus package for Arch in which after make install I'm doing a path replacement like:

sed -i -e 's|^#include "refcount.h"$|#include "../refcount.h"|g' "$pkgdir/usr/include/janus/plugins/plugin.h"

It looks like a bug because in a similar situation src/events/eventhandler.h uses a relative include: #include "../utils.h"

@lminiero
Copy link
Member

lminiero commented Mar 3, 2025

I don't have any immediate plan to provide .pc files, but I'll add the enhancement tag to this issue and keep it open so that we don't forget it may be useful to have in the future. Of course PRs we can evaluate are always welcome.

@mdevaev
Copy link
Contributor

mdevaev commented Mar 3, 2025

@lminiero PR is here: #3525

It's just a build fix, but I didn't write .pc because I personally don't really need it right now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement multistream Related to Janus 1.x
Projects
None yet
Development

No branches or pull requests

3 participants