roc-streaming / roc-toolkit

Real-time audio streaming over the network.
https://roc-streaming.org
Mozilla Public License 2.0
1.02k stars 203 forks source link

Using libuuid to generate uuids #701

Open nolan-veed opened 4 months ago

nolan-veed commented 4 months ago

Why

For https://github.com/roc-streaming/roc-toolkit/issues/692

What

Testing

Added a success test case. Failure test case panics - so can't add one.

github-actions[bot] commented 4 months ago

:robot: Upon creation, pull request description does not have a link to an issue. If there is a related issue, please add it to the description using any of the supported formats.

nolan-veed commented 4 months ago

@gavv I'm assuming, we'll need to adjust the dockerfiles repo to install libuuid where available? Any suggestions on which envs should have them?

gavv commented 4 months ago

I'm assuming, we'll need to adjust the dockerfiles repo to install libuuid where available? Any suggestions on which envs should have them?

Yes. I think it can be added to all envs except env-ubuntu:nolibs (which is used to test build when no system dependencies are pre-installed).

I guess it'd be same as https://github.com/roc-streaming/dockerfiles/pull/17/files


Also, we need to add libuuid to build-3rdparty.py: https://github.com/roc-streaming/roc-toolkit/blob/develop/scripts/scons_helpers/build-3rdparty.py

(The task has a link to example PR that adds a dependency there)

build-3rdparty.py will be used when you run scons --build-3rdparty=libuuid or scons --build-3rdparty=all.

On CI, we should use --build-3rdparty=libuuid in cross-compilations steps.

nolan-veed commented 3 months ago

Also, we need to add libuuid to build-3rdparty.py: https://github.com/roc-streaming/roc-toolkit/blob/develop/scripts/scons_helpers/build-3rdparty.py

I didn't understand this. Can you confirm that we should be building libuuid from source? Shouldn't we just be using what the distro has provided? I thought we were just either using the distro's libuuid or providing the ability to disable it.

(Happy to try and build it from source, if needed.)

gavv commented 2 months ago

Hi, sorry for delay.

I didn't understand this. Can you confirm that we should be building libuuid from source? Shouldn't we just be using what the distro has provided? I thought we were just either using the distro's libuuid or providing the ability to disable it.

Yes, but that's not done by default though.

We have --build-3rdparty option: https://roc-streaming.org/toolkit/docs/building/developer_cookbook.html#building-dependencies

When it's used, internally we call 3rdparty.py script with a dozen of options.

User can tell scons to build any dependency of roc (or all of them).

It is particularly useful in two cases:

This option exists just for convenience - this makes building roc from sources much easier for most users.

In case of libuuid, I think it is available in every distro, so the main use case for auto-building it will be using --build-3rdparty=all when cross-compiling, e.g. like described here: https://roc-streaming.org/toolkit/docs/building/user_cookbook.html#linux-cross-compile

gavv commented 1 month ago

Hi, I see that it's still WIP, just a few remarks:

nolan-veed commented 1 month ago

Hi, I see that it's still WIP, just a few remarks:

Thanks for this. I'll pick it up.