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

Take headers and lib from pkg-config #4

Closed
Asalle opened this issue Nov 9, 2019 · 16 comments · Fixed by #40
Closed

Take headers and lib from pkg-config #4

Asalle opened this issue Nov 9, 2019 · 16 comments · Fixed by #40
Assignees
Labels
enhancement New feature or request

Comments

@Asalle
Copy link
Collaborator

Asalle commented Nov 9, 2019

Currently we have hardcoded /usr/lib/roc path that is not always where you have your headers/lib. Let's take that info from pkg-config.

@gavv
Copy link
Member

gavv commented Nov 16, 2019

I've updated roc-streaming/roc-toolkit#271

@Asalle

This comment has been minimized.

@gavv

This comment has been minimized.

@Asalle

This comment has been minimized.

@gavv

This comment has been minimized.

@Asalle Asalle added the blocked label Dec 15, 2019
@Asalle

This comment has been minimized.

@gavv
Copy link
Member

gavv commented May 15, 2020

.pc generation & installation landed in develop branch. scons install will now install roc.pc.

cc @fusuiyi123

@Asalle
Copy link
Collaborator Author

Asalle commented May 15, 2020 via email

@Asalle Asalle removed the blocked label May 19, 2020
@gavv gavv added the enhancement New feature or request label Jun 3, 2020
@Asalle
Copy link
Collaborator Author

Asalle commented Jun 6, 2020

now that I've looked into it, is this feature relevant? The only place where we use the C includes are comments like

/*
#include <roc/address.h>
*/
import "C"

which work regardless if one uses pkg-config or just installed them with their distribution's package manager.

@gavv
Copy link
Member

gavv commented Jun 7, 2020

If the user installed roc into a prefix which is not in default include or library search path list, compilation will fail. pkg-config will solve this issue.

A real-world examples. When you're using SoX library you should write:

#include <sox.h>

On most distros, sox.h is located at /usr/include/sox.h and include works without any pkg-config.

However, on some CentOS version, for some reason maintainers decided to install that file at /usr/include/sox/sox.h. On those CentOS systems pkg-config for SoX returns -I/usr/include/sox. If you're using pkg-config, everything works, but without it your include fails.

So yes, we still need pkg-config, though it's not critical.

Note that pkg-config generation is currently available only in develop, while bindings are using master.

@gavv
Copy link
Member

gavv commented Jun 7, 2020

Example of using pkg-config with cgo: https://github.com/aam335/speexdsp/blob/master/speexdsp.go#L4

@gavv gavv added good first issue Good for newcomers hacktoberfest help wanted Contributions are welcome labels Sep 28, 2020
@gavv gavv removed the hacktoberfest label Dec 3, 2020
@Asalle
Copy link
Collaborator Author

Asalle commented Jan 2, 2021

cool, then I'll test it locally with develop, push to a branch and create a pr later when the changes will be available on master (they are still not there as of now)

@gavv
Copy link
Member

gavv commented Jan 4, 2021

We'll also need to migrate bindings to new api from 0.2.

@gavv
Copy link
Member

gavv commented Jan 4, 2021

I guess we need a separate issue and branch for that.

@Asalle
Copy link
Collaborator Author

Asalle commented Jan 18, 2021

@gavv did you release 0.2 already? cannot find it anywhere

@gavv
Copy link
Member

gavv commented Jan 23, 2021

@Asalle Hi, no, 0.2 isn't released yet. It's still in the develop branch. The API of 0.2 is mostly stabilized; it will be changed a bit before final release, but I expect only minor changes. So I think we can start migration of bindings to 0.2, maybe in a separate branch (maybe also call it develop for convenience).

@gavv gavv removed good first issue Good for newcomers help wanted Contributions are welcome labels May 7, 2021
@gavv gavv mentioned this issue Dec 23, 2022
@gavv gavv self-assigned this Dec 23, 2022
@gavv gavv linked a pull request Feb 2, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants