tizonia / tizonia-openmax-il

Command-line cloud music player for Linux with support for Spotify, Google Play Music, YouTube, SoundCloud, TuneIn, iHeartRadio, Plex servers and Chromecast devices.
https://tizonia.org
GNU Lesser General Public License v3.0
1.69k stars 85 forks source link

Provide Yocto Bitbake recipe #602

Open SerkanTuerker opened 5 years ago

SerkanTuerker commented 5 years ago

Hi all,

I am trying to get tizonia running on a RaspberryPi with Yocto (https://www.yoctoproject.org/) Linux.

If you are not familiar with Yocto, here you can find the documentation.

In order to build any project for Yocto, someone has to provide a Bitbake file (.bb).

I attempted to write a bitbake file for tizonia (see SO post).

Unfortunately (probably not only for me) you are using autotools/autoconf for configuring your project, which is most likely not the best solution (just FYI, doing autoreconf/configure takes more than 5mins, which is ridiculous for a relatively small project).

I have never used autoconf/autotools, nor do I have seen any other modern C/C++ project which uses autoconf/autotools.

Fortunately (for maintainers of an autotools/autoconf project) Yocto offers autotools capability (autotools.bbclass).

My question: Since I am not able to get the autconf/autotools errors fixed, can you provide a bitbake file tizonia.bb? If not, can you hint me to a direction such that I can solve the error listed below? Which command from autotols/autoconf do I have to call, and how, in order to fix the error?

=========================================================================

The error message from ./configure step:

| checking for python2.7... (cached) /home/developer/build-webos-ose/BUILD/sysroots/x86_64-linux/usr/bin/python-native/python
| checking for a version of Python >= '2.1.0'... yes
| checking for a version of Python >= '2.7'... yes
| checking for the distutils Python package... yes
| checking for Python include path... -I/home/developer/build-webos-ose/BUILD/sysroots/raspberrypi3/usr/include/python2.7
| checking for Python library path... -L/home/developer/build-webos-ose/BUILD/sysroots/raspberrypi3/usr/lib -lpython2.7
| checking for Python site-packages path... /home/developer/build-webos-ose/BUILD/sysroots/x86_64-linux/usr/lib/python2.7/site-packages
| checking python extra libraries... -lpthread -ldl  -lpthread -lutil -lm
| checking python extra linking flags... -Xlinker -export-dynamic
| checking consistency of all components of python development environment... yes
| checking python module: soundcloud... no
| configure: error: failed to find required module soundcloud
tizonia commented 5 years ago

Hi @SerkanTuerker !

Sorry for such a slow reply. First of all, thanks very much for taking the time and effort to produce a Yocto recipe for Tizonia. I really love the idea, so I will try to help where I can.

I don't know exactly how to resolve the Python soundcloud dependency in Yocto, I have yet to try to build Tizonia with Yocto. If you can show my your repository where you Yocto layer or bitbake recipe is stored, I'll try to build it myself.

Regarding the build system, yes you are right, it is really slow. Tizonia was initially broken down in multiple sub-projects with the goal of separating the various parts in independent pieces, each with its own build system. It wasn't clear at the time how those parts would be used in the future. Nowdays most people come to Tizonia because of the command-line music player, but the multimedia framework is a separate piece in itself, so that it can be used in projects outside of Tizonia, for example. In the future maybe I will try to migrate to another build system, like meson. But this is not an afternoon job! Contributions are more than welcome by the way.

SerkanTuerker commented 5 years ago

Hi @tizonia!

Thanks for the reply! So, since I am way more familiar wit CMake, I started creating CMake files for the whole project in the hope that using that with Yocto will be easier. I have already created and setup an initial working build with CMake. Now I have to incorporate the tests and packaging of the project.

If you are interested in having CMake capabilty for tizonia, I can open a pull request and we can discuss there for CMake related stuff.

Coming back to Yocto, I am nowhere near having something useful yet. The main .bb recipes are in the SO post I added in the description of this issue.

Once I have the CMake related open issues resolved, I will continue working on the .bb recipe files.

PS: Configuring the whole project with CMake (without tests) took 2.6secs!!!

tizonia commented 5 years ago

@SerkanTuerker

I have to apologize for my slow replies. Most of my GitHub email traffic was being redirected to the spam folder, I've just discovered recently.

If you are interested in having CMake capabilty for tizonia, I can open a pull request and we can discuss there for CMake related stuff.

I'm definitely interested!. Please open that pull request and we will get things rolling.

As you say, the Yocto recipe makes much more sense with a build system that can build the entire project with a single configuration pass, not many like with the current autotools implementation does.

A CMake build option would be awesome!