Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. Incompatible libpng version in application and library
Forum Updated to NodeBB v4.3 + New Features

Incompatible libpng version in application and library

Scheduled Pinned Locked Moved Solved QML and Qt Quick
26 Posts 3 Posters 6.8k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • SGaistS Offline
    SGaistS Offline
    SGaist
    Lifetime Qt Champion
    wrote on last edited by
    #2

    Hi,

    Are you using any external library with your application that also makes use if libpng ?

    Interested in AI ? www.idiap.ch
    Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

    Tom assoT 1 Reply Last reply
    1
    • SGaistS SGaist

      Hi,

      Are you using any external library with your application that also makes use if libpng ?

      Tom assoT Offline
      Tom assoT Offline
      Tom asso
      wrote on last edited by
      #3

      @SGaist - hm, I am linking with numerous third-party .so libraries. What is the best way to determine their possible dependence on libpng? Thanks!

      1 Reply Last reply
      0
      • Christian EhrlicherC Offline
        Christian EhrlicherC Offline
        Christian Ehrlicher
        Lifetime Qt Champion
        wrote on last edited by
        #4

        ldd is your friend

        Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
        Visit the Qt Academy at https://academy.qt.io/catalog

        Tom assoT 1 Reply Last reply
        2
        • Christian EhrlicherC Christian Ehrlicher

          ldd is your friend

          Tom assoT Offline
          Tom assoT Offline
          Tom asso
          wrote on last edited by
          #5

          @Christian-Ehrlicher - 'ldd myprog | grep libpng' does not show any result, so I assume that means myprog doesn't rely on libpng dynamic library. What else should I check? Thanks!

          1 Reply Last reply
          0
          • SGaistS Offline
            SGaistS Offline
            SGaist
            Lifetime Qt Champion
            wrote on last edited by
            #6

            You should check all the third party libraries you are using.

            Interested in AI ? www.idiap.ch
            Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

            Tom assoT 1 Reply Last reply
            1
            • SGaistS SGaist

              You should check all the third party libraries you are using.

              Tom assoT Offline
              Tom assoT Offline
              Tom asso
              wrote on last edited by
              #7

              @SGaist - Thanks - what tool should I use to check these libraries?

              1 Reply Last reply
              0
              • SGaistS Offline
                SGaistS Offline
                SGaist
                Lifetime Qt Champion
                wrote on last edited by
                #8

                The same tool: ldd

                Interested in AI ? www.idiap.ch
                Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                Tom assoT 1 Reply Last reply
                1
                • SGaistS SGaist

                  The same tool: ldd

                  Tom assoT Offline
                  Tom assoT Offline
                  Tom asso
                  wrote on last edited by
                  #9

                  @SGaist - Hm, checked all of them with ldd - none show 'libpng*' in the list

                  1 Reply Last reply
                  0
                  • SGaistS Offline
                    SGaistS Offline
                    SGaist
                    Lifetime Qt Champion
                    wrote on last edited by
                    #10

                    Any of these uses plugins ?

                    Interested in AI ? www.idiap.ch
                    Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                    Tom assoT 1 Reply Last reply
                    0
                    • SGaistS SGaist

                      Any of these uses plugins ?

                      Tom assoT Offline
                      Tom assoT Offline
                      Tom asso
                      wrote on last edited by Tom asso
                      #11

                      @SGaist - I do not think so, at least I didn't create any. To be sure I ran 'ldd -u -d -r ' on all *plugin.so files in my Qt5.13.0 directory, none of them show dependency on libpng.
                      Obviously something is invoking libpng routines, but I haven't found libpng dependency with ldd in any of my app's libraries....???

                      1 Reply Last reply
                      0
                      • SGaistS Offline
                        SGaistS Offline
                        SGaist
                        Lifetime Qt Champion
                        wrote on last edited by
                        #12

                        Can you provide a full stack trace of your crash ?

                        Interested in AI ? www.idiap.ch
                        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                        Tom assoT 1 Reply Last reply
                        0
                        • SGaistS SGaist

                          Can you provide a full stack trace of your crash ?

                          Tom assoT Offline
                          Tom assoT Offline
                          Tom asso
                          wrote on last edited by
                          #13

                          @SGaist - yes, gdb stacktrace is below - thank you!

                          Thread 1 "mbgrdviz" received signal SIGSEGV, Segmentation fault.
                          __longjmp_chk (env=0x0, val=1) at ../setjmp/longjmp.c:32
                          32	../setjmp/longjmp.c: No such file or directory.
                          (gdb) bt
                          #0  0x00007ffff4e43b00 in __longjmp_chk (env=0x0, val=1)
                              at ../setjmp/longjmp.c:32
                          #1  0x00007fffb423bc9c in  ()
                              at /usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-png.so
                          #2  0x00007ffff08492c7 in png_error (png_ptr=0x555557fde4f0, error_message=error_message@entry=0x7ffff0dd9cb8 "Incompatible libpng version in application and library") at libpng/pngerror.c:80
                          #3  0x00007ffff084c685 in png_create_read_struct_2 (user_png_ver=0x7fffb423ce57 "1.6.34", error_ptr=0x555557faf050, error_fn=0x7fffb423bc50, warn_fn=0x7fffb423cd10, mem_ptr=0x0, malloc_fn=0x7fffb423c320, free_fn=0x7fffb423afc0)
                              at libpng/pngread.c:150
                          #4  0x00007fffb423befb in  ()
                              at /usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-png.so
                          #5  0x00007fffe07a408c in  ()
                              at /usr/lib/x86_64-linux-gnu/libgdk_pixbuf-2.0.so.0
                          #6  0x00007fffe07a4955 in gdk_pixbuf_loader_close ()
                              at /usr/lib/x86_64-linux-gnu/libgdk_pixbuf-2.0.so.0
                          #7  0x00007fffe07a120b in  ()
                              at /usr/lib/x86_64-linux-gnu/libgdk_pixbuf-2.0.so.0
                          #8  0x00007fffe07a223c in gdk_pixbuf_new_from_stream ()
                              at /usr/lib/x86_64-linux-gnu/libgdk_pixbuf-2.0.so.0
                          #9  0x00007fffe15ff142 in  () at /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
                          #10 0x00007fffe15ff2bb in  () at /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
                          #11 0x00007fffe15ffb46 in  () at /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
                          #12 0x00007fffe15f74b2 in  () at /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
                          #13 0x00007fffe172db3a in  () at /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
                          #14 0x00007fffe15f5faa in  () at /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
                          #15 0x00007fffe15aebf1 in  () at /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
                          #16 0x00007fffe18058db in  () at /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
                          #17 0x00007fffe15ec3ca in gtk_container_propagate_draw ()
                              at /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
                          #18 0x00007fffe15ec4b2 in  () at /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
                          #19 0x00007fffe18058db in  () at /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
                          #20 0x00007fffe15ec3ca in gtk_container_propagate_draw ()
                              at /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
                          #21 0x00007fffe15ec4b2 in  () at /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
                          #22 0x00007fffe159fcf4 in  () at /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
                          #23 0x00007fffe15f140d in  () at /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
                          #24 0x00007fffe15f6063 in  () at /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
                          #25 0x00007fffe15a2601 in  () at /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
                          #26 0x00007fffe18058db in  () at /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
                          #27 0x00007fffe15ec3ca in gtk_container_propagate_draw ()
                              at /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
                          #28 0x00007fffe175b1c0 in  () at /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
                          #29 0x00007fffe15f140d in  () at /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
                          #30 0x00007fffe15f6063 in  () at /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
                          #31 0x00007fffe175ad35 in  () at /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
                          #32 0x00007fffe18058db in  () at /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
                          #33 0x00007fffe15ec3ca in gtk_container_propagate_draw ()
                              at /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
                          #34 0x00007fffe15ec4b2 in  () at /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
                          #35 0x00007fffe159fcf4 in  () at /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
                          #36 0x00007fffe15f140d in  () at /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
                          #37 0x00007fffe15f6063 in  () at /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
                          #38 0x00007fffe15a2601 in  () at /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
                          #39 0x00007fffe18058db in  () at /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
                          #40 0x00007fffe15ec3ca in gtk_container_propagate_draw ()
                              at /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
                          #41 0x00007fffe15ec4b2 in  () at /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
                          #42 0x00007fffe172ffd7 in  () at /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
                          #43 0x00007fffe18058db in  () at /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
                          #44 0x00007fffe15ec3ca in gtk_container_propagate_draw ()
                              at /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
                          #45 0x00007fffe15ec4b2 in  () at /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
                          #46 0x00007fffe159fcf4 in  () at /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
                          #47 0x00007fffe15f140d in  () at /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
                          #48 0x00007fffe15f6063 in  () at /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
                          #49 0x00007fffe15a2601 in  () at /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
                          #50 0x00007fffe18058db in  () at /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
                          #51 0x00007fffe15ec3ca in gtk_container_propagate_draw ()
                              at /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
                          #52 0x00007fffe16ed820 in  () at /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
                          #53 0x00007fffe15f140d in  () at /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
                          #54 0x00007fffe15f6063 in  () at /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
                          #55 0x00007fffe16ed6c1 in  () at /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
                          #56 0x00007fffe18058db in  () at /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
                          #57 0x00007fffe15ec3ca in gtk_container_propagate_draw ()
                              at /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
                          #58 0x00007fffe15ec4b2 in  () at /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
                          #59 0x00007fffe159fcf4 in  () at /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
                          #60 0x00007fffe15f140d in  () at /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
                          #61 0x00007fffe15f6063 in  () at /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
                          #62 0x00007fffe15a2601 in  () at /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
                          #63 0x00007fffe18058db in  () at /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
                          #64 0x00007fffe15ec3ca in gtk_container_propagate_draw ()
                              at /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
                          #65 0x00007fffe15ec4b2 in  () at /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
                          #66 0x00007fffe159fcf4 in  () at /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
                          #67 0x00007fffe15f140d in  () at /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
                          #68 0x00007fffe15f6063 in  () at /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
                          #69 0x00007fffe15a2601 in  () at /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
                          #70 0x00007fffe18058db in  () at /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
                          #71 0x00007fffe15ec3ca in gtk_container_propagate_draw ()
                              at /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
                          #72 0x00007fffe15ec4b2 in  () at /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
                          #73 0x00007fffe159fcf4 in  () at /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
                          #74 0x00007fffe15f140d in  () at /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
                          #75 0x00007fffe15f6063 in  () at /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
                          #76 0x00007fffe15a2601 in  () at /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
                          #77 0x00007fffe18058db in  () at /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
                          #78 0x00007fffe15ec3ca in gtk_container_propagate_draw ()
                              at /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
                          #79 0x00007fffe15ec4b2 in  () at /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
                          #80 0x00007fffe18136ef in  () at /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
                          #81 0x00007fffe18058db in  () at /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
                          #82 0x00007fffe180e998 in  () at /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
                          #83 0x00007fffe16b2859 in gtk_main_do_event ()
                              at /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
                          #84 0x00007fffe11c3765 in  () at /usr/lib/x86_64-linux-gnu/libgdk-3.so.0
                          #85 0x00007fffe11d37f5 in  () at /usr/lib/x86_64-linux-gnu/libgdk-3.so.0
                          #86 0x00007fffe11d49f6 in  () at /usr/lib/x86_64-linux-gnu/libgdk-3.so.0
                          #87 0x00007fffe11d4bf0 in  () at /usr/lib/x86_64-linux-gnu/libgdk-3.so.0
                          #88 0x00007fffdbdbc10d in g_closure_invoke ()
                              at /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
                          #89 0x00007fffdbdcf05e in  () at /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
                          #90 0x00007fffdbdd7715 in g_signal_emit_valist ()
                              at /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
                          #91 0x00007fffdbdd812f in g_signal_emit ()
                              at /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
                          #92 0x00007fffe11ccac9 in  () at /usr/lib/x86_64-linux-gnu/libgdk-3.so.0
                          #93 0x00007fffe11b8080 in  () at /usr/lib/x86_64-linux-gnu/libgdk-3.so.0
                          #94 0x00007fffeca4ed03 in  () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
                          #95 0x00007fffeca4e285 in g_main_context_dispatch ()
                              at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
                          #96 0x00007fffeca4e650 in  () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
                          #97 0x00007fffeca4e6dc in g_main_context_iteration ()
                              at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
                          #98 0x00007ffff5d7118f in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (this=0x5555559fc4b0, flags=...)
                              at kernel/qeventdispatcher_glib.cpp:423
                          #99 0x00007ffff5d17902 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) (this=this@entry=0x7fffffffda70, flags=..., flags@entry=...)
                              at kernel/qeventloop.cpp:225
                          #100 0x00007ffff5d20260 in QCoreApplication::exec() ()
                              at kernel/qcoreapplication.cpp:1373
                          #101 0x000055555555a767 in main(int, char**) (argc=<optimized out>, argv=<optimized out>) at main.cpp:66
                          
                          
                          1 Reply Last reply
                          0
                          • SGaistS Offline
                            SGaistS Offline
                            SGaist
                            Lifetime Qt Champion
                            wrote on last edited by
                            #14

                            Can you start your application with the QT_DEBUG_PLUGINS environment variable set 1 ?

                            Interested in AI ? www.idiap.ch
                            Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                            Tom assoT 1 Reply Last reply
                            0
                            • SGaistS SGaist

                              Can you start your application with the QT_DEBUG_PLUGINS environment variable set 1 ?

                              Tom assoT Offline
                              Tom assoT Offline
                              Tom asso
                              wrote on last edited by
                              #15

                              @SGaist - Thank you. I do that and output shows multiple image libraries being loaded:

                              loaded library "/home/oreilly/Qt/5.13.0/gcc_64/plugins/imageformats/libqgif.so"
                              loaded library "/home/oreilly/Qt/5.13.0/gcc_64/plugins/imageformats/libqicns.so"
                              loaded library "/home/oreilly/Qt/5.13.0/gcc_64/plugins/imageformats/libqico.so"
                              loaded library "/home/oreilly/Qt/5.13.0/gcc_64/plugins/imageformats/libqjpeg.so"
                              loaded library "/home/oreilly/Qt/5.13.0/gcc_64/plugins/imageformats/libqsvg.so"
                              loaded library "/home/oreilly/Qt/5.13.0/gcc_64/plugins/imageformats/libqtga.so"
                              loaded library "/home/oreilly/Qt/5.13.0/gcc_64/plugins/imageformats/libqtiff.so"
                              loaded library "/home/oreilly/Qt/5.13.0/gcc_64/plugins/imageformats/libqwbmp.so"
                              loaded library "/home/oreilly/Qt/5.13.0/gcc_64/plugins/imageformats/libqwebp.so"
                              

                              However these do not include libpng.so - probably because before building Qt I configured it to use my system's libpng; "./configure -system-libpng", while is libpng16. What else might the problem be?

                              1 Reply Last reply
                              0
                              • SGaistS Offline
                                SGaistS Offline
                                SGaist
                                Lifetime Qt Champion
                                wrote on last edited by
                                #16

                                What QPA and theme plugins gets loaded ?

                                Interested in AI ? www.idiap.ch
                                Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                                Tom assoT 1 Reply Last reply
                                0
                                • SGaistS SGaist

                                  What QPA and theme plugins gets loaded ?

                                  Tom assoT Offline
                                  Tom assoT Offline
                                  Tom asso
                                  wrote on last edited by Tom asso
                                  #17

                                  @SGaist - Thanks very much for your help!
                                  I discovered which library is causing the problem. It's a non-Qt library that doesn't directly rely on libpng, but it does rely on 50+ other libraries - apparently one of those does directly or indirectly rely on libpng. Apparently ldd doesn't show recursive dependencies, which surprises me. https://stackoverflow.com/questions/15064685/does-ldd-also-show-dependencies-of-dependencies/15064784#15064784

                                  1 Reply Last reply
                                  0
                                  • SGaistS Offline
                                    SGaistS Offline
                                    SGaist
                                    Lifetime Qt Champion
                                    wrote on last edited by
                                    #18

                                    What library was it ?

                                    Interested in AI ? www.idiap.ch
                                    Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                                    Tom assoT 2 Replies Last reply
                                    0
                                    • SGaistS SGaist

                                      What library was it ?

                                      Tom assoT Offline
                                      Tom assoT Offline
                                      Tom asso
                                      wrote on last edited by
                                      #19

                                      @SGaist - the segfault occurs when I link with /usr/local/lib/libgmt.so.6.0.0, for the Generic Mapping Tools. I built the library from source and installed on this system. Yet when I run 'ldd /usr/local/lib/libgmt.so.6.0.0' it does not display any dependency on libpng - I don't understand why...

                                      1 Reply Last reply
                                      0
                                      • SGaistS SGaist

                                        What library was it ?

                                        Tom assoT Offline
                                        Tom assoT Offline
                                        Tom asso
                                        wrote on last edited by
                                        #20

                                        @SGaist - also tried installing libgmt-dev (rather than building myself) - I get the same segfault due to "Incompatible libpng version in application and library"

                                        1 Reply Last reply
                                        0
                                        • SGaistS Offline
                                          SGaistS Offline
                                          SGaist
                                          Lifetime Qt Champion
                                          wrote on last edited by
                                          #21

                                          What is surprising is that you build everything with system dependencies and yet you have two different png libraries.

                                          Interested in AI ? www.idiap.ch
                                          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                                          Tom assoT 2 Replies Last reply
                                          0

                                          • Login

                                          • Login or register to search.
                                          • First post
                                            Last post
                                          0
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular
                                          • Users
                                          • Groups
                                          • Search
                                          • Get Qt Extensions
                                          • Unsolved