Getting Tizen Studio to work on Ubuntu

When you try to install Tizen Studio on a recent Ubuntu version (and possibly other distributions) you might run into problem that the Emulator package wants you to install packages that are not available for your version of the distribution.

The problematic packages were the following for me:

  • libjpeg-turbo8
  • libpng12-0

The Package manager will complain with a message like the following:

Tizen Package manager

The problem is that even if you find the .deb packages somewhere, you will not be able to install them as they have been superseded by new versions that will prevent you from using these old packages.

The solution

  1. Trick the package manager to install the Emulator package without requiring the problematic packages
  2. Make the emulator work by providing it the libraries from the packages

Trick the Package Manager

The package dependencies are defined in http://download.tizen.org/sdk/tizenstudio/official/pkg_list_ubuntu-64
So we want to remove all occurrences of libpng12-0 and libjpeg-turbo8. We obviously cannot edit the file on the server and we do not want to mirror the whole package repository, so we are going to use an HTTP proxy that rewrites the file on-the-fly: https://mitmproxy.org/

  1. Install mitmproxy: sudo apt-get install mitmproxy
  2. Download pkg_list_ubuntu-64 and remove the problematic dependencies from it.
  3. Run mitmproxy -s script.py --set stream_large_bodies=30 where script.py is the one below
  4. Configure the Tizen Package manager to use http://localhost:8080 as proxy
  5. Install the packages you wanted to install
# script.py
from mitmproxy import http

def request(flow):
  if flow.request.pretty_url.endswith("pkg_list_ubuntu-64"):
    with open('/path/to/pkg_list_ubuntu-64', 'r') as f:
      txt = f.read()
      flow.response = http.HTTPResponse.make(
            200,
            txt, 
            {"Content-Type": "text/plain"})

Fix the installation

Now that you have the emulator installed you will notice that it will not run without libpng12.so.0 which was supposed to come from the package we did not install. So we need to download the .deb with the library and copy it into platforms/tizen-5.5/common/emulator/bin or potentially elsewhere if you installed a different package.

JavaFX issues

I also had problems with missing JavaFX dependencies. This is unrelated to the package problems, but it is also a problem of newer software: the newer OpenJDK packages come apparently without JavaFX.

I fixed this by installing openjfx via sudo apt-get install openjfx and changing scripts such as studio/platforms/tizen-5.5/common/emulator/bin to use the JavaFX JARs from /usr/share/openjfx

Tags: , ,

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.