Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Could not load shared library symbols
Forum Updated to NodeBB v4.3 + New Features

Could not load shared library symbols

Scheduled Pinned Locked Moved Solved General and Desktop
4 Posts 3 Posters 13.3k Views 2 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.
  • B Offline
    B Offline
    Bremenpl
    wrote on last edited by A Former User
    #1

    Hello there,
    I am following this guide
    https://wiki.qt.io/RaspberryPi2EGLFS
    to deploy, run and debug qt applications on Raspberry Pi. Deploying and running part works for me, I am having problem with debugging. The debbuger provided with the tutorial does not support python scripting, so I could not use it with qt creator. Because of that, I have installed gdb-multiarch. I have set it in the Qt Creator patch and debug seems to be working, but not fully. When I start to debug, I get the message:

    Could not load shared library symbols for /usr/local/qt5pi/lib/libQt5Core.so.5.
    Do you need "set solib-search-path" or "set sysroot"?
    

    Some googling gave me a hint that my LD_LIBRARY_PATH is not set. So In the build tab (in Buld & run) I added a build enviroment variable LD_LIBRARY_PATH with patch to my libs. Now I was not sure which one was the right patch to the correct lib, but I tried all of them in the tutorial (also the remote executable path). Each time I get the error message, like nothing changes. Could someone please help me out with this? I would really appreciate all help.

    lprzenioslo.zut.edu.pl

    1 Reply Last reply
    1
    • B Offline
      B Offline
      Bremenpl
      wrote on last edited by
      #2

      I just found out how to overcome this, not sure either this is the right way of doing this. Seems a bit of a hack for me. Since setting LD_LIBRARY_PATH did not work for me, I tried to do this:
      Go to Tools -> Options -> Debugger -> GDB tab -> and in the "Additional Attach Commands" I added:

      set solib-search-path /home/lukasz/raspi/qt5pi/lib
      

      Where /home/lukasz/raspi/qt5pi/lib is the path to the crosscompiled libraries but on my host pc, not the target Raspberry Pi. Now when I debug there are no error messages. Maybe if someone knows a better way of doing this please post. Hope this helps someone.

      lprzenioslo.zut.edu.pl

      K 1 Reply Last reply
      0
      • D Offline
        D Offline
        dor666
        wrote on last edited by
        #3

        Hi Bremenpl,

        The standard way of doing this assumes that you have whole filesystem of target machine copied/mounted somewhere in your host machine - rootfs. Rootfs is a parameter of you configured Kit in QtCreator.

        If it's not set or you have different structure on your host machine - you have to tell gdb where to look for symbols (using selib-search-path)

        1 Reply Last reply
        2
        • B Bremenpl

          I just found out how to overcome this, not sure either this is the right way of doing this. Seems a bit of a hack for me. Since setting LD_LIBRARY_PATH did not work for me, I tried to do this:
          Go to Tools -> Options -> Debugger -> GDB tab -> and in the "Additional Attach Commands" I added:

          set solib-search-path /home/lukasz/raspi/qt5pi/lib
          

          Where /home/lukasz/raspi/qt5pi/lib is the path to the crosscompiled libraries but on my host pc, not the target Raspberry Pi. Now when I debug there are no error messages. Maybe if someone knows a better way of doing this please post. Hope this helps someone.

          K Offline
          K Offline
          KonstantinP
          wrote on last edited by
          #4

          @Bremenpl I've faced with the same problem. Your solution is work for me too. Thank you!

          1 Reply 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