Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Beaglebone Crossompile: Cannot find lib not so easy fix

Beaglebone Crossompile: Cannot find lib not so easy fix

Scheduled Pinned Locked Moved Mobile and Embedded
beaglebone blac
9 Posts 3 Posters 3.2k Views
  • 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.
  • I Offline
    I Offline
    Ian Landi
    wrote on last edited by Ian Landi
    #1

    I have been following this tutorial for cross compiling on the beaglebone black (BBB).
    https://chaitramohankumar.wordpress.com/2014/08/13/building-qt4-8-6-for-embedded-linux/

    I have cross compiled QT 4.8.6 on my VM running Ubuntu 14.04.2 LTS for my BBB using an appropriate cross compiler. I then installed QT creator 2.8 on my VM. I set everything up in Qt Creator (the tool kit, etc). It connects to the BBB just fine. I built test app and this is where I hit the snag. When I try to run it (the green arrow) it errors out saying:

    stdin: is not a tty
    /home/debian/test: error while loading shared libraries: cannot find QtNetwork.so.4: cannot open shared object file: no such file or directory
    Remote application finished with exit code 127.

    I went into build environment and set LD_LIBRARY_PATH to /usr/local/Trollteh/QtEmbedded-4.8.6-arm/lib (where the cross compiled libs are). I copied the libs onto the beaglebone under the same directory path as well. I exported the path as LD_LIBRARY_PATH=/usr/local/.../lib. None of these fixes have worked and I have confirmed the exact file name exists within the lib directory. What do I do next?

    Also, out of curiosity how backwards compatible is Qt Creator? Can I use the most recent version to develop on even though I'm cross compiling 4.8.6 or what is the newest version I can use with Qt4? 2.8?

    1 Reply Last reply
    0
    • L Offline
      L Offline
      Leonardo
      wrote on last edited by
      #2

      I think you're setting the wrong variable. LD_LIBRARY_PATH is the runtime linkage directory, not compile time. You should add to your project file (.pro):

      LIBS += -L/usr/local/.../lib

      Then run qmake and try compiling again.

      I don't know about the backward compatibility of Qt creator. Sorry.

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

        Hi and welcome to devnet,

        You can use the latest version of Qt Creator without any problem to build Qt 4 software. The only thing that you must take into account for the version of Qt Creator is that since Qt 5.2 you need at least Qt Creator 3

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

        1 Reply Last reply
        0
        • L Leonardo

          I think you're setting the wrong variable. LD_LIBRARY_PATH is the runtime linkage directory, not compile time. You should add to your project file (.pro):

          LIBS += -L/usr/local/.../lib

          Then run qmake and try compiling again.

          I don't know about the backward compatibility of Qt creator. Sorry.

          I Offline
          I Offline
          Ian Landi
          wrote on last edited by Ian Landi
          #4

          @Leonardo Unfortunately this did not work either. It came back with the same error. I have also tried inserting the path into the /etc/ld.so.conf file and changing the directories under which the files are located (simplifying it) and then repeating all these work arounds. :/

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

            ld.so.conf is also used at run time. Adding the path to LIBS using -L is the way to go

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

            I 1 Reply Last reply
            0
            • SGaistS SGaist

              ld.so.conf is also used at run time. Adding the path to LIBS using -L is the way to go

              I Offline
              I Offline
              Ian Landi
              wrote on last edited by
              #6

              @SGaist It did not work. When I directly run the program on my BBB it comes up with a versioning error of GLIBC. When I fix this error and get it to run on my BBB I will try the console and update this post.

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

                That means that your cross-compile build is using a different Qt version than the one you have on your BBB

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

                I 1 Reply Last reply
                0
                • SGaistS SGaist

                  That means that your cross-compile build is using a different Qt version than the one you have on your BBB

                  I Offline
                  I Offline
                  Ian Landi
                  wrote on last edited by Ian Landi
                  #8

                  @SGaist I followed a tutorial and it worked for them. I am going to find an old version of Ubuntu with eglibc2.13 to run on my VM and cross compile against since I cannot update glibc to 2.17 on my BBB as my Qt program says is needed. Does this sound like a good plan?

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

                    I'd rather go with building Qt using your BBB root filesystem so you can have all the most recent part you can

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

                    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