EricssonResearch / cerbero

OpenWebRTC cerbero fork
GNU Lesser General Public License v2.1
19 stars 58 forks source link

Cross Compiling Pulse Issues for Ubuntu ARMv7 #56

Closed bitdivision closed 5 years ago

bitdivision commented 8 years ago

Hi,

I'm trying to cross-compile openWebRTC for a wandboard (i.MX6) running Ubuntu 14.04, on an Ubuntu 14.04 VM host.

I'm running into issues around pulseaudio, Namely, while building gst-plugins-good-1.0-static, I receive the following error:

Recipe 'gst-plugins-good-1.0-static' failed at the build step 'post_install'
Traceback (most recent call last):
  File "./cerbero/build/oven.py", line 143, in _cook_recipe
    stepfunc()
  File "/home/vagrant/cerbero/recipes/custom.py", line 91, in post_install
    shutil.copyfile(src, dest)
  File "/usr/lib/python2.7/shutil.py", line 82, in copyfile
    with open(src, 'rb') as fsrc:
IOError: [Errno 2] No such file or directory: '/home/vagrant/cerbero/sources/linux_armv7/gst-plugins-good-1.0-static-1.7/static-build/home/vagrant/cerbero/dist/linux_armv7/lib/gstreamer-1.0/libgstpulse.a'

I've been quizzing people in IRC about this but not had any luck so far.

The error is strange since libpulse and libpulse-dev are definitely installed.

vagrant@vagrant-ubuntu-trusty-64:~/cerbero$ pkg-config --modversion libpulse
4.0

This was all done in a fresh Ubuntu 14.04 VM with my fork of cerbero (two changes to recipes and a slightly modified cbc)

I've outlined the steps to reproduce below on Vagrant - ubuntu/trusty64 image:

sudo apt-get install git

sudo apt-get install binutils-arm-linux-gnueabi
sudo apt-get install gcc-arm-linux-gnueabi
sudo apt-get install g++-arm-linux-gnueabi

# Required for gettext-tools
git config --global user.email "..@.."
git config --global user.name "Richard Webb"

# Fork with two modified recipes and a very slightly different .cbc file
git clone https://github.com/ZoetropeLabs/cerbero
cd cerbero
git checkout feature/arm-cross-recipes

./cerbero-uninstalled -c config/cross-ubuntu-arm.cbc fetch-package --full-reset --reset-rdeps openwebrtc \
&& ./cerbero-uninstalled -c config/cross-ubuntu-arm.cbc bootstrap \
&& ./cerbero-uninstalled -c config/cross-ubuntu-arm.cbc package -f openwebrtc

Pulse packages are all picked up by bootstrap.

Configure stage is for some reason not picking up libpulse:

vagrant@vagrant-ubuntu-trusty-64:~/cerbero/logs/linux_armv7$ cat gst-plugins-good-1.0-static-configure.log | grep pulse
configure: *** checking feature: pulseaudio plug-in ***
configure: *** for plug-ins: pulseaudio ***
configure: No package 'libpulse' found
configure: *** These plugins will not be built: pulseaudio
config.status: creating ext/pulse/Makefile
config.status: creating tests/examples/pulse/Makefile

robswain on IRC (@superdump on here?) pointed out that there is already a cross-lin-arm.cbc which disables pulse so I've put nopulse in my cbc too (no luck), but I'm having the same issue with cross-lin-arm.cbc too.

Any help would be much appreciated. I'm guessing I've done something wrong with cross-compiling it, but no idea what. Hopefully the steps to reproduce should show me up pretty quickly if so.

ford-prefect commented 8 years ago

This is an ugly hack, but if you want to quickly proceed, you could edit recipes/gst-plugins-good-1.0.recipe and recipes/gst-plugins-good-1.0-static.recipe to always pass --disable-pulseaudio (ignoring the variants setting). At least until someone has the bandwidth to look at the actual problem. (this might make audio support not work, though, since we depend on pulsesrc/pulsesink on Linux).

bitdivision commented 8 years ago

Thanks, @ford-prefect, I'll give that a go. Do need audio support eventually but can deal with it not working for now.

bitdivision commented 8 years ago

@ford-prefect That passed the build stage, different errors now. Just thinking about this some more though and realising that if this version of gst-plugins-good is statically linked, it will need a cross-compiled version of libpulse I think? Which I don't have...

bitdivision commented 8 years ago

Why are there static and dynamic versions of these plugins? And is it possible to disable the static ones?