roc-streaming / roc-toolkit

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

No package 'libuv' found while cross-compiling #338

Closed zapphyre closed 4 years ago

zapphyre commented 4 years ago

Hi guys! I'm trying to install ROC on my RPI so, I'm just following the cookbook steps. While cross-compiling, I get the following error:

$ sudo docker run -t --rm -u "${UID}" -v "${PWD}:${PWD}" -w "${PWD}" rocproject/cross-arm-linux-gnueabihf scons -Q --disable-pulseaudio --disable-tests --host=arm-linux-gnueabihf --build-3rdparty=uv,openfec,alsa,sox
Package libuv was not found in the pkg-config search path.
Perhaps you should add the directory containing `libuv.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libuv' found
error: libuv not found (see 'config.log' for details)
$ cat config.log 
file /run/media/tepo/data/roc/SConstruct,line 478:
    Configure(confdir = .sconf_temp)
scons: Configure: Searching CXX executable... 
scons: Configure: (cached) /opt/toolchain/bin/arm-linux-gnueabihf-g++

scons: Configure: Searching CONFIG_GUESS script... 
scons: Configure: (cached) /usr/share/misc/config.guess

scons: Configure: Searching CC executable... 
scons: Configure: (cached) /opt/toolchain/bin/arm-linux-gnueabihf-gcc-7.4.1

scons: Configure: Searching CXXLD executable... 
scons: Configure: (cached) /opt/toolchain/bin/arm-linux-gnueabihf-g++

scons: Configure: Searching CCLD executable... 
scons: Configure: (cached) /opt/toolchain/bin/arm-linux-gnueabihf-gcc-7.4.1

scons: Configure: Searching AR executable... 
scons: Configure: (cached) /opt/toolchain/bin/arm-linux-gnueabihf-ar

scons: Configure: Searching RANLIB executable... 
scons: Configure: (cached) /opt/toolchain/bin/arm-linux-gnueabihf-ranlib

scons: Configure: Searching STRIP executable... 
scons: Configure: (cached) /opt/toolchain/bin/arm-linux-gnueabihf-strip

file /run/media/tepo/data/roc/SConstruct,line 732:
    Configure(confdir = .sconf_temp)
scons: Configure: Checking for C library uv... 
.sconf_temp/conftest_0.c <-
  |
  |#include <stdio.h>
  |#include <uv.h>
  |
  |int main() {
  |    printf("%d\n", (int)(1));
  |    return 0;
  |}
  |
       CC   .sconf_temp/conftest_0.c
.sconf_temp/conftest_0.c:3:10: fatal error: uv.h: No such file or directory
 #include <uv.h>
          ^~~~~~
compilation terminated.
scons: Configure: no

I'm on Archlinux now.

Appreciate your help and thank you for great efforts!!

gavv commented 4 years ago

Hi, thanks for reporting!

We have changed the dependency name from uv to libuv. We have also added libunwind dependency. So the correct list would be:

--build-3rdparty=libuv,libunwind,openfec,alsa,sox

(as documented here https://roc-project.github.io/roc/docs/building/user_cookbook.html)

This command works for me, could you try it?

docker run -t --rm -u "${UID}" -v "${PWD}:${PWD}" -w "${PWD}" rocproject/cross-arm-linux-gnueabihf scons -Q --disable-pulseaudio --disable-tests --host=arm-linux-gnueabihf --build-3rdparty=libuv,libunwind,openfec,alsa,sox

I think we should warn about unknown dependency names (like uv in your example) to avoid confusion. I'll prepare a patch for that.

gavv commented 4 years ago

I'll prepare a patch for that.

Pushed to develop: 694f7cc9e788e3ddb648f9f9d55c1fc70513dab7

zapphyre commented 4 years ago

worked and it's working great! (arch&mac -> arch@rpi) thanks!

gavv commented 4 years ago

Good to know!