Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. WiringPi build error
Forum Updated to NodeBB v4.3 + New Features

WiringPi build error

Scheduled Pinned Locked Moved Solved Installation and Deployment
35 Posts 2 Posters 17.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.
  • jsulmJ jsulm

    @this No, that's not what I mean.
    What I mean: you need to use ARM build of libwiringPi for RPi.
    Can you please try what I asked before?
    What does (executed in a terminal)

    file /usr/local/lib/libwiringPi.so

    say?

    This line is wrong in many ways:

    #LIBS + = -L / usr / local / lib /libwiringPi.so
    

    First: it is commented out. Second: the path contains spaces. Third: you're using LIBS wrongly, it must be:

    LIBS+=-L/usr/local/lib -lwiringPi
    
    T Offline
    T Offline
    this
    wrote on last edited by
    #5

    @jsulm Sorry, but I did not understand.
    Do you want to type "file /usr/local/lib/libwiringPi.so" in the terminal?

    I entered the following results

    /usr/local/lib/libwiringPi.so:symbolic link to libwiringPi.so.2.44

    jsulmJ 1 Reply Last reply
    0
    • T this

      @jsulm Sorry, but I did not understand.
      Do you want to type "file /usr/local/lib/libwiringPi.so" in the terminal?

      I entered the following results

      /usr/local/lib/libwiringPi.so:symbolic link to libwiringPi.so.2.44

      jsulmJ Offline
      jsulmJ Offline
      jsulm
      Lifetime Qt Champion
      wrote on last edited by jsulm
      #6

      @this Now do

      file /usr/local/lib/libwiringPi.so.2.44
      

      And please fix LIBS as I said.

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      T 1 Reply Last reply
      0
      • jsulmJ jsulm

        @this Now do

        file /usr/local/lib/libwiringPi.so.2.44
        

        And please fix LIBS as I said.

        T Offline
        T Offline
        this
        wrote on last edited by this
        #7

        @jsulm I entered 'file /usr/local/lib/libwiringPi.so.2.44' in the terminal.
        I got the following results.

        /usr/local/lib/libwiringPi.so.2.44: ELF 32-bit LSB shared object, ARM, EABI5 version 1 (SYSV), dynamically linked, BuildID [sha1] = 13145f24d2081640dbda7cfb4d9648ceea0a77d6, not stripped

        I modified the LIBS as you said.
        But there are still errors.

        jsulmJ 1 Reply Last reply
        0
        • T this

          @jsulm I entered 'file /usr/local/lib/libwiringPi.so.2.44' in the terminal.
          I got the following results.

          /usr/local/lib/libwiringPi.so.2.44: ELF 32-bit LSB shared object, ARM, EABI5 version 1 (SYSV), dynamically linked, BuildID [sha1] = 13145f24d2081640dbda7cfb4d9648ceea0a77d6, not stripped

          I modified the LIBS as you said.
          But there are still errors.

          jsulmJ Offline
          jsulmJ Offline
          jsulm
          Lifetime Qt Champion
          wrote on last edited by
          #8

          @this Which errors?

          https://forum.qt.io/topic/113070/qt-code-of-conduct

          T 1 Reply Last reply
          0
          • jsulmJ jsulm

            @this Which errors?

            T Offline
            T Offline
            this
            wrote on last edited by
            #9

            @jsulm It is the same error as the first inquiry.
            "file not recognized:file format not recognized
            /usr/local/lib/libwiringPi.so
            collect2:error:ld returned 1 exit status"

            jsulmJ 1 Reply Last reply
            0
            • T this

              @jsulm It is the same error as the first inquiry.
              "file not recognized:file format not recognized
              /usr/local/lib/libwiringPi.so
              collect2:error:ld returned 1 exit status"

              jsulmJ Offline
              jsulmJ Offline
              jsulm
              Lifetime Qt Champion
              wrote on last edited by
              #10

              @this Did you rerun qmake after fixing LIBS in pro file?

              https://forum.qt.io/topic/113070/qt-code-of-conduct

              T 1 Reply Last reply
              0
              • jsulmJ jsulm

                @this Did you rerun qmake after fixing LIBS in pro file?

                T Offline
                T Offline
                this
                wrote on last edited by
                #11

                @jsulm Yes, of course.
                I also run rebuild.
                However, the same error occurs.

                jsulmJ 1 Reply Last reply
                0
                • T this

                  @jsulm Yes, of course.
                  I also run rebuild.
                  However, the same error occurs.

                  jsulmJ Offline
                  jsulmJ Offline
                  jsulm
                  Lifetime Qt Champion
                  wrote on last edited by
                  #12

                  @this Can you show your pro file and the build log? Are you actually building for ARM?

                  https://forum.qt.io/topic/113070/qt-code-of-conduct

                  T 1 Reply Last reply
                  0
                  • jsulmJ jsulm

                    @this Can you show your pro file and the build log? Are you actually building for ARM?

                    T Offline
                    T Offline
                    this
                    wrote on last edited by this
                    #13

                    @jsulm ![alt text](image url)0_1500020449778_capture2017-07-14 17-15-11.png

                    Do you need more information?

                    jsulmJ 1 Reply Last reply
                    0
                    • T this

                      @jsulm ![alt text](image url)0_1500020449778_capture2017-07-14 17-15-11.png

                      Do you need more information?

                      jsulmJ Offline
                      jsulmJ Offline
                      jsulm
                      Lifetime Qt Champion
                      wrote on last edited by jsulm
                      #14

                      @this Yes, I need the build log ("Compile Output" tab in QtCreator)

                      https://forum.qt.io/topic/113070/qt-code-of-conduct

                      T 1 Reply Last reply
                      0
                      • jsulmJ jsulm

                        @this Yes, I need the build log ("Compile Output" tab in QtCreator)

                        T Offline
                        T Offline
                        this
                        wrote on last edited by this
                        #15

                        @jsulm ![alt text](image url)0_1500020738334_capture, 2017-07-14 17-24-01.png

                        I am cross compiling Linux (ubuntu) to raspberrypi.

                        jsulmJ 1 Reply Last reply
                        0
                        • T this

                          @jsulm ![alt text](image url)0_1500020738334_capture, 2017-07-14 17-24-01.png

                          I am cross compiling Linux (ubuntu) to raspberrypi.

                          jsulmJ Offline
                          jsulmJ Offline
                          jsulm
                          Lifetime Qt Champion
                          wrote on last edited by
                          #16

                          @this The lib is EABI5: "ELF 32-bit LSB shared object, ARM, EABI5". I think RPi uses EABI7 or something. From where did you get the lib?

                          https://forum.qt.io/topic/113070/qt-code-of-conduct

                          T 1 Reply Last reply
                          0
                          • jsulmJ jsulm

                            @this The lib is EABI5: "ELF 32-bit LSB shared object, ARM, EABI5". I think RPi uses EABI7 or something. From where did you get the lib?

                            T Offline
                            T Offline
                            this
                            wrote on last edited by
                            #17

                            @jsulm I'm sorry, but I do not know what lib is.
                            I can not understand your words.
                            Are you referring to qt lib?
                            Are you talking raspberrypi?

                            We have installed cross compile environment by referring to the following site.
                            https://medium.com/@amirmann/how-to-cross-compile-qt-for-raspberry-pi-3-on-linux-ubuntu-for-beginners-75acf2a078c

                            jsulmJ 1 Reply Last reply
                            0
                            • T this

                              @jsulm I'm sorry, but I do not know what lib is.
                              I can not understand your words.
                              Are you referring to qt lib?
                              Are you talking raspberrypi?

                              We have installed cross compile environment by referring to the following site.
                              https://medium.com/@amirmann/how-to-cross-compile-qt-for-raspberry-pi-3-on-linux-ubuntu-for-beginners-75acf2a078c

                              jsulmJ Offline
                              jsulmJ Offline
                              jsulm
                              Lifetime Qt Champion
                              wrote on last edited by
                              #18

                              @this I'm talking about libwiringPi.so
                              How did you install this lib? Was it part of this cross compiling environment or did you get it from somewhere else?

                              https://forum.qt.io/topic/113070/qt-code-of-conduct

                              T 1 Reply Last reply
                              0
                              • jsulmJ jsulm

                                @this I'm talking about libwiringPi.so
                                How did you install this lib? Was it part of this cross compiling environment or did you get it from somewhere else?

                                T Offline
                                T Offline
                                this
                                wrote on last edited by this
                                #19

                                @jsulm I am sorry.
                                Installed.
                                The installation process is as follows:

                                git clone git://git.drogon.net/wiringPi
                                cd wiringPi/
                                git pull origin
                                ./build

                                At first we installed wiringPi from ubuntu pc.
                                However, I got the error like above and installed raspberrypi in the same way.

                                jsulmJ 1 Reply Last reply
                                0
                                • T this

                                  @jsulm I am sorry.
                                  Installed.
                                  The installation process is as follows:

                                  git clone git://git.drogon.net/wiringPi
                                  cd wiringPi/
                                  git pull origin
                                  ./build

                                  At first we installed wiringPi from ubuntu pc.
                                  However, I got the error like above and installed raspberrypi in the same way.

                                  jsulmJ Offline
                                  jsulmJ Offline
                                  jsulm
                                  Lifetime Qt Champion
                                  wrote on last edited by
                                  #20

                                  @this Sorry can you explain this: "At first we installed wiringPi from ubuntu pc.
                                  However, I got the error like above and installed raspberrypi in the same way."

                                  Do you mean you built it on the RaspberryPi and copied then to your Ubuntu PC?
                                  You should build it on your Ubuntu machine, but use the cross compilation environment.

                                  https://forum.qt.io/topic/113070/qt-code-of-conduct

                                  T 1 Reply Last reply
                                  0
                                  • jsulmJ jsulm

                                    @this Sorry can you explain this: "At first we installed wiringPi from ubuntu pc.
                                    However, I got the error like above and installed raspberrypi in the same way."

                                    Do you mean you built it on the RaspberryPi and copied then to your Ubuntu PC?
                                    You should build it on your Ubuntu machine, but use the cross compilation environment.

                                    T Offline
                                    T Offline
                                    this
                                    wrote on last edited by
                                    #21

                                    @jsulm Well ... you seem to have misunderstood.
                                    The build is ubuntu -> raspberrypi. (Cross compile)

                                    I have been struggling to eliminate the errors that have occurred.

                                    I first installed wiringPi via the terminal from ubuntu pc.

                                    However, I thought that a file not recognized error occurred and there was no file in raspberrypi.

                                    So raspberrypi installed wiringPi through the terminal.
                                    So I installed wiringPi related files in raspberrypi's / usr / local / lib folder.

                                    I thought this was the cause of the error.

                                    However, as you know, the error was not resolved and the question was raised

                                    jsulmJ 1 Reply Last reply
                                    0
                                    • T this

                                      @jsulm Well ... you seem to have misunderstood.
                                      The build is ubuntu -> raspberrypi. (Cross compile)

                                      I have been struggling to eliminate the errors that have occurred.

                                      I first installed wiringPi via the terminal from ubuntu pc.

                                      However, I thought that a file not recognized error occurred and there was no file in raspberrypi.

                                      So raspberrypi installed wiringPi through the terminal.
                                      So I installed wiringPi related files in raspberrypi's / usr / local / lib folder.

                                      I thought this was the cause of the error.

                                      However, as you know, the error was not resolved and the question was raised

                                      jsulmJ Offline
                                      jsulmJ Offline
                                      jsulm
                                      Lifetime Qt Champion
                                      wrote on last edited by
                                      #22

                                      @this I know that you're cross compiling.
                                      "However, I thought that a file not recognized error occurred and there was no file in raspberrypi." - for cross compilation it doesn't matter whether the lib is on RaspberryPi or not as you're building on your Ubuntu machine - you need it on your Ubuntu machine.
                                      So, on your Ubuntu machine the lib is this: /usr/local/lib/libwiringPi.so (symbolic link) and /usr/local/lib/libwiringPi.so.2.44 (lib itself), right?

                                      https://forum.qt.io/topic/113070/qt-code-of-conduct

                                      T 2 Replies Last reply
                                      0
                                      • jsulmJ jsulm

                                        @this I know that you're cross compiling.
                                        "However, I thought that a file not recognized error occurred and there was no file in raspberrypi." - for cross compilation it doesn't matter whether the lib is on RaspberryPi or not as you're building on your Ubuntu machine - you need it on your Ubuntu machine.
                                        So, on your Ubuntu machine the lib is this: /usr/local/lib/libwiringPi.so (symbolic link) and /usr/local/lib/libwiringPi.so.2.44 (lib itself), right?

                                        T Offline
                                        T Offline
                                        this
                                        wrote on last edited by this
                                        #23
                                        This post is deleted!
                                        1 Reply Last reply
                                        0
                                        • jsulmJ jsulm

                                          @this I know that you're cross compiling.
                                          "However, I thought that a file not recognized error occurred and there was no file in raspberrypi." - for cross compilation it doesn't matter whether the lib is on RaspberryPi or not as you're building on your Ubuntu machine - you need it on your Ubuntu machine.
                                          So, on your Ubuntu machine the lib is this: /usr/local/lib/libwiringPi.so (symbolic link) and /usr/local/lib/libwiringPi.so.2.44 (lib itself), right?

                                          T Offline
                                          T Offline
                                          this
                                          wrote on last edited by this
                                          #24

                                          @jsulm I solved the above error.
                                          LIBS += -L/usr/local/lib-lwiringPi
                                          I made a mistake in the spacing.
                                          However, a new error has occurred.
                                          Is this what I am doing wrong?
                                          I wrote the following in .pro.
                                          INCLUDEPATH + = / usr / local / include
                                          LIBS += -L/usr/local/lib-lwiringPi

                                          ![alt text](0_1500250620685_스크린샷, 2017-07-17 09-16-38.png image url)

                                          ![alt text](0_1500250727583_스크린샷, 2017-07-17 08-44-26.png image url)

                                          T 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