Qt 5.8 build on iOS



  • Trying to build the Qt 5.8 for iOS. I tried to use the following configure command

    ./configure -xplatform macx-ios-clang -release -I /usr/local/opt/openssl/include/ -opensource -L /usr/local/opt/iOS/openssl -nomake examples -nomake tests -openssl-linked -prefix /Users/dheerendrapurohit/QtSsl/iOS

    It failed with error error: unknown FP unit 'sse'

    Any hints on this issue ?


  • Lifetime Qt Champion

    Hi,

    Can you give the exact error you got ?
    Which version of Xcode are you using ?
    Where did you get the sources from ?



  • I got the source from git clone git://code.qt.io/qt/qt5.git
    I have xcode 8.2.1 and OSX EL Captain 10.11.6

    Finding it difficult to build of iOS. Are there any special considerations for building on iOS ? I'm able to build the same qt code for OSX & it works as well.



  • @dheerendra It sounds like you are building in SSE/SSE2 support. This won't work on most iOS devices as they run ARM processors which do not support SSE (an Intel thing).

    There are configure options to disable SSE. I don't know them off the top of my head but ./configure --help should show them to you.



  • I did not do any configuration like this. I thought mkspec should take care of this.


  • Moderators

    @dheerendra "It failed with error error: unknown FP unit 'sse'" - this is actually not an error. configure builds some small tests to check whether some features are available or not. For example it tries to build test code with SSE support. For iOS this test fails, which is OK since ARM does not support SSE, so configure disables SSE. This should not stop you from building for iOS - just ignore it.



  • @jsulm

    Thank you for response. Build does not proceed further from here. Tried 2-3 times.


  • Moderators

    @dheerendra Are you sure it stops on this SSE test? Is there something else?



  • It is not stopping while configuring. It is stopping while building it. Build fails & stops there.


  • Lifetime Qt Champion

    Then can you post the part of the log that is just before the actual stop ?



  • From the Qt 5.8.1 source, I build for Qt Desktop OSX. After that I did clean and tried to build for iOS. It started failing in weird manner. Once it failed is certificate, then it failed the current problem, after that it was complaining something else.

    Finally I did git check out of Qt 5.8 again in another directory. Started the fresh build. It worked perfectly.

    So conclusion is that it is not a good idea to use the same git checkout code for building for different platform. It is better to checkout for each platform build. At least this(new checkout) looked smooth to me after spending day to figure out why it failed earlier.


  • Lifetime Qt Champion

    No need to have several copies of the sources, that is just a wast of space.

    Do out of source builds, one per platform, that way you'll always be in a clean state. And if something goes wrong, just nuke the folder and start new.



  • I wanted to the same. Build for different platform from single source. It just did not work. Many times failed with some weird reason. Finally I built with fresh code and it worked. Offcourse I deleted old sources as well to save space in my system.

    Thank you all again



  • @SGaist I've never done an out of source built with Qt. I do them all the time with my own projects via cmake though.

    How do you do it with Qt? That is something that might come in very handy. I have had similar issues to @dheerendra. When I mess up a Qt build I usually nuke the whole directory re-extract the source and start over just to avoid problems like this one. Knowing how to shadow build Qt will be pretty useful in the future. :)


  • Lifetime Qt Champion

    Let's assume you have a Code folder and that your sources is uncompressed/checked out under Code/Qt_src
    The commands assume Unix like environment but the concept is the same for Windows.

    cd Code
    mkdir build_Qt5
    ../Qt_src/configure
    make -jX #where X = 2 * cpu_count + 1
    

    If you need to rebuild Qt because of a developer environment upgrade like a new major version of Xcode, don't just do rm -rf ./* nuke the build_Qt5 folder before starting over otherwise you'll miss hidden files that caches some settings and then can become problematic on new builds.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.