Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
libpng12-0 not available in Ubuntu 18.04
#1
Hi!

So my hard drive crashed and I've had to reinstall Tilengine. However, previously I was running Ubuntu 16.04, now I'm trying to get it working on 18.04. After downloading and installing Tilengine, I've tried running the test.py but I get the following error:

Code:
Traceback (most recent call last):
  File "test.py", line 1, in <module>
    import tilengine as tln
  File "/home/daniel/development/game/Tilengine_linux_x86_64/samples/python/tilengine.py", line 269, in <module>
    _tln = cdll.LoadLibrary("libTilengine.so")
  File "/usr/lib/python3.6/ctypes/__init__.py", line 426, in LoadLibrary
    return self._dlltype(name)
  File "/usr/lib/python3.6/ctypes/__init__.py", line 348, in __init__
    self._handle = _dlopen(self._name, mode)
OSError: libpng12.so.0: cannot open shared object file: No such file or directory


After searching for what may be causing the issue, I found this SO answer, which essentially says that there are no packages for libpng12-0 for 17.04 upwards. 18.04 comes with libpng16-16. Installing the old version of the package is not recommended as it could break apt.

Would a solution to this be simply updating Tilengine to use the newer version of the package?
Reply
#2
Hi Daniel,

Sorry about your hard drive crash! I hope you didn't lost any valuable data.

Regarding libpng, it's not easy to replace the required png library because there are many places where pre-17.04 ubuntu is still used. For example, continuous integration provider Travis C.I. uses Ubuntu Trusty 14.04 as its main build platform.

Tilengine is open source since release 2.0, my best advice is to git clone the repository and build it yourself against your own package versions, it's really easy under Ubuntu.

Let me know!
Reply
#3
Hi Mark,

Thanks for the response. I got it working.

I've forked Tilengine on GitHub to start working on the Python docs (finally). As part of the PR, I can make a note in the README that those using 17.04 and higher need to build from source.
Reply
#4
Hi Daniel!

Managing external external dependencies of pre-built binaries is always problematic.

I'm glad you're planning to work on the Python binding. But I'm in the way of removing the bindings from the main project, and spawn them as separate projects. The Python one is already online, please clone this new project: https://github.com/megamarc/PyTilengine
Reply
#5
Hi Mark,

I like this idea. I think it will be a lot easier to manage. I've forked and cloned the new repo. For the Python docs, I assume you want them in the same format as they exist under docs on the main Tilengine repo?
Reply
#6
Hi Daniel!

It would be great if python docs keep the same structure than the C ones. Content is not yet complete, but the TOC is already there as I think it should be.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)