Building visualizations
#1
UPDATE 3: Got everything working. Steps in post #14 2239925 (post)

UPDATE 2: Ok, I guess my question is, "How do you build a .vis for imx6?"

UPDATE: Got cmake to finish by installing the following libraries. Still asking for assistance. Please see the next post. Thank you!

sudo apt-get install mesa-utils-extra
sudo apt-get install libgl1-mesa-dev
sudo apt-get install libglapi-mesa

---------------------------

Hi, would someone please point me in the right direction? Building visualizations has changed since I last tried this a year ago.

I am trying to compile a .vis for OpenELEC (imx6) on Ubuntu. I have successfully built the latest OpenELEC (imx6) in an Ubuntu VM.

So I have this folder with a built Kodi: ~/OpenELEC.tv/build.OpenELEC-imx6.arm-7.0-devel/kodi-16.0-rc3-34d1e49

And I have this folder with a git cloned Waveform vis: ~/visualization.waveform

I edited kodi-config.cmake to include looking into ~/OpenELEC.tv/build.OpenELEC-imx6.arm-7.0-devel/kodi-16.0-rc3-34d1e49/project/cmake/scripts/common so that it finds addon-helpers. Then I tried the following cmake:

Code:
cmake -DADDONS_TO_BUILD=visualization.waveform -DADDON_SRC_PREFIX=~/ -DPACKAGE_ZIP=1 -DCMAKE_PREFIX_PATH=~/OpenELEC.tv/build.OpenELEC-imx6.arm-7.0-devel/kodi-16.0-rc3-34d1e49/project/cmake -DCMAKE_INSTALL_PREFIX=~/OpenELEC.tv/build.OpenELEC-imx6.arm-7.0-devel/kodi-16.0-rc3-34d1e49/addons

It fails, complaining about rendering API:

Code:
-- Checking to see if CXX compiler accepts flag -flto
-- Checking to see if CXX compiler accepts flag -flto - yes
-- Could NOT find OpenGL (missing:  OPENGL_gl_LIBRARY OPENGL_INCLUDE_DIR)
-- checking for module 'glesv2'
--   package 'glesv2' not found
-- Could NOT find OpenGLES2 (missing:  OPENGLES2_INCLUDE_DIRS OPENGLES2_gl_LIBRARY OPENGLES2_egl_LIBRARY)
CMake Error at CMakeLists.txt:51 (message):
  No rendering API found.  Bailing


-- Configuring incomplete, errors occurred!
See also "/home/ubuntu/visualization.waveform/CMakeFiles/CMakeOutput.log".

Any idea what the cmake line should be? Or how to trick it into choosing the right rendering API? Again, I'm trying to compile the .vis for imx6, which is a different platform than what I'm building on. Thank you!
Reply
#2
After cmake completes, I ran make and got the following output:

Code:
Scanning dependencies of target visualization.waveform
[100%] Building CXX object CMakeFiles/visualization.waveform.dir/src/Main.cpp.o
/home/ubuntu/visualization.waveform/src/Main.cpp:24:26: fatal error: xbmc_vis_dll.h: No such file or directory
#include <xbmc_vis_dll.h>
                          ^
compilation terminated.
CMakeFiles/visualization.waveform.dir/build.make:54: recipe for target 'CMakeFiles/visualization.waveform.dir/src/Main.cpp.o' failed
make[2]: *** [CMakeFiles/visualization.waveform.dir/src/Main.cpp.o] Error 1
CMakeFiles/Makefile2:91: recipe for target 'CMakeFiles/visualization.waveform.dir/all' failed
make[1]: *** [CMakeFiles/visualization.waveform.dir/all] Error 2
Makefile:137: recipe for target 'all' failed
make: *** [all] Error 2

What's the right way to tell make where to look for the include files? That particular include file is in ~/OpenELEC.tv/sources/kodi/kodi-16.0-rc3-34d1e49/xbmc/addons/include
Reply
#3
sudo apt-get install kodi-visualizations-dev
Reply
#4
and you do understand you're not bulding for oe i assume?
Reply
#5
ironic_monkey, I got that feeling. Any pointers on how to build for OpenELEC imx6?
Reply
#6
*removed to focus on the main problem of figuring out how to build for OpenELEC imx6.*
Reply
#7
well for starters you cannot build using host tools! you have to build in the openelec crossbuild. many many examples in https://github.com/OpenELEC/OpenELEC.tv/...ary-addons
Reply
#8
Thank you. I'll check it out.

Back to the Ubuntu "host." I was able to make waveform, but it results in a blank screen. And instead of .vis, it's a .so.1.0.16 extension. Other visualizations work. What info should I be looking at to figure out how to build it correctly so it works?
Reply
#9
yes, the stupid .vis renaming has been removed. i dunno, for me it's dead simple.

1) add kodi ppa
2) install kodi-visualization-dev
3) build and install.
Reply
#10
You make it sound so nice. I've spent hours and hours on this... What distro are you using?
Reply
#11
I cloned https://github.com/notspiff/visualization.waveform again and it worked. I was able to build for Ubuntu 15.04 x86 and see the visualization.

Now on to imx6...
Reply
#12
and to answer your question i typically use ubuntu 14.04 amd64 these days.
Reply
#13
By the way, the last round was nice and easy. Thank you! When it starts working, it works extremely well.
Reply
#14
Done! For those interested, here is the summary of what I had to do. Example commands in parenthesis.

1) Get a working Ubuntu VM. Recommend ironic_monkey's suggestion of 14.04.
2) Git clone a working visualization to anywhere. I put it in ~. (git clone https://github.com/notspiff/visualization.waveform.git)
3) Follow these instructions to build OpenELEC on your host system for your target system. I.e., you have to successfully execute a command like "PROJECT=imx6 ARCH=arm make image".
4) While all the OpenELEC stuff is building, make a new directory for your new visualization. (mkdir ~/visualization.wavforhue)
5) Copy the contents of the working vis to the new vis (cp ~/visualization.waveform/* ~/visualization.wavforhue/)
6) Change all the references in visualization.wavforhue from the old vis to your new vis. There are a lot of these! File names, directories, strings.po, addon.xml.in, etc. E.g., I had to change every instance of WAVEFORM to WAVFORHUE, visualization.waveform to visualization.wavforhue, Waveform, to WavforHue.
7) Do your development.
8) Create a .tar.xz archive of your new vis. (tar cfJ visualization.wavforhue-0.0.2.tar.xz visualization.wavforhue) I actually don't know if that command will work. I did my development in Windows.
9) Upload your archive to a webserver. E.g, http://www.thomasmhardy.com/static/devel...0.2.tar.xz
10) Hopefully your OpenELEC build is done by now. Create a folder for you binary addon in the OpenELEC structure. (mkdir ~/OpenELEC.tv/packages/mediacenter/kodi-binary-addons/visualization.wavforhue)
11) Copy a working package.mk to your new vis package directory (cp ~/OpenELEC.tv/packages/mediacenter/kodi-binary-addons/visualization.waveform/package.mk ~/OpenELEC.tv/packages/mediacenter/kodi-binary-addons/visualization.wavforhue/)
12) Modify that copied package.mk with the new vis details including the URL where you uploaded your archive. E.g., PKG_NAME="visualization.wavforhue", PKG_VERSION="0.0.2", PKG_SITE="http://www.thomasmhardy.com/static", PKG_URL="http://www.thomasmhardy.com/static/devel/$PKG_NAME-$PKG_VERSION.tar.xz", PKG_SHORTDESC="visualization.wavforhue", PKG_LONGDESC="visualization.wavforhue".
13) You're ready to build! Run the appropriate create_addon script from ~/OpenELEC.tv. (PROJECT=imx6 ARCH=arm scripts/create_addon visualization.wavforhue)

With luck, your addon was built. But most likely something failed and you'll have to troubleshoot. To clean up the files created by create_addon, run commands like these:
PROJECT=imx6 ARCH=arm scripts/clean visualization.wavforhue
rm -fr sources/visualization.wavforhue
rm -fr target/addons/7.0/imx6/arm/visualization.wavforhue

14) Once you successfully build your vis, a .zip is available in the target directory. E.g., ~/OpenELEC.tv/target/addons/7.0/imx6/arm/visualization.wavforhue/visualization.wavforhue-0.0.2.zip

You can then use this file to go to Settings -> Addons -> Install from .zip.
Reply
#15
Trouble I ran into:
-I edited strings.po in Windows. Kodi did not like that. Editing in Ubuntu fixed the problem.
-I use a year old dev version of OpenELEC because the hue.ambilight / boblight stuff doesn't work with new versions. So I had to modify addon.xml to point to visualization.wavforhue.vis instead of visualization.wavforhue.so and change that file name from visualization.wavforhue.so to visualization.wavforhue.vis before I could install the plugin.
-I had to restart my target system every time I tried to install or uninstall the addon.
Reply

Logout Mark Read Team Forum Stats Members Help
Building visualizations0