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. Configuring Qt Creator for the Raspberry Pi on OS X
QtWS25 Last Chance

Configuring Qt Creator for the Raspberry Pi on OS X

Scheduled Pinned Locked Moved Unsolved Installation and Deployment
12 Posts 3 Posters 4.5k 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.
  • SGaistS Offline
    SGaistS Offline
    SGaist
    Lifetime Qt Champion
    wrote on last edited by
    #2

    Hi,

    From the error output you are likely trying to run the Linux binary of the cross-compiler which is not possible on OS X.

    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
    • J Offline
      J Offline
      JasonS
      wrote on last edited by JasonS
      #3

      Thanks for the tip. Based on what you said I was able to find a post in these forums that references http://www.jaredwolff.com/blog/cross-compiling-on-mac-osx-for-raspberry-pi/ (I think you posed it). I've tried countless times to get this to work and am not having luck. I went through everything and when doing ct-ng build I got a ton of warnings relating to all sorts of things. While the build was running I see that Jared shared a link to the compiled binaries so I downloaded them. The next step is to test everything that was done. I finally failed when running /Volumes/RBPi/arm-unknown-linux-gnueabi-gcc -o test test.c For the life of me I can't find arm-unknown-linux-gnueabi-gcc.

      I should be asking Jared about this, but thought I would tell you about my experiences just in case you had a thought on what is going on or if you know of any other tutorials to make this work.

      I understand the benefit of cross-compiling, but I'm wondering whether or not it's worth trying to get this to work. It seems that others have said it's rather difficult to get cross-compiling setup. Based on the design of my application that I have in my head I don't think it's a large one so compiling on the RasberryPi might not be that big of a deal, maybe. Based on your experience, what are your thoughts on setting up cross-compiling vs compiling on the RasberryPi?

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

        Depending on your RPI version, it can take a long time to compile natively especially Qt which is big.

        Personally, if I need to cross-compile something, I setup a virtual machine with Linux on it. It takes less time to get the setup to work.

        However, I'd be happy if you find a working solution for OS X.

        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
        • J Offline
          J Offline
          JasonS
          wrote on last edited by JasonS
          #5

          I'm trying the virtual machine route, but am running into the same issue with the error regarding the C++11 compiler" ERROR: Qt requires a C++11 compiler and yours does not seem to be that.

          Is there a specific version of Linux that I should be using? I am trying the latest version of Ubuntu.

          Here is the output again:
          cd qtbase

          • /home/jason/raspi/qt-everywhere-opensource-src-5.7.0/qtbase/configure -top-level -release -opengl es2 -device linux-rasp-pi2-g++ -device-option CROSS_COMPILE=/home/jason/raspi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin/arm-linux-gnueabihf- -sysroot /home/jason/raspi/sysroot -opensource -confirm-license -prefix /usr/local/qt5pi -extprefix /home/jason/raspi/qt5pi -hostprefix /home/jason/raspi/qt5 -v

          This is the Qt Open Source Edition.

          You are licensed to use this software under the terms of
          the GNU Lesser General Public License (LGPL) versions 3.
          You are also licensed to use this software under the terms of
          the GNU General Public License (GPL) versions 2.

          You have already accepted the terms of the Open Source license.

          /home/jason/raspi/qt-everywhere-opensource-src-5.7.0/qtbase/configure: 3494: /home/jason/raspi/qt-everywhere-opensource-src-5.7.0/qtbase/configure: /home/jason/raspi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin/arm-linux-gnueabihf-g++: not found
          DEFAULT_INCDIRS="/usr/include
          /usr/local/include"
          DEFAULT_LIBDIRS="/lib
          /usr/lib"
          Creating qmake...
          make: Nothing to be done for 'first'.
          Running configuration tests...
          Found pkg-config from $PATH: /usr/bin/pkg-config
          Note: PKG_CONFIG_LIBDIR automatically set to /home/jason/raspi/sysroot/usr/lib/pkgconfig:/home/jason/raspi/sysroot/usr/share/pkgconfig
          Note: PKG_CONFIG_SYSROOT_DIR automatically set to /home/jason/raspi/sysroot
          Determining architecture... ()
          /home/jason/raspi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin/arm-linux-gnueabihf-g++ -c -pipe -march=armv7-a -marm -mthumb-interwork -mfpu=neon-vfpv4 -mtune=cortex-a7 -mabi=aapcs-linux -mfloat-abi=hard --sysroot=/home/jason/raspi/sysroot -g -Wall -W -fPIC -I. -I../../mkspecs/devices/linux-rasp-pi2-g++ -o arch.o arch.cpp
          make: /home/jason/raspi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin/arm-linux-gnueabihf-g++: Command not found
          Makefile:196: recipe for target 'arch.o' failed
          make: *** [arch.o] Error 127
          Unable to determine architecture!

          Could not determine the target architecture!
          Turn on verbose messaging (-v) to see the final report.
          Determining architecture... ()
          g++ -c -pipe -g -Wall -W -fPIC -I. -I../../mkspecs/linux-g++ -o arch.o arch.cpp
          g++ -o arch arch.o
          Found architecture in binary
          CFG_HOST_ARCH="x86_64"
          CFG_HOST_CPUFEATURES=" mmx sse sse2"
          System architecture: 'unknown'
          Host architecture: 'x86_64'
          Precompiled-headers support disabled.
          /home/jason/raspi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin/arm-linux-gnueabihf-g++ -c -fvisibility=hidden fvisibility.c
          /home/jason/raspi/qt-everywhere-opensource-src-5.7.0/qtbase/config.tests/unix/fvisibility.test: 29: /home/jason/raspi/qt-everywhere-opensource-src-5.7.0/qtbase/config.tests/unix/fvisibility.test: /home/jason/raspi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin/arm-linux-gnueabihf-g++: not found
          Symbol visibility control disabled.
          /home/jason/raspi/qt-everywhere-opensource-src-5.7.0/qtbase/configure: 366: /home/jason/raspi/qt-everywhere-opensource-src-5.7.0/qtbase/configure: /home/jason/raspi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin/arm-linux-gnueabihf-g++: not found
          /home/jason/raspi/qt-everywhere-opensource-src-5.7.0/qtbase/configure: 366: /home/jason/raspi/qt-everywhere-opensource-src-5.7.0/qtbase/configure: /home/jason/raspi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin/arm-linux-gnueabihf-g++: not found
          /home/jason/raspi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin/arm-linux-gnueabihf-g++ --sysroot=/home/jason/raspi/sysroot -o libtest.so -shared -Wl,-Bsymbolic-functions -fPIC bsymbolic_functions.c
          /home/jason/raspi/qt-everywhere-opensource-src-5.7.0/qtbase/config.tests/unix/bsymbolic_functions.test: 18: /home/jason/raspi/qt-everywhere-opensource-src-5.7.0/qtbase/config.tests/unix/bsymbolic_functions.test: /home/jason/raspi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin/arm-linux-gnueabihf-g++: not found
          Symbolic function binding disabled.
          checking for C++11...
          /home/jason/raspi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin/arm-linux-gnueabihf-g++ -c -pipe -march=armv7-a -marm -mthumb-interwork -mfpu=neon-vfpv4 -mtune=cortex-a7 -mabi=aapcs-linux -mfloat-abi=hard --sysroot=/home/jason/raspi/sysroot -O2 -std=gnu++11 -Wall -W -fPIC -I. -I../../../mkspecs/devices/linux-rasp-pi2-g++ -o c++11.o c++11.cpp
          make: /home/jason/raspi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin/arm-linux-gnueabihf-g++: Command not found
          Makefile:195: recipe for target 'c++11.o' failed
          make: *** [c++11.o] Error 127
          C++11 disabled.
          ERROR: Qt requires a C++11 compiler and yours does not seem to be that.
          Please upgrade.

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

            Then install the cross-compiler provided by Ubuntu, it should be recent enough.

            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
            • J Offline
              J Offline
              JasonS
              wrote on last edited by
              #7

              I figured out what my issue was on Ubuntu. My Ubuntu VM is 64 bit so the 32 bit compiler wasn't working. I found the 64 bit version and was able to get past my error on Ubuntu. I need to use the 64 bit compiler, but build it for the 32 bit Raspberry or build a 32 bit VM.

              I think part of my issues stem from the fact that I don't really know what's going on with all the components need. I'm learning this as a go. I've read high level descriptions of what each is, but I need to understand them in detail and how they relate to the overall development process.

              Thanks for your help

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

                The fact that the compiler itself is 64bit doesn't mean it can't output 32bit code.

                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
                • J Offline
                  J Offline
                  JasonS
                  wrote on last edited by
                  #9

                  True, I did see that is possible; however that's one of the areas where I'm struggling with Linux development. Among other things I need to understand more about when to use what library. Different sources all seem to have different versions of libraries to use. How do you know what library and version to use for your particular installation?

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

                    Because it depends on what your target is and what you run on your target.

                    You could also be using something like the Yocto project where you cross-compile your whole system (including Qt).

                    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
                    • Y Offline
                      Y Offline
                      yj.oh
                      wrote on last edited by
                      #11

                      Have you found any working solution configuring Qt Creator for the Raspberry Pi on OS X?

                      J 1 Reply Last reply
                      0
                      • Y yj.oh

                        Have you found any working solution configuring Qt Creator for the Raspberry Pi on OS X?

                        J Offline
                        J Offline
                        JasonS
                        wrote on last edited by
                        #12

                        @yj.oh I did not find a way to make this work so I ended up making a Ubuntu VM on VirtualBox to get around this.

                        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