Compile Qt; Make Install Problems



  • OS X 10.10.5, Qt 5.6.0, XCode Android

    I am in the process of setting up an Android environment to see how all this works. I have everything I need to compile Qt which I am able to do. The problem is when I try to run 'make install' to put all the files in a suitable installation tree I get a permission error part way through.

    When I compiled Qt my configuration looks like this:

    ./configure -xplatform android-g++ -nomake tests -nomake examples -android-ndk /Users/ron/Android/android-ndk-r10e -android-sdk /Users/ron/Android -android-ndk-host darwin-x86_64 -android-toolchain-version 4.8 -android-ndk-platform android—18 -android-arch armeabi-v7a -skip qttranslations -skip qtserialport -no-warnings-are-errors -prefix /Users/ron/Android/qt-5.6.0/usr/lib/qt5
    

    I added the prefix option to set the location where Qt will install itself. I wanted the installation location to be '/Users/ron/Android/qt-5.6.0/usr/lib/qt5'.

    After compiling Qt (which was successful) I ran 'make install' and after a minute or so I had this error:

    install -m 644 -p /Users/ron/Android/qt-5.6.0/qttools/include/QtUiTools/QUiLoader /Users/ron/Android/qt-5.6.0/usr/lib/qt5/include/QtUiTools/
    install -m 644 -p /Users/ron/Android/qt-5.6.0/qttools/include/QtUiTools/QtUiToolsVersion /Users/ron/Android/qt-5.6.0/usr/lib/qt5/include/QtUiTools/
    install -m 644 -p /Users/ron/Android/qt-5.6.0/qttools/src/designer/src/uitools/quiloader.h /Users/ron/Android/qt-5.6.0/usr/lib/qt5/include/QtUiTools/
    install -m 644 -p /Users/ron/Android/qt-5.6.0/qttools/include/QtUiTools/qtuitoolsversion.h /Users/ron/Android/qt-5.6.0/usr/lib/qt5/include/QtUiTools/
    install -m 644 -p /Users/ron/Android/qt-5.6.0/qttools/include/QtUiTools/QtUiTools /Users/ron/Android/qt-5.6.0/usr/lib/qt5/include/QtUiTools/
    install -m 644 -p /Users/ron/Android/qt-5.6.0/qttools/include/QtUiTools/QtUiToolsDepends /Users/ron/Android/qt-5.6.0/usr/lib/qt5/include/QtUiTools/
    install -m 644 -p /Users/ron/Android/qt-5.6.0/qttools/src/designer/src/uitools/quiloader_p.h /Users/ron/Android/qt-5.6.0/usr/lib/qt5/include/QtUiTools/5.6.0/QtUiTools/private/
    install -m 644 -p /Users/ron/Android/qt-5.6.0/qttools/mkspecs/modules-inst/qt_lib_uitools.pri /Users/ron/Android/qt-5.6.0/usr/lib/qt5/mkspecs/modules/
    install -m 644 -p /Users/ron/Android/qt-5.6.0/qttools/mkspecs/modules-inst/qt_lib_uitools_private.pri /Users/ron/Android/qt-5.6.0/usr/lib/qt5/mkspecs/modules/
    install -m 644 -p /Users/ron/Android/qt-5.6.0/qttools/lib/Qt5UiTools-android-dependencies.xml /Users/ron/Android/qt-5.6.0/usr/lib/qt5/lib/
    install -m 644 -p /Users/ron/Android/qt-5.6.0/qttools/lib/cmake/Qt5UiTools/Qt5UiToolsConfig.cmake /Users/ron/Android/qt-5.6.0/usr/lib/qt5/lib/cmake/Qt5UiTools/
    install -m 644 -p /Users/ron/Android/qt-5.6.0/qttools/lib/cmake/Qt5UiTools/Qt5UiToolsConfigVersion.cmake /Users/ron/Android/qt-5.6.0/usr/lib/qt5/lib/cmake/Qt5UiTools/
    cd linguist/ && ( test -e Makefile || /Users/ron/Android/qt-5.6.0/qtbase/bin/qmake /Users/ron/Android/qt-5.6.0/qttools/src/linguist/linguist.pro -o Makefile ) && /Applications/Xcode.app/Contents/Developer/usr/bin/make -f Makefile install
    cd lrelease/ && ( test -e Makefile || /Users/ron/Android/qt-5.6.0/qtbase/bin/qmake /Users/ron/Android/qt-5.6.0/qttools/src/linguist/lrelease/lrelease.pro -o Makefile ) && /Applications/Xcode.app/Contents/Developer/usr/bin/make -f Makefile install
    install -m 755 -p ../../../bin/lrelease /Users/ron/Android/qt-5.6.0/usr/lib/qt5/bin/lrelease
    cd lupdate/ && ( test -e Makefile || /Users/ron/Android/qt-5.6.0/qtbase/bin/qmake /Users/ron/Android/qt-5.6.0/qttools/src/linguist/lupdate/lupdate.pro -o Makefile ) && /Applications/Xcode.app/Contents/Developer/usr/bin/make -f Makefile install
    install -m 755 -p ../../../bin/lupdate /Users/ron/Android/qt-5.6.0/usr/lib/qt5/bin/lupdate
    cd lconvert/ && ( test -e Makefile || /Users/ron/Android/qt-5.6.0/qtbase/bin/qmake /Users/ron/Android/qt-5.6.0/qttools/src/linguist/lconvert/lconvert.pro -o Makefile ) && /Applications/Xcode.app/Contents/Developer/usr/bin/make -f Makefile install
    install -m 755 -p ../../../bin/lconvert /Users/ron/Android/qt-5.6.0/usr/lib/qt5/bin/lconvert
    install -m 644 -p /Users/ron/Android/qt-5.6.0/qttools/lib/cmake/Qt5LinguistTools/Qt5LinguistToolsConfig.cmake /Users/ron/Android/qt-5.6.0/usr/lib/qt5/lib/cmake/Qt5LinguistTools/
    install -m 644 -p /Users/ron/Android/qt-5.6.0/qttools/lib/cmake/Qt5LinguistTools/Qt5LinguistToolsConfigVersion.cmake /Users/ron/Android/qt-5.6.0/usr/lib/qt5/lib/cmake/Qt5LinguistTools/
    install -m 644 -p /Users/ron/Android/qt-5.6.0/qttools/lib/cmake/Qt5LinguistTools/Qt5LinguistToolsMacros.cmake /Users/ron/Android/qt-5.6.0/usr/lib/qt5/lib/cmake/Qt5LinguistTools/
    cd qdoc/ && ( test -e Makefile || /Users/ron/Android/qt-5.6.0/qtbase/bin/qmake /Users/ron/Android/qt-5.6.0/qttools/src/qdoc/qdoc.pro -o Makefile ) && /Applications/Xcode.app/Contents/Developer/usr/bin/make -f Makefile install
    install -m 755 -p ../../bin/qdoc /Users/ron/Android/qt-5.6.0/usr/lib/qt5/bin/qdoc
    cd qtplugininfo/ && ( test -e Makefile || /Users/ron/Android/qt-5.6.0/qtbase/bin/qmake /Users/ron/Android/qt-5.6.0/qttools/src/qtplugininfo/qtplugininfo.pro -o Makefile ) && /Applications/Xcode.app/Contents/Developer/usr/bin/make -f Makefile install
    mkdir: /libs/armeabi-v7a/: Permission denied
    make[3]: *** [install_target] Error 1
    make[2]: *** [sub-qtplugininfo-install_subtargets] Error 2
    make[1]: *** [sub-src-install_subtargets] Error 2
    make: *** [module-qttools-install_subtargets] Error 2
    

    Everything up to this point works fine. The folder is populated with everything as expected up to the point where the error occurs.

    The error is specifically from this line: 'mkdir: /libs/armeabi-v7a/: Permission denied'. Since I am not running the install as root I shouldn't be able to create a directory outside of my home folder. The error seems legit.

    I am looking for suggestions as to why this might be happening (is there a problem when using a local installation folder?). I don't normally create a local installation folder but in this case it made sense.

    Is there a way to recover from this? It seems to be only qtplugininfo and pretty much everything in qwayland that are a problem. The end result of installing is just to put the files in the right location (with permissions). Compiling Qt takes time and I have already tried a few variations without success (including removing qwayland).

    Note: I tried renaming the make file for qtplugininfo and found it was automatically re-created. I would have copied this one library over manually if it hadn't done this and not looked into this any further.



  • @Rondog Looks like a small bug in the make install script in Qt. I would check bug tracker or report it.

    You can adjust it manually before you make install or just use root and move the install after it's done.

    Edit: more info for manual fix.. Sorry to my eyes it was obvious but I forget people here are new. :)
    Just remove the leading / in the mkdir /libs/armeabi-v7a line. It is supposed to be mkdir libs/armeabi-v7a. That should allow your make install to finish correctly.

    Still report the bug though so it can be fixed officially. :)



  • @ambershark I walked through all the make files from the top down and ended up manually changing the one for qtplugininfo. The new version looks like this:

    install_target: first FORCE
    	@test -d $(INSTALL_ROOT)/Users/ron/Android/qt-5.6.0/usr/lib/qt5/lib || mkdir -p $(INSTALL_ROOT)/Users/ron/Android/qt-5.6.0/usr/lib/qt5/lib
    	-$(INSTALL_PROGRAM) ../../bin/$(QMAKE_TARGET) $(INSTALL_ROOT)/Users/ron/Android/qt-5.6.0/usr/lib/qt5/lib/$(QMAKE_TARGET)
    

    The old version was this:

    install_target: first FORCE
    	@test -d $(INSTALL_ROOT)/libs/armeabi-v7a/ || mkdir -p $(INSTALL_ROOT)/libs/armeabi-v7a/
    	-$(INSTALL_PROGRAM) ../../bin/$(QMAKE_TARGET) $(INSTALL_ROOT)/libs/armeabi-v7a/$(QMAKE_TARGET)
    

    I can see why it tried to create the directory and what triggered the error but how it happened is beyond me.

    I removed qwayland completely as I don't think I will need this at present. That entire module looks like it has this same problem in all the make files.

    Right now I am looking at a brand new Qt Android app on my Galaxy Tab 4 that I just created and installed 5 minutes ago. Looks pretty awesome even if it doesn't do anything significant. It is pretty cool to see everything fall into place.



  • Right now I am looking at a brand new Qt Android app on my Galaxy Tab 4 that I just created and installed 5 minutes ago. Looks pretty awesome even if it doesn't do anything significant. It is pretty cool to see everything fall into place.

    @Rondog Lol isn't it cool though? I remember dropping my first app (wasn't in Qt) on an android device and it was so cool feeling. :)

    As for Wayland.. most things don't have wayland support yet. Not sure if android ever will to be honest. Most desktops are just now getting it. So dropping wayland support and just using Xorg or whatever other X11 implementation should be totally fine.

    As for how it happens, someone just messed up on the makefile generation and most of us use sudo make install so I bet the developers do too and just didn't notice. Speaking from many years of experience that kind of thing is what still gets me even to this day.


Log in to reply
 

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