.. title: Fixing DocNav 2017.04 on Debian Stretch
.. slug: docnav-2017-04-debian-stretch
.. date: 2018-01-28 19:38:29 UTC+02:00
.. tags: xilinx,debian
.. category: 
.. link: 
.. description: 
.. type: text

Having installed `Vivado 2017.04
<https://www.xilinx.com/products/design-tools/vivado.html>`_ on one of
my GNU/Linux machines that run Debian 9.3 (Stretch), I realized that
DocNav fails to start:

.. code-block:: console

  dzu@deepthought:~$ . /opt/Xilinx/Vivado/2017.4/settings64.sh
  dzu@deepthought:~$ docnav 
  docnav: error while loading shared libraries: libpng12.so.0: cannot open shared object file: No such file or directory
  dzu@deepthought:~$
  
.. image:: /images/xilinx-logo.png
   :width: 150
   :align: center
   :alt: Xilinx Logo

.. TEASER_END

It turns out that Stretch currently does not carry libpng in version
12 and that the corresponding package from Jessie cannot be installed
correctly:

.. code-block:: console

  dzu@deepthought:~$ sudo dpkg --install ~/Downloads/libpng12-0_1.2.50-2+deb8u3_amd64.deb 
  (Reading database ... 273874 files and directories currently installed.)
  Preparing to unpack .../libpng12-0_1.2.50-2+deb8u3_amd64.deb ...
  Unpacking libpng12-0:amd64 (1.2.50-2+deb8u3) ...
  dpkg: error processing archive /home/dzu/Downloads/libpng12-0_1.2.50-2+deb8u3_amd64.deb (--install):
   unable to install new version of '/usr/lib/x86_64-linux-gnu/libpng12.so.0': No such file or directory
  Errors were encountered while processing:
   /home/dzu/Downloads/libpng12-0_1.2.50-2+deb8u3_amd64.deb
  dzu@deepthought:~$

For me the solution was to download `libpng12-0 from Wheezy
<https://packages.debian.org/wheezy/amd64/libpng12-0/download>`_ and
install it.  Now DocNav runs without any further problems.

One should keep in mind that this package has some known CVEs
associated with it, but given that it will only be used by DocNav and
this only shows data provided directly by Xilinx, the risk of doing so
is qualified.  DocNav should really move to a newer version of libpng
to fix this completely.

Also note that DocNav was only recently ported to 64 bit, so some of
the available information on the Xilinx website is no longer accurate,
especially the DocNav part of `Answer Record #66184
<https://www.xilinx.com/support/answers/66184.html>`_.
