changing default libpng

Hello,

I am trying to run a relatively old software on OpenSuse 42.3 but I am getting messages like

libpng warning: Application built with libpng-1.2.7 but running with 1.6.8

and the GUI that opens does not show the right menu icons.

On that machine there are installed libpng12, libpng15 and libpng16, but the last one seems to be the default and I do not know how to set it up to use libpng12 instead.

Any help would be appreciated.

Jordi

Hi and welcome to the Forum :slight_smile:
You would need to patch the makefiles LIBS to reference libpng16 and any files that include png.h

For example;


LIBS += -lpng

to

LIBS += -lpng16

and

#include <png.h>

to

#include <libpng16/png.h>

So if only wanting 12 (I would suggest try libpng16 first) then modify as required.

Ok, thanks for your fast answer! If I’m not wrong, what you suggest is to recompile the application so that it uses libpng16 instead of libpng12. That is not possible: what I want to run is a commercial software (Sybylx 2.1) that comes as binary and it was originally built with libpng-1.2.7. Indeed, I only want to make temporary changes in order to use libpng12 as if it was the default, instead of libpng16, and be able to run Sybyl occasionally. Best thing would be to have those changes in an environment module that I can load any time I want to start the software, without affecting anything else. I guess that it should be possible since Yast allows to install different versions of libpng without having to remove any of the other installed.

Jordi

Hi
If you run ldd against the binary, where is it looking for the libs?

A simple solution might be to build an openSUSE 11.2 machine (with libpng1.2.3) in a virtual machine… or, use the 11.2 repo as a source for a compiled library

https://ftp5.gwdg.de/pub/opensuse/discontinued/distribution/11.2/repo/oss/suse/

TSU

Hi
The libpng 1.2 is not the issue, it’s present in leap 42.3, just something funky where it’s looking for it…

Hello again,

Answering to the comments made yesterday:

[quote="“tsu2”]

A simple solution might be to build an openSUSE 11.2 machine (with libpng1.2.3) in a virtual machine… or, use the 11.2 repo as a source for a compiled library

Sybyl is a chemistry software, at some point it can run heavy computation and the graphical interface requires hardware acceleration, therefore I do not think that installing it on a virtual machine is really adequate. On the other hand, using an old repo to get libpng12 is not necessary: Leap 42.3 includes libpng12 (libpng1.2.50). This is the same version that is included on OpenSuse 12.3, and on this SO Sybyl can be installed and runs without problems.

This is what I got when I ran ldd:

> ldd sybyl.exe | grep libpng
libpng16.so.16 => /usr/lib64/libpng16.so.16 (0x00007f96a7b9b000)

so it looks like it is really looking for libpng16.

Actually, what I said yesterday about the software being a binary is not right: it requires an installation by executing a binary which generates a directory with about 1.7 GB of files, but there is no possibility, as far as I know, of tweaking the installation executable to set which libraries will be used during the installation. I guess the point would be to make libpng12 the default libpng library during the installation, so that later when running the software it looks to the right libpng location, even though the default library for the rest of the system is a different one (libpng16). Does this make sense?

Jordi

Hi
Since the application installs lots of files I would suspect it is using some of it’s own libraries rather than system ones (I would surmise a it’s using mono aka .net app).

Can you look through the output without the grep, are there links to other locations rather than /usr/lib64 and say ‘not found’?

Is there a start script for the application, does this set library locations?

[quote=“jbujons,post:7,topic:136764”]
Hello again,

Answering to the comments made yesterday:

Is why I suggested the particular version openSUSE, AFAICS libpng1.2.x was default and not just available for that version openSUSE.
If a later minor version is important to you, you can try running teh update repo for that version openSUSE, too (is in the same general web address).

I would assume that if your application was built for installations of that era, whatever dependencies your app requires should be satisfied and should work when run on an OS of that era.

TSU


Yes, there is a lib directory built during installation, but there are no libpng* files there. Below I include part of the output of running “ldd -v sybyl.exe” (there is a limit of 15000 characters for the posts, and I cannot fit everything here). As you will see, there are some “not found” messages but none of them related to libpng. There is a start script but I do not see that it sets library locations other than <installation_path/lib> and the contents of this are libraries mainly related to the software, not specific versions of general libraries like libpng*.

> ldd -v sybyl.exe
linux-vdso.so.1 (0x00007ffe52bad000)
libgfx_drivers.so => not found
lib3db.so => not found
libChkTrpsLic.so => not found
libsybuims.so => not found
libuiutls.so => not found
libshell.so => not found
libqsar.so => not found
libtables.so => not found
libui.so => not found
libutls.so => not found
libgfx.so => not found
libmolcadplus.so => not found
libsyb.so => not found
libpoly.so => not found
liborchestrar.so => not found
libsrch.so => not found
libdbms.so => not found
libpareto.so => not found
libtoputl.so => not found
libconcord.so => not found
libSMOL.so => not found
libsearch.so => not found
libhits.so => not found
libtfmt.so => not found
libtdb.so => not found
libipc.so => not found
libuims2.so => not found
libparamdb.so => not found
libpyuims2.so => not found
libpython2.7.so.1.0 => /usr/lib64/libpython2.7.so.1.0 (0x00007fdb10270000)
libtools_gfx.so => not found
libtools_gfx_utl.so => not found
libscene.so => not found
libunity_gfx.so => not found
libtabase.so => not found
libssh.so => not found
lib2Dmolgraph.so => not found
libpio.so => not found
libz.so => /usr/lib64/libz.so (0x00007fdb1005a000)
libifcore.so.5 => not found
libifport.so.5 => not found
libsybylqt.so.1 => not found
libsybylexe.so => not found
libpthread.so.0 => /lib64/libpthread.so.0 (0x00007fdb0fe3d000)
libm.so.6 => /lib64/libm.so.6 (0x00007fdb0fb40000)
libSM.so.6 => /usr/lib64/libSM.so.6 (0x00007fdb0f938000)
libICE.so.6 => /usr/lib64/libICE.so.6 (0x00007fdb0f71b000)
libXi.so.6 => /usr/lib64/libXi.so.6 (0x00007fdb0f50b000)
libXrender.so.1 => /usr/lib64/libXrender.so.1 (0x00007fdb0f301000)
libXrandr.so.2 => /usr/lib64/libXrandr.so.2 (0x00007fdb0f0f6000)
libXfixes.so.3 => /usr/lib64/libXfixes.so.3 (0x00007fdb0eef0000)
libXcursor.so.1 => /usr/lib64/libXcursor.so.1 (0x00007fdb0ece5000)
libXinerama.so.1 => /usr/lib64/libXinerama.so.1 (0x00007fdb0eae2000)
libfreetype.so.6 => /usr/lib64/libfreetype.so.6 (0x00007fdb0e846000)
libfontconfig.so.1 => /usr/lib64/libfontconfig.so.1 (0x00007fdb0e608000)
libXext.so.6 => /usr/lib64/libXext.so.6 (0x00007fdb0e3f6000)
libX11.so.6 => /usr/lib64/libX11.so.6 (0x00007fdb0e0b9000)
libgthread-2.0.so.0 => /usr/lib64/libgthread-2.0.so.0 (0x00007fdb0deb7000)
libglib-2.0.so.0 => /usr/lib64/libglib-2.0.so.0 (0x00007fdb0dba7000)
librt.so.1 => /lib64/librt.so.1 (0x00007fdb0d99f000)
libdl.so.2 => /lib64/libdl.so.2 (0x00007fdb0d79b000)
libGLU.so.1 => /usr/lib64/libGLU.so.1 (0x00007fdb0d51c000)
libGL.so.1 => /usr/lib64/libGL.so.1 (0x00007fdb0d273000)
libsyb_nomp.so => not found
libXt.so.6 => /usr/lib64/libXt.so.6 (0x00007fdb0d00c000)
libXmu.so.6 => /usr/lib64/libXmu.so.6 (0x00007fdb0cdf1000)
libXpm.so.4 => /usr/lib64/libXpm.so.4 (0x00007fdb0cbdf000)
libcrypt.so.1 => /lib64/libcrypt.so.1 (0x00007fdb0c9a4000)
libncurses.so.5 => /lib64/libncurses.so.5 (0x00007fdb0c77d000)
libtiff.so.3 => /usr/lib64/libtiff.so.3 (0x00007fdb0c505000)
libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007fdb0c2ed000)
libc.so.6 => /lib64/libc.so.6 (0x00007fdb0bf48000)
libutil.so.1 => /lib64/libutil.so.1 (0x00007fdb0bd45000)
/lib64/ld-linux-x86-64.so.2 (0x00007fdb1067d000)
libuuid.so.1 => /usr/lib64/libuuid.so.1 (0x00007fdb0bb40000)
libbz2.so.1 => /usr/lib64/libbz2.so.1 (0x00007fdb0b931000)
libpng16.so.16 => /usr/lib64/libpng16.so.16 (0x00007fdb0b6f4000)
libexpat.so.1 => /usr/lib64/libexpat.so.1 (0x00007fdb0b4ca000)
libxcb.so.1 => /usr/lib64/libxcb.so.1 (0x00007fdb0b2aa000)
libpcre.so.1 => /usr/lib64/libpcre.so.1 (0x00007fdb0b03b000)
libstdc++.so.6 => /usr/lib64/libstdc++.so.6 (0x00007fdb0acb1000)
libGLX.so.0 => /usr/lib64/libGLX.so.0 (0x00007fdb0aa81000)
libGLdispatch.so.0 => /usr/lib64/libGLdispatch.so.0 (0x00007fdb0a7ae000)
libtinfo.so.5 => /lib64/libtinfo.so.5 (0x00007fdb0a57a000)
liblzma.so.5 => /usr/lib64/liblzma.so.5 (0x00007fdb0a351000)
libjbig.so.2 => /usr/lib64/libjbig.so.2 (0x00007fdb0a145000)
libjpeg.so.8 => /usr/lib64/libjpeg.so.8 (0x00007fdb09edb000)
libXau.so.6 => /usr/lib64/libXau.so.6 (0x00007fdb09cd7000)

    Version information:
    ./sybyl.exe:
            libpthread.so.0 (GLIBC_2.2.5) =&gt; /lib64/libpthread.so.0
            libgcc_s.so.1 (GCC_3.0) =&gt; /lib64/libgcc_s.so.1
            libdl.so.2 (GLIBC_2.2.5) =&gt; /lib64/libdl.so.2
            libc.so.6 (GLIBC_2.3) =&gt; /lib64/libc.so.6
            libc.so.6 (GLIBC_2.2.5) =&gt; /lib64/libc.so.6
    /usr/lib64/libpython2.7.so.1.0:
            libdl.so.2 (GLIBC_2.2.5) =&gt; /lib64/libdl.so.2
            libutil.so.1 (GLIBC_2.2.5) =&gt; /lib64/libutil.so.1
            libm.so.6 (GLIBC_2.2.5) =&gt; /lib64/libm.so.6
            libpthread.so.0 (GLIBC_2.2.5) =&gt; /lib64/libpthread.so.0
            libc.so.6 (GLIBC_2.7) =&gt; /lib64/libc.so.6
            libc.so.6 (GLIBC_2.14) =&gt; /lib64/libc.so.6
            libc.so.6 (GLIBC_2.4) =&gt; /lib64/libc.so.6
            libc.so.6 (GLIBC_2.3.4) =&gt; /lib64/libc.so.6
            libc.so.6 (GLIBC_2.2.5) =&gt; /lib64/libc.so.6
            libc.so.6 (GLIBC_2.3) =&gt; /lib64/libc.so.6
    /usr/lib64/libz.so:
            libc.so.6 (GLIBC_2.14) =&gt; /lib64/libc.so.6
            libc.so.6 (GLIBC_2.2.5) =&gt; /lib64/libc.so.6
            libc.so.6 (GLIBC_2.3.4) =&gt; /lib64/libc.so.6
    /lib64/libpthread.so.0:
            ld-linux-x86-64.so.2 (GLIBC_2.2.5) =&gt; /lib64/ld-linux-x86-64.so.2
            ld-linux-x86-64.so.2 (GLIBC_PRIVATE) =&gt; /lib64/ld-linux-x86-64.so.2
            libc.so.6 (GLIBC_2.14) =&gt; /lib64/libc.so.6
            libc.so.6 (GLIBC_2.3.2) =&gt; /lib64/libc.so.6
            libc.so.6 (GLIBC_2.2.5) =&gt; /lib64/libc.so.6
            libc.so.6 (GLIBC_PRIVATE) =&gt; /lib64/libc.so.6
    /lib64/libm.so.6:
            libc.so.6 (GLIBC_PRIVATE) =&gt; /lib64/libc.so.6
            libc.so.6 (GLIBC_2.2.5) =&gt; /lib64/libc.so.6
    /usr/lib64/libSM.so.6:
            libuuid.so.1 (UUID_1.0) =&gt; /usr/lib64/libuuid.so.1
            libc.so.6 (GLIBC_2.3.4) =&gt; /lib64/libc.so.6
            libc.so.6 (GLIBC_2.14) =&gt; /lib64/libc.so.6
            libc.so.6 (GLIBC_2.4) =&gt; /lib64/libc.so.6
            libc.so.6 (GLIBC_2.2.5) =&gt; /lib64/libc.so.6
    /usr/lib64/libICE.so.6:
            libc.so.6 (GLIBC_2.3) =&gt; /lib64/libc.so.6
            libc.so.6 (GLIBC_2.11) =&gt; /lib64/libc.so.6
            libc.so.6 (GLIBC_2.14) =&gt; /lib64/libc.so.6
            libc.so.6 (GLIBC_2.8) =&gt; /lib64/libc.so.6
            libc.so.6 (GLIBC_2.4) =&gt; /lib64/libc.so.6
            libc.so.6 (GLIBC_2.3.4) =&gt; /lib64/libc.so.6
            libc.so.6 (GLIBC_2.2.5) =&gt; /lib64/libc.so.6
    /usr/lib64/libXi.so.6:
            libc.so.6 (GLIBC_2.14) =&gt; /lib64/libc.so.6
            libc.so.6 (GLIBC_2.4) =&gt; /lib64/libc.so.6
            libc.so.6 (GLIBC_2.2.5) =&gt; /lib64/libc.so.6
            libc.so.6 (GLIBC_2.3.4) =&gt; /lib64/libc.so.6
    /usr/lib64/libXrender.so.1:
            libc.so.6 (GLIBC_2.14) =&gt; /lib64/libc.so.6
            libc.so.6 (GLIBC_2.2.5) =&gt; /lib64/libc.so.6
    /usr/lib64/libXrandr.so.2:
            libc.so.6 (GLIBC_2.14) =&gt; /lib64/libc.so.6
            libc.so.6 (GLIBC_2.2.5) =&gt; /lib64/libc.so.6
    /usr/lib64/libXfixes.so.3:
            libc.so.6 (GLIBC_2.14) =&gt; /lib64/libc.so.6
            libc.so.6 (GLIBC_2.2.5) =&gt; /lib64/libc.so.6
    /usr/lib64/libXcursor.so.1:
            libc.so.6 (GLIBC_2.3) =&gt; /lib64/libc.so.6
            libc.so.6 (GLIBC_2.3.4) =&gt; /lib64/libc.so.6
            libc.so.6 (GLIBC_2.14) =&gt; /lib64/libc.so.6
            libc.so.6 (GLIBC_2.4) =&gt; /lib64/libc.so.6
            libc.so.6 (GLIBC_2.2.5) =&gt; /lib64/libc.so.6

:
:
:
usr/lib64/libpng16.so.16:
libz.so.1 (ZLIB_1.2.3.4) => /usr/lib64/libz.so
libm.so.6 (GLIBC_2.2.5) => /lib64/libm.so.6
libc.so.6 (GLIBC_2.11) => /lib64/libc.so.6
libc.so.6 (GLIBC_2.14) => /lib64/libc.so.6
libc.so.6 (GLIBC_2.3.4) => /lib64/libc.so.6
libc.so.6 (GLIBC_2.4) => /lib64/libc.so.6
libc.so.6 (GLIBC_2.2.5) => /lib64/libc.so.6
:
:

[quote="“tsu2,post:9,topic:136764”]

In case you decide to explore this option…

  • Depending on your choice of virtualization, hardware acceleration may be experimental but likely to work (virtualbox) or fully supported (VMware, and Player is free).
    Note that hardware acceleration is not the same as GPU pass-through, but depending on your choice of virtualization, hypervisor latencies today can be very small, a test I ran on VMware last year benchmarked only about a 2% penalty. Of course that was only that benchmark, YMMV for your specific use.
  • Although the link I provided points to the oss repo, if you’re installing there are ISO images available in the same general area of the website link, and the last published update repo.

TSU

Hi
So in the library directory, do the 'not found libs exists there? eg libsybuims.so?

If so, what is the full path to this directory, what you need to do is add a ld config file in /etc/ld.so.conf.d/ pointing to the directory, for example;


vi /etc/ld.so.conf.d/sybylx.conf

/the/full/path/to/the/lib

Save the file and then run the command ldconfig (as root user), now re-run the ldd command, do the ‘not found’ errors go away?

Does the libpng error go away? If not, the *.so files are normally associated with devel packages, so I wonder if it’s really looking for the libpng12 devel package to be installed…

Yes, all the “not found” libs exists in the <install_directory/lib>. I did create the “/etc/ld.so.conf.d/sybylx.conf” file and run ldconfig, as you suggested, and the “not found” errors went away, so that was good! However the libpng error persist, although the libpng* devel packages (libpng12 and libpng16) were already installed.

Jordi

Hi
Can you post the full error seen?

Is the program functioning as expected, even with this error?

The full output when the program is started follows:


jordi@arwen:~> sybylx2.1
SYBYL-X 2.1.1 (linuxx86_64_os2x), Created Oct 30, 2013 11:48:00 PM
Python is initialized
libpng warning: Application built with libpng-1.2.7 but running with 1.6.8
libpng warning: Application built with libpng-1.2.7 but running with 1.6.8
libpng warning: Application built with libpng-1.2.7 but running with 1.6.8
Wrong visual chosen - no multisample buffer
OpenGL Multisampling not available on this device.
OpenGL Hardware Stereo-in-a-window is not supported.
libpng warning: Application built with libpng-1.2.7 but running with 1.6.8
libpng warning: Application built with libpng-1.2.7 but running with 1.6.8
libpng warning: Application built with libpng-1.2.7 but running with 1.6.8
libpng warning: Application built with libpng-1.2.7 but running with 1.6.8
libpng warning: Application built with libpng-1.2.7 but running with 1.6.8
libpng warning: Application built with libpng-1.2.7 but running with 1.6.8
libpng warning: Application built with libpng-1.2.7 but running with 1.6.8
libpng warning: Application built with libpng-1.2.7 but running with 1.6.8
libpng warning: Application built with libpng-1.2.7 but running with 1.6.8
libpng warning: Application built with libpng-1.2.7 but running with 1.6.8
libpng warning: Application built with libpng-1.2.7 but running with 1.6.8
libpng warning: Application built with libpng-1.2.7 but running with 1.6.8
libpng warning: Application built with libpng-1.2.7 but running with 1.6.8
libpng warning: Application built with libpng-1.2.7 but running with 1.6.8
libpng warning: Application built with libpng-1.2.7 but running with 1.6.8
libpng warning: Application built with libpng-1.2.7 but running with 1.6.8
Unrecognised OpenGL version

As you can see, it consists of several warnings rather than error messages, and as you anticipate the software starts and seems to be able to display and move 3D models, as expected. The main problem resides in that there are several toolbars with buttons that are not displayed. Only when the cursor is on top of the hidden buttons, there appears a text showing the function of the button that was expected to be there. Most functionality (not all) is also accessible through menus but these usually require more mouse clicks. So far, I have not detected any other malfunction, although maybe there is something else since I have not tried all the possibilities of the software yet.

Jordi

Hi
So if you remove the ld conf file (and re-run ldconfig), does it still function as expected? Do the application folks have a forum, or perhaps report as a bug to the application folks?

:slight_smile:

The company (Certara) owns this proprietary code (seems to have bought from original developers, then released the last version 2.1 you now see in 2013) no longer lists this software on their website and pretty obviously won’t provide support.

The option I proposed to build in an ancient openSUSE and likely updated with its update repo might still have a chance to work.

TSU

Apparently the software runs ok even after undoing the ldconfig part, as I already had observed. I do not know if at some point those libraries might be look after and then an error might be raised if the program cannot find them.

Contacting the developers was my fist option but, as TSU2 mentioned, Certara dropped that soft and stopped to give support on 2017. Anyway, I guess that this might be more complex than I thought. Maybe I can just keep using the soft through the menus or create a virtual machine and install it there, as TSU2 suggested.

Thanks to both of you for your comments and your time.

Best regards,

Jordi

Hi
I would suggest the menu option :wink: Maybe the binary has some runtime options? <binary> --help

Don’t know a thing about the subject but have you considered PyMOL

https://pymol.org/2/