benlau / qtci

Collection of scripts to build Qt application in command line environment
Apache License 2.0
164 stars 54 forks source link

Script quits on welcome screen #22

Open Freezerohmatic opened 5 years ago

Freezerohmatic commented 5 years ago

I've been trying to get this to work for the past few days but I cannot get this script to run. It gets to the welcome screen then crashes, with the following "/home/travis/build/tekuma-tech/qgroundcontrol/qtci/bin/extract-qt-installer: line 337: 7348 Aborted (core dumped) QT_QPA_PLATFORM=minimal $INSTALLER $ARGS --script $SCRIPT"

benlau commented 5 years ago

What is the version of the Qt installer that you are using?

Freezerohmatic commented 5 years ago

5.7.1 but I have tried other versions..

From .travis.yml

            - wget -q -c http://download.qt-project.org/archive/qt/5.7/5.7.1/qt-opensource-linux-x64-android-5.7.1.run 
            - git clone https://github.com/benlau/qtci.git 
            - source qtci/path.env 
            - extract-qt-installer qt-opensource-linux-x64-android-5.7.1.run ~/Qt 
            - source qt-5.7.env 
Freezerohmatic commented 5 years ago

I have also tried using install-qt

Freezerohmatic commented 5 years ago

Any ideas what I'm doing wrong?

van9konst commented 5 years ago
Freezerohmatic commented 5 years ago

here is what I just tried but i'm going to try van9konst suggestion now.

git clone https://github.com/benlau/qtci.git && source qtci/path.env && chmod +x recipes/install-qt && chmod +x bin/extract-qt-installer && recipes/install-qt 5.7.1 ~/Qt &&

Freezerohmatic commented 5 years ago

wget https://raw.githubusercontent.com/van9konst/qtci/master/bin/extract-qt-installer && sudo mv extract-qt-installer /bin && sudo chmod +x /bin/extract-qt-installer && wget https://raw.githubusercontent.com/van9konst/qtci/master/recipes/install-qt && bash install-qt 5.9.4

yielded the same result

/bin/extract-qt-installer: line 296: 4086 Aborted (core dumped) QT_QPA_PLATFORM=minimal $INSTALLER $ARGS --script $SCRIPT

benlau commented 5 years ago

What is your Linux environment? I have tried Qt 5.7.1 Android, it is working fine with the script. I wonder that may have an incompatible library issue between your OS and the Qt installer.

Can you run the installer with GUI directly?

Freezerohmatic commented 5 years ago

Well this is the fun part. I'm running this on Travis.

On Wed., 10 Apr. 2019, 18:52 Ben Lau, notifications@github.com wrote:

What is your Linux environment? I have tried Qt 5.7.1 Android, it is working fine with the script. I wonder that may have an incompatible library issue between your OS and the Qt installer.

Can you run the installer with GUI directly?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/benlau/qtci/issues/22#issuecomment-481612651, or mute the thread https://github.com/notifications/unsubscribe-auth/ADupaRexMTQ9zDxrP-NKtWldp8omU_a3ks5vfa06gaJpZM4cjl9g .

benlau commented 5 years ago

Could you share your .travis.yml file?

Freezerohmatic commented 5 years ago

See below, I'm sending it like this since I been doing all my travis testing with the custom trigger option. So its not currently in my GIT repository.

Sorry for the delay, I had to shift my focus onto something else

   # if you update this file, please consider updating Vagrantfile too

        language: cpp
        dist: xenial

        env:
          global:
            - CCACHE_CPP2=1
            - CCACHE_DISABLE=1
            - JOBS=4
            - QT_FATAL_WARNINGS=1
            - SHADOW_BUILD_DIR=/tmp/shadow_build_dir
            - export VERBOSE=0

        matrix:
            fast_finish: true
            include:
                #- os: linux
                #  env: SPEC=linux-g++-64 CONFIG=installer
                #  sudo: required
                #- os: linux
                #  env: SPEC=linux-g++-64 CONFIG=debug
                #  services: xvfb
                #  sudo: required
                - os: android
                  language: android
                  env: SPEC=android-g++ CONFIG=installer
                  services: xvfb
                  sudo: false
                #- os: osx
                #  osx_image: xcode9.2
                #  env: SPEC=macx-clang CONFIG=installer
                #  sudo: required
                #- os: osx
                #  osx_image: xcode9.2
                #  env: SPEC=macx-ios-clang CONFIG=release
                #  sudo: false
        # OSX builds pared back to installer only since travis sucks so bad we can't afford more than one'
        # OSX builds pared back to installer only since travis sucks so bad we can't afford more than one'
        #        - os: osx
        #          osx_image: xcode8
        #          env: SPEC=macx-clang CONFIG=debug
        #          sudo: required
        #        - os: osx
        #          osx_image: xcode8
        #          env: SPEC=macx-ios-clang CONFIG=release
        #          sudo: false

        android:
          components:
            - android-21
            - build-tools-21.1.1
            - platform-tools
            - add-on
            - ccache
            - extra
            - wget

        addons:
          apt:
            sources:
            - sourceline: 'ppa:beineri/opt-qt571-xenial'
            packages:
            - ccache
            - espeak
            - libespeak-dev
            - libgstreamer-plugins-base1.0-dev
            - libgstreamer1.0-0:amd64
            - libgstreamer1.0-dev
            - gstreamer1.0-tools
            - libsdl2-dev
            - libudev-dev
            - wget

        cache:
          directories:
            - $HOME/.ccache

        before_install:

          # fetch entire git repo to properly determine the version
          - if [ "${CONFIG}" = "installer" ]; then
                cd ${TRAVIS_BUILD_DIR} && git fetch --unshallow && git fetch --all --tags;
            fi

          # install ccache for osx/ios
          - if [ "${TRAVIS_OS_NAME}" = "osx" ]; then
                wget https://s3.amazonaws.com/px4-travis/toolchain/macos/ccache &&
                chmod +x ccache && sudo mv ccache /usr/local/bin;
            fi

          # setup ccache
          #- ccache -M 500MB && ccache -z

          # compile threads
          - if [ "${TRAVIS_OS_NAME}" = "linux" ]; then
                export JOBS=$((`cat /proc/cpuinfo | grep -c ^processor`+1));
            elif [ "${TRAVIS_OS_NAME}" = "osx" ]; then
                export JOBS=$((`sysctl -n hw.ncpu`+1));
            fi

            #wget -q -c http://download.qt-project.org/archive/qt/5.7/5.7.1/qt-opensource-linux-x64-android-5.7.1.run &&

                #extract-qt-installer qt-opensource-linux-x64-android-5.7.1.run ~/Qt &&
                #source qt-5.7.env &&
          - if [ "${SPEC}" = "android-g++" ]; then
                wget https://raw.githubusercontent.com/van9konst/qtci/master/bin/extract-qt-installer && 
                sudo mv extract-qt-installer /bin && 
                sudo chmod +x /bin/extract-qt-installer && 
                wget https://raw.githubusercontent.com/van9konst/qtci/master/recipes/install-qt && 
                bash install-qt 5.9.4 &&
                wget -O libicu56.tar.gz "https://docs.google.com/uc?id=1uwbzpVrHBvSjJ-9c9jSF1IsFAOmEqOPq&export=download" &&
                sudo tar -zxvf libicu56.tar.gz -C /opt/qt57/lib/ &&
                export PATH=/tmp/Qt5.7-linux/5.7/gcc_64/bin:$PATH &&
                source /opt/qt57/bin/qt57-env.sh &&
                echo qtInstall &&
                wget -q https://gstreamer.freedesktop.org/data/pkg/android/1.14.0/gstreamer-1.0-android-universal-1.14.0.tar.bz2 &&
                echo DownloadingGstreamer &&
                mkdir -p ${TRAVIS_BUILD_DIR}/gstreamer-1.0-android-armv7-1.14.0 &&
                tar jxf gstreamer-1.0-android-universal-1.14.0.tar.bz2  -C ${TRAVIS_BUILD_DIR}/gstreamer-1.0-android-armv7-1.14.0 &&
                wget -q http://dl.google.com/android/ndk/android-ndk-r10e-linux-x86_64.bin &&
                chmod +x android-ndk-r10e-linux-x86_64.bin &&
                ./android-ndk-r10e-linux-x86_64.bin > /dev/null &&
                export ANDROID_NDK_ROOT=`pwd`/android-ndk-r10e &&
                export ANDROID_SDK_ROOT=/usr/local/android-sdk &&
                export PATH=/tmp/Qt5.7-android/5.7/android_armv7/bin:`pwd`/android-ndk-r10e:$PATH && echo $PATH
                ;
            fi
        install:
           #linux dependencies: qt
                #wget https://s3.amazonaws.com/downloads.bluerobotics.com/QGC/dependencies/Qt5.7.1-linux-min.tar.bz2 && 
                #tar jxf Qt5.7.1-linux-min.tar.bz2 -C /tmp &&
                #export PATH=/tmp/Qt5.7-linux/5.7/gcc_64/bin:$PATH &&
                #export DISPLAY=:99.0 &&
                #sh -e /etc/init.d/xvfb start
                #sudo apt-get install qt57base qt57svg qt57charts-no-lgpl qt57xmlpatterns
                #source /opt/qt57/bin/qt57-env.sh
                #sudo add-apt-repository ppa:beineri/opt-qt571-xenial -y &&

          - if [ "${SPEC}" = "linux-g++-64" ]; then
                sudo add-apt-repository ppa:beineri/opt-qt571-xenial -y &&
                sudo apt-get update && 
                sudo apt-get install qt57-meta-minimal qt57base &&
                sudo apt-get install qt573d qt57canvas3d qt57charts-no-lgpl 
                qt57connectivity qt57datavis3d-no-lgpl qt57declarative
                qt57declarative-render2d-no-lgpl qt57gamepad qt57graphicaleffects
                qt57imageformats qt57location qt57multimedia qt57quickcontrols
                qt57quickcontrols2 qt57script qt57scxml qt57sensors qt57serialbus
                qt57serialport qt57svg qt57tools qt57translations qt57virtualkeyboard-no-lgpl
                qt57wayland qt57webchannel qt57webengine qt57websockets qt57x11extras qt57xmlpatterns &&
                wget -O libicu56.tar.gz "https://docs.google.com/uc?id=1uwbzpVrHBvSjJ-9c9jSF1IsFAOmEqOPq&export=download" &&
                sudo tar -zxvf libicu56.tar.gz -C /opt/qt57/lib/ &&
                export PATH=/tmp/Qt5.7-linux/5.7/gcc_64/bin:$PATH &&
                source /opt/qt57/bin/qt57-env.sh
                ;
            fi

          #wget https://s3-us-west-2.amazonaws.com/qgroundcontrol/dependencies/gstreamer-1.0-android-armv7-1.5.2.tar.bz2 &&

                  #wget https://s3-us-west-2.amazonaws.com/qgroundcontrol/dependencies/Qt5.7.1-android-min.tar.bz2 &&
                #tar jxf Qt5.7.1-android-min.tar.bz2 -C /tmp &&
          # android dependencies: qt, gstreamer, android-ndk
          #sudo bash install-qt 5.9.4 &&

          #- if [ "${SPEC}" = "android-g++" ]; then
          #      curl -L https://raw.githubusercontent.com/benlau/qtci/master/recipes/install-qt --output install-qt &&
          #      curl -L https://raw.githubusercontent.com/benlau/qtci/master/bin/extract-qt-installer --output extract-qt-installer &&
          #      chmod +x install-qt &&
          #      chmod +x extract-qt-installer &&
          #      export PATH=$PATH:$PWD &&
          #      QT_CI_DOWNLOADER="wget -c -nv -N" install-qt 5.7.1 &&
          #      source qt-5.7.1.env &&
          #      echo qtInstall &&
          #      wget -q https://gstreamer.freedesktop.org/data/pkg/android/1.14.0/gstreamer-1.0-android-universal-1.14.0.tar.bz2 &&
          #      echo DownloadingGstreamer &&
          #      mkdir -p ${TRAVIS_BUILD_DIR}/gstreamer-1.0-android-armv7-1.14.0 &&
          #      tar jxf gstreamer-1.0-android-universal-1.14.0.tar.bz2  -C ${TRAVIS_BUILD_DIR}/gstreamer-1.0-android-armv7-1.14.0 &&
          #      wget -q http://dl.google.com/android/ndk/android-ndk-r10e-linux-x86_64.bin &&
          #      chmod +x android-ndk-r10e-linux-x86_64.bin &&
          #      ./android-ndk-r10e-linux-x86_64.bin > /dev/null &&
          #      export ANDROID_NDK_ROOT=`pwd`/android-ndk-r10e &&
          #      export ANDROID_SDK_ROOT=/usr/local/android-sdk &&
          #      export PATH=/tmp/Qt5.7-android/5.7/android_armv7/bin:`pwd`/android-ndk-r10e:$PATH && echo $PATH
          #      ;
          #  fi

          # osx dependencies: qt, gstreamer, gstreamer-devel
                #wget https://s3-us-west-2.amazonaws.com/qgroundcontrol/dependencies/Qt5.7.1-mac-clang-min.tar.bz2 &&
                #tar jxf Qt5.7.1-mac-clang-min.tar.bz2 -C /tmp &&

                #git clone https://github.com/benlau/qtci.git &&
                #source qtci/path.env &&
                #chmod +x recipes/install-qt &&
                #chmod +x bin/extract-qt-installer &&
                #recipes/install-qt 5.7.1 ~/Qt &&
          - if [ "${SPEC}" = "macx-clang" ]; then
                wget https://gstreamer.freedesktop.org/data/pkg/osx/1.14.0/gstreamer-1.0-1.14.0-x86_64.pkg &&
                sudo installer -verboseR -pkg gstreamer-1.0-1.14.0-x86_64.pkg -target / &&
                wget https://gstreamer.freedesktop.org/data/pkg/osx/1.14.0/gstreamer-1.0-devel-1.14.0-x86_64.pkg &&
                sudo installer -verboseR -pkg gstreamer-1.0-devel-1.14.0-x86_64.pkg -target / &&
                export QT_DIR=Qt5.7-mac-clang/5.7/clang_64 &&
                export QT_QPA_PLATFORM_PLUGIN_PATH=/tmp/$QT_DIR/plugins &&
                export QML2_IMPORT_PATH=/tmp/$QT_DIR/qml &&
                export PATH=/tmp/$QT_DIR/bin:$PATH
                ;
            fi

          # ios dependencies: qt, TODO: add gstreamer
                #wget https://s3-us-west-2.amazonaws.com/qgroundcontrol/dependencies/Qt5.8.0-ios-min.tar.bz2 &&
                #tar jxf Qt5.8.0-ios-min.tar.bz2 -C /tmp &&

          - if [ "${SPEC}" = "macx-ios-clang" ]; then
                export IOS_CCACHE_CC=`/usr/bin/xcrun -sdk iphoneos -find clang` &&
                export IOS_CCACHE_CXX=`/usr/bin/xcrun -sdk iphoneos -find clang++` &&
                export PATH=/tmp/Qt5.8-ios/5.8/ios/bin:$PATH &&
                tools/patch_qt_for_xcode8.sh
                ;
            fi

        before_script:
          - cd ${TRAVIS_BUILD_DIR}

          # grab latest PX4 parameter and airframe metadata
          - wget http://px4-travis.s3.amazonaws.com/Firmware/master/parameters.xml -O src/FirmwarePlugin/PX4/PX4ParameterFactMetaData.xml
          - wget http://px4-travis.s3.amazonaws.com/Firmware/master/airframes.xml -O src/AutoPilotPlugins/PX4/AirframeFactMetaData.xml

          # switch android config from installer to release if the android storepass isn't available
          - if [[ "${SPEC}" = "android-g++" && "${CONFIG}" = "installer" && -z ${ANDROID_STOREPASS} ]]; then
                export CONFIG=release;
            fi

          # insert QGC version in AndroidManifest.xml
          - if [ "${SPEC}" = "android-g++" ]; then
                git remote set-branches origin 'master' &&
                git fetch origin master &&
                ./tools/update_android_version.sh;
            fi

        script:
          # run qmake
          - mkdir ${SHADOW_BUILD_DIR} && cd ${SHADOW_BUILD_DIR}
          - qmake -r ${TRAVIS_BUILD_DIR}/qgroundcontrol.pro CONFIG+=${CONFIG} CONFIG+=WarningsAsErrorsOn -spec ${SPEC}

          # compile
          - if [ "${SPEC}" != "macx-ios-clang" ]; then
                make -j$JOBS;
            else
                xcodebuild -IDEBuildOperationMaxNumberOfConcurrentCompileTasks=$JOBS -configuration Release CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO | xcpretty -c && $(exit ${PIPESTATUS[0]});
            fi
          #- ccache -s

          # unit tests linux
          - if [[ "${SPEC}" = "linux-g++-64" && "${CONFIG}" = "debug" ]]; then
                mkdir -p ~/.config/QtProject/ && cp ${TRAVIS_BUILD_DIR}/test/qtlogging.ini ~/.config/QtProject/ &&
                    ./debug/qgroundcontrol-start.sh --unittest;
            fi

        after_success:
          - cd ${TRAVIS_BUILD_DIR}

          # master development builds to beta track
          # tagged releases first to beta track then manually move to production
          - GOOGLE_PLAY_PKG=org.mavlink.qgroundcontrolbeta
          - if [ "${TRAVIS_TAG}" ]; then
                GOOGLE_PLAY_PKG=org.mavlink.qgroundcontrol;
            fi
          - if [[ "${SPEC}" = "android-g++" && "${TRAVIS_PULL_REQUEST}" = "false" && "${TRAVIS_BRANCH}" = "master" ]]; then
                pip install --user google-api-python-client PyOpenSSL &&
                openssl aes-256-cbc -K $encrypted_25db6eb7c3fd_key -iv $encrypted_25db6eb7c3fd_iv -in android/Google_Play_Android_Developer-4432a3c4f5d1.json.enc -out android/Google_Play_Android_Developer-4432a3c4f5d1.json -d &&
                ./tools/google_play_upload.py production ${GOOGLE_PLAY_PKG} ${SHADOW_BUILD_DIR}/release/package/QGroundControl.apk;
            fi

        before_deploy:
          # create linux appimage
          - cd ${TRAVIS_BUILD_DIR}
          - if [[ "${SPEC}" = "linux-g++-64" && "${CONFIG}" = "installer" ]]; then
                ./deploy/create_linux_appimage.sh ${TRAVIS_BUILD_DIR} ${SHADOW_BUILD_DIR}/release ${SHADOW_BUILD_DIR}/release/package;
            fi

        deploy:
          - provider: releases
            api_key: ${botKey} 
            file_glob: true
            file:
              - ${SHADOW_BUILD_DIR}/release/package/qgroundcontrol.*
              - ${SHADOW_BUILD_DIR}/release/package/QGroundControl.*
            skip-cleanup: true
            on:
              tags: true
              all_branches: true
              condition: $CONFIG = installer
benlau commented 5 years ago

huh? I just realize that it is not using the script from this repo?

Freezerohmatic commented 5 years ago

Oops this was from me trying everything under the sun to get this to work.

just tried this,

          - if [ "${SPEC}" = "android-g++" ]; then
                curl -L

https://raw.githubusercontent.com/benlau/qtci/master/recipes/install-qt --output install-qt && curl -L https://raw.githubusercontent.com/benlau/qtci/master/bin/extract-qt-installer --output extract-qt-installer && chmod +x install-qt && chmod +x extract-qt-installer && export PATH=$PATH:$PWD && QT_CI_DOWNLOADER="wget -c -nv -N" install-qt 5.7.1 && source qt-5.7.1.env && echo qtInstall && wget -q https://gstreamer.freedesktop.org/data/pkg/android/1.14.0/gstreamer-1.0-android-universal-1.14.0.tar.bz2 && echo DownloadingGstreamer && mkdir -p ${TRAVIS_BUILD_DIR}/gstreamer-1.0-android-armv7-1.14.0 && tar jxf gstreamer-1.0-android-universal-1.14.0.tar.bz2 -C ${TRAVIS_BUILD_DIR}/gstreamer-1.0-android-armv7-1.14.0 && wget -q http://dl.google.com/android/ndk/android-ndk-r10e-linux-x86_64.bin && chmod +x android-ndk-r10e-linux-x86_64.bin && ./android-ndk-r10e-linux-x86_64.bin > /dev/null && export ANDROID_NDK_ROOT=pwd/android-ndk-r10e && export ANDROID_SDK_ROOT=/usr/local/android-sdk && export PATH=/tmp/Qt5.7-android/5.7/android_armv7/bin:pwd/android-ndk-r10e:$PATH && echo $PATH ; fi

same result

Michael Griffin

On Mon, Apr 22, 2019 at 3:40 AM Ben Lau notifications@github.com wrote:

huh? I just realize that it is not using the script from this repo?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/benlau/qtci/issues/22#issuecomment-485271352, or mute the thread https://github.com/notifications/unsubscribe-auth/AA52S2PIFWOTK72RRBTZKCDPRSUYDANCNFSM4HEOL5QA .

Freezerohmatic commented 5 years ago

[92] Loaded control script "/tmp/tmp.WFNiKXnQO" [92] Using control script: "/tmp/tmp.WFNiKXnQO" [95] QTCI: Welcome Page /home/travis/build/tekuma-tech/qgroundcontrol/extract-qt-installer: line 337: 4146 Aborted (core dumped) QT_QPA_PLATFORM=minimal $INSTALLER $ARGS --script $SCRIPT

Michael Griffin

On Mon, Apr 22, 2019 at 5:00 PM Michael Griffin michael.griffin@ieee.org wrote:

Oops this was from me trying everything under the sun to get this to work.

just tried this,

          - if [ "${SPEC}" = "android-g++" ]; then
                curl -L

https://raw.githubusercontent.com/benlau/qtci/master/recipes/install-qt --output install-qt && curl -L https://raw.githubusercontent.com/benlau/qtci/master/bin/extract-qt-installer --output extract-qt-installer && chmod +x install-qt && chmod +x extract-qt-installer && export PATH=$PATH:$PWD && QT_CI_DOWNLOADER="wget -c -nv -N" install-qt 5.7.1 && source qt-5.7.1.env && echo qtInstall && wget -q https://gstreamer.freedesktop.org/data/pkg/android/1.14.0/gstreamer-1.0-android-universal-1.14.0.tar.bz2 && echo DownloadingGstreamer && mkdir -p ${TRAVIS_BUILD_DIR}/gstreamer-1.0-android-armv7-1.14.0 && tar jxf gstreamer-1.0-android-universal-1.14.0.tar.bz2 -C ${TRAVIS_BUILD_DIR}/gstreamer-1.0-android-armv7-1.14.0 && wget -q http://dl.google.com/android/ndk/android-ndk-r10e-linux-x86_64.bin && chmod +x android-ndk-r10e-linux-x86_64.bin && ./android-ndk-r10e-linux-x86_64.bin > /dev/null && export ANDROID_NDK_ROOT=pwd/android-ndk-r10e && export ANDROID_SDK_ROOT=/usr/local/android-sdk && export PATH=/tmp/Qt5.7-android/5.7/android_armv7/bin:pwd/android-ndk-r10e:$PATH && echo $PATH ; fi

same result

Michael Griffin

On Mon, Apr 22, 2019 at 3:40 AM Ben Lau notifications@github.com wrote:

huh? I just realize that it is not using the script from this repo?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/benlau/qtci/issues/22#issuecomment-485271352, or mute the thread https://github.com/notifications/unsubscribe-auth/AA52S2PIFWOTK72RRBTZKCDPRSUYDANCNFSM4HEOL5QA .