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. Error in building Qt 5.9.7 in docker ubuntu
Forum Updated to NodeBB v4.3 + New Features

Error in building Qt 5.9.7 in docker ubuntu

Scheduled Pinned Locked Moved Solved Installation and Deployment
4 Posts 2 Posters 1.2k Views 1 Watching
  • 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.
  • D Offline
    D Offline
    dxsooo
    wrote on last edited by
    #1

    Hi all, I tried to build qt docker image follow http://wiki.qt.io/Building_Qt_5_from_Git and below is my Dockerfile

    FROM ubuntu:16.04
    
    ENV QT_VERSION v5.9.7
    
    # base
    RUN apt-get -qq update && apt-get install -qqy build-essential perl python git cmake wget
    
    # xcb
    RUN apt-get install -qqy '^libxcb.*-dev' libx11-xcb-dev libglu1-mesa-dev libxrender-dev libxi-dev
    
    # webengine
    RUN apt-get install -qqy libssl-dev libxcursor-dev libxcomposite-dev libxdamage-dev libxrandr-dev libdbus-1-dev libfontconfig1-dev libcap-dev libxtst-dev libpulse-dev libudev-dev libpci-dev libnss3-dev libasound2-dev libxss-dev libegl1-mesa-dev gperf bison
    
    # clone
    RUN git clone https://code.qt.io/qt/qt5.git && cd qt5 && git checkout $QT_VERSION && ./init-repository --module-subset=default,-qtwebengine,-qtcharts,-qtdatavis3d,-qtpurchasing,-qtvirtualkeyboard,-qtnetworkauth,-qtremoteobjects,-qtscript,-qtspeech
    
    # build
    RUN cd qt5 && mkdir qt5-build && cd qt5-build && ../configure -opensource -nomake examples -nomake tests -confirm-license && make -j4 && make install
    
    

    It ran into error in building Qt3d and QtLocation in make.

    {standard input}: Assembler messages:
    {standard input}:275663: Warning: end of file not at end of a line; newline inserted
    g++ -c -pipe -O2 -std=c++1z -fvisibility=hidden -fvisibility-inlines-hidden -fno-exceptions -Wall -W -Wvla -Wdate-time -D_REENTRANT -fPIC -DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT -DQT_NO_EXCEPTIONS -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_NO_DEBUG -DQT_PLUGIN -DQT_LOCATION_LIB -DQT_QUICK_LIB -DQT_GUI_LIB -DQT_POSITIONING_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CONCURRENT_LIB -DQT_CORE_LIB -I/qt5/qtlocation/src/plugins/geoservices/osm -I. -I../../../../include/QtLocation/5.9.7 -I../../../../include/QtLocation/5.9.7/QtLocation -I/qt5/qt5-build/qtdeclarative/include/QtQuick/5.9.7 -I/qt5/qt5-build/qtdeclarative/include/QtQuick/5.9.7/QtQuick -I/qt5/qt5-build/qtbase/include/QtGui/5.9.7 -I/qt5/qt5-build/qtbase/include/QtGui/5.9.7/QtGui -I../../../../include -I../../../../include/QtLocation -I/qt5/qt5-build/qtdeclarative/include -I/qt5/qt5-build/qtdeclarative/include/QtQuick -I/qt5/qt5-build/qtbase/include -I/qt5/qt5-build/qtbase/include/QtGui -I../../../../include/QtPositioning/5.9.7 -I../../../../include/QtPositioning/5.9.7/QtPositioning -I/qt5/qt5-build/qtdeclarative/include/QtQml/5.9.7 -I/qt5/qt5-build/qtdeclarative/include/QtQml/5.9.7/QtQml -I/qt5/qt5-build/qtbase/include/QtCore/5.9.7 -I/qt5/qt5-build/qtbase/include/QtCore/5.9.7/QtCore -I../../../../include/QtPositioning -I/qt5/qt5-build/qtdeclarative/include/QtQml -I/qt5/qt5-build/qtbase/include/QtNetwork -I/qt5/qt5-build/qtbase/include/QtConcurrent -I/qt5/qt5-build/qtbase/include/QtCore -I.moc -isystem /usr/include/libdrm -I/qt5/qtbase/mkspecs/linux-g++ -o .obj/moc_qplacecategoriesreplyosm.o .moc/moc_qplacecategoriesreplyosm.cpp
    g++: internal compiler error: Killed (program cc1plus)
    Please submit a full bug report,
    with preprocessed source if appropriate.
    See <file:///usr/share/doc/gcc-5/README.Bugs> for instructions.
    Makefile:5929: recipe for target '.obj/IFCReaderGen1.o' failed
    make[4]: *** [.obj/IFCReaderGen1.o] Error 4
    make[4]: Leaving directory '/qt5/qt5-build/qt3d/src/plugins/sceneparsers/assimp'
    Makefile:46: recipe for target 'sub-assimp-make_first' failed
    make[3]: *** [sub-assimp-make_first] Error 2
    make[3]: Leaving directory '/qt5/qt5-build/qt3d/src/plugins/sceneparsers'
    Makefile:221: recipe for target 'sub-plugins-sceneparsers-make_first' failed
    make[2]: *** [sub-plugins-sceneparsers-make_first] Error 2
    make[2]: Leaving directory '/qt5/qt5-build/qt3d/src'
    Makefile:47: recipe for target 'sub-src-make_first' failed
    make[1]: *** [sub-src-make_first] Error 2
    make[1]: Leaving directory '/qt5/qt5-build/qt3d'
    Makefile:484: recipe for target 'module-qt3d-make_first' failed
    make: *** [module-qt3d-make_first] Error 2
    
    g++: internal compiler error: Killed (program cc1plus)
    Please submit a full bug report,
    with preprocessed source if appropriate.
    See <file:///usr/share/doc/gcc-5/README.Bugs> for instructions.
    make[5]: *** [.obj/src/mbgl/annotation/shape_annotation_impl.o] Error 4
    Makefile:17362: recipe for target '.obj/src/mbgl/annotation/shape_annotation_impl.o' failed
    make[5]: *** Waiting for unfinished jobs....
    make[5]: Leaving directory '/qt5/qt5-build/qtlocation/src/3rdparty/mapbox-gl-native'
    make[4]: *** [sub-------3rdparty-mapbox-gl-native-make_first] Error 2
    Makefile:200: recipe for target 'sub-------3rdparty-mapbox-gl-native-make_first' failed
    make[4]: Leaving directory '/qt5/qt5-build/qtlocation/src/plugins/geoservices'
    make[3]: *** [sub-geoservices-make_first] Error 2
    Makefile:70: recipe for target 'sub-geoservices-make_first' failed
    make[3]: Leaving directory '/qt5/qt5-build/qtlocation/src/plugins'
    Makefile:204: recipe for target 'sub-plugins-make_first' failed
    make[2]: *** [sub-plugins-make_first] Error 2
    make[2]: Leaving directory '/qt5/qt5-build/qtlocation/src'
    Makefile:46: recipe for target 'sub-src-make_first' failed
    make[1]: *** [sub-src-make_first] Error 2
    make[1]: Leaving directory '/qt5/qt5-build/qtlocation'
    make: *** [module-qtlocation-make_first] Error 2
    Makefile:668: recipe for target 'module-qtlocation-make_first' failed
    

    I have no idea for these errors and may be I missing some deps?

    1 Reply Last reply
    0
    • sierdzioS sierdzio

      Aren't you running out of RAM or something?

      Another thought: install dependencies using apt build-dep qt5-qmake, it might include something that you missed from other calls.

      BTW. you don't have to clone from git (it takes a long time), you can use the tarballs from Qt archive. For example, here are the packages for Qt 5.12.1 https://download.qt.io/archive/qt/5.12/5.12.1/single/. Not only there is less to download, but also you don't need to run init-repository in this case.

      D Offline
      D Offline
      dxsooo
      wrote on last edited by
      #4

      @sierdzio Oops, you are right. Docker in Mac limits to 2GB memory, and it passed when I enlarge to 8GB

      reply

      1 Reply Last reply
      1
      • sierdzioS Offline
        sierdzioS Offline
        sierdzio
        Moderators
        wrote on last edited by
        #2

        Aren't you running out of RAM or something?

        Another thought: install dependencies using apt build-dep qt5-qmake, it might include something that you missed from other calls.

        BTW. you don't have to clone from git (it takes a long time), you can use the tarballs from Qt archive. For example, here are the packages for Qt 5.12.1 https://download.qt.io/archive/qt/5.12/5.12.1/single/. Not only there is less to download, but also you don't need to run init-repository in this case.

        (Z(:^

        D 1 Reply Last reply
        4
        • D Offline
          D Offline
          dxsooo
          wrote on last edited by
          #3
          This post is deleted!
          1 Reply Last reply
          0
          • sierdzioS sierdzio

            Aren't you running out of RAM or something?

            Another thought: install dependencies using apt build-dep qt5-qmake, it might include something that you missed from other calls.

            BTW. you don't have to clone from git (it takes a long time), you can use the tarballs from Qt archive. For example, here are the packages for Qt 5.12.1 https://download.qt.io/archive/qt/5.12/5.12.1/single/. Not only there is less to download, but also you don't need to run init-repository in this case.

            D Offline
            D Offline
            dxsooo
            wrote on last edited by
            #4

            @sierdzio Oops, you are right. Docker in Mac limits to 2GB memory, and it passed when I enlarge to 8GB

            reply

            1 Reply Last reply
            1

            • Login

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • Users
            • Groups
            • Search
            • Get Qt Extensions
            • Unsolved