Search code examples
androidlinuxqtlinux-mint

Unknown command line option '-skip'


I'm trying to build Qt 5.11.1 from source for android using the guide but it fails at Preparing build tree. The command I use is:

../qtbase/configure -prefix /home/user/Qt/5.11.1/android_armv7 -release -xplatform android-g++ --disable-rpath -nomake tests -nomake examples -android-ndk-host linux-x86_64 -android-toolchain-version 4.9 -android-ndk /home/user/source_qt/android-ndk-r10e/ -android-sdk /home/user/Android/Sdk/ -no-warnings-are-errors -skip qttranslations -skip qtserialport -skip qtserialbus -skip qtscxml -skip qtscript -skip qtcharts -skip qt3d -skip qtdatavis3d -skip qtcanvas3d -skip qtgamepad -skip qtvirtualkeyboard -skip qtwayland -skip qtwebengine -skip qtwebchannel -skip qtwebsockets -android-arch armeabi-v7a

Which gives the following output:

Preparing build tree...
<srcbase> = /home/user/source_qt/qtbase 
<bldbase> = /home/user/source_qt/build 
<outbase> = /home/user/source_qt/build 
Creating qmake...
.Done.
ERROR: Unknown command line option '-skip'.

The -skip part in necessary to exclude components not supported by android, so I'm completely lost to why it says that "-skip is an unknown command".

I'm using Linux Mint 18.3 The NDK and SDK paths should be correct, and my java version is

java -version
openjdk version "1.8.0_171"
OpenJDK Runtime Environment (build 1.8.0_171-8u171-b11-0ubuntu0.16.04.1-b11)
OpenJDK 64-Bit Server VM (build 25.171-b11, mixed mode)

I tried searching for some info about that error, but not much comes up. If anyone has any idea what could be the cause of that error, I would be thankful.


Solution

  • You should run configure from top level of Qt sources and not from qtbase. In other words, you are giving top level configure options to qtbase configure which doesn't recognize them.