Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Ubuntu compile Qt failed
Forum Updated to NodeBB v4.3 + New Features

Ubuntu compile Qt failed

Scheduled Pinned Locked Moved Unsolved General and Desktop
15 Posts 10 Posters 5.6k Views 6 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.
  • L Offline
    L Offline
    Lee1101
    wrote on last edited by aha_1980
    #1

    Hi,
    I am trying to compile Qt on Ubantu , following This blog. However, I am getting the error below. Could anyone help me out?
    ../../include/QtCore/5.13.0/QtCore/private/../../../../../src/corelib/tools/qsimd_p.h:196:14: fatal error: 'x86intrin.h' file not found

    include <x86intrin.h>

             ^~~~~~~~~~~~~
    

    1 error generated.
    shared:ERROR: compiler frontend failed to generate LLVM bitcode, halting
    Makefile:10986: recipe for target '.obj/qendian.o' failed
    make[3]: *** [.obj/qendian.o] Error 1
    make[3]: Leaving directory '/home/lixing/qt-everywhere-src-5.13.0-alpha/qtbase/src/corelib'
    Makefile:222: recipe for target 'sub-corelib-make_first' failed
    make[2]: *** [sub-corelib-make_first] Error 2
    make[2]: Leaving directory '/home/lixing/qt-everywhere-src-5.13.0-alpha/qtbase/src'
    Makefile:50: recipe for target 'sub-src-make_first' failed
    make[1]: *** [sub-src-make_first] Error 2
    make[1]: Leaving directory '/home/lixing/qt-everywhere-src-5.13.0-alpha/qtbase'
    Makefile:82: recipe for target 'module-qtbase' failed
    make: *** [module-qtbase] Error 2

    K 1 Reply Last reply
    0
    • L Lee1101

      Hi,
      I am trying to compile Qt on Ubantu , following This blog. However, I am getting the error below. Could anyone help me out?
      ../../include/QtCore/5.13.0/QtCore/private/../../../../../src/corelib/tools/qsimd_p.h:196:14: fatal error: 'x86intrin.h' file not found

      include <x86intrin.h>

               ^~~~~~~~~~~~~
      

      1 error generated.
      shared:ERROR: compiler frontend failed to generate LLVM bitcode, halting
      Makefile:10986: recipe for target '.obj/qendian.o' failed
      make[3]: *** [.obj/qendian.o] Error 1
      make[3]: Leaving directory '/home/lixing/qt-everywhere-src-5.13.0-alpha/qtbase/src/corelib'
      Makefile:222: recipe for target 'sub-corelib-make_first' failed
      make[2]: *** [sub-corelib-make_first] Error 2
      make[2]: Leaving directory '/home/lixing/qt-everywhere-src-5.13.0-alpha/qtbase/src'
      Makefile:50: recipe for target 'sub-src-make_first' failed
      make[1]: *** [sub-src-make_first] Error 2
      make[1]: Leaving directory '/home/lixing/qt-everywhere-src-5.13.0-alpha/qtbase'
      Makefile:82: recipe for target 'module-qtbase' failed
      make: *** [module-qtbase] Error 2

      K Offline
      K Offline
      koahnig
      wrote on last edited by
      #2

      @Lee1101

      Hi and welcome to devnet forum

      Any particular reason to compile Qt5.13.alpha?
      5.13 alpha is as called an alpha release. It is still some time until it will be released. Therefore it is recommended to use Qt5.12.1 as the last pre-built release.

      Vote the answer(s) that helped you to solve your issue(s)

      1 Reply Last reply
      1
      • L Offline
        L Offline
        Lee1101
        wrote on last edited by
        #3

        Thanks for your reply~ I am trying to use qt web assembly , I tried 5.12, also the same error

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          Hi and welcome to devnet,

          What compiler are you using ?

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          L 1 Reply Last reply
          0
          • SGaistS SGaist

            Hi and welcome to devnet,

            What compiler are you using ?

            L Offline
            L Offline
            Lee1101
            wrote on last edited by
            #5

            @SGaist Hi,thanks for your reply. I am using emcc. And the information of emcc can be found below:
            lixing@lixing-virtual-machine:~/project$ em++ -v
            emcc (Emscripten gcc/clang-like replacement + linker emulating GNU ld) 1.38.28
            clang version 6.0.1 (https://github.com/emscripten-core/emscripten-fastcomp-clang 605a43bd86aa1f7571e169f606d2ea06cdd835a2) (https://github.com/emscripten-core/emscripten-fastcomp e7cdb2a092b096d7116c90a25b82456899dcdc4c) (emscripten 1.38.28 : 1.38.28)
            Target: x86_64-unknown-linux-gnu
            Thread model: posix
            InstalledDir: /home/lixing/myfastcomp/emscripten-fastcomp/build/bin
            Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/5
            Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/5.4.0
            Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/6
            Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/6.0.0
            Selected GCC installation: /usr/lib/gcc/x86_64-linux-gnu/5.4.0
            Candidate multilib: .;@m64
            Selected multilib: .;@m64
            shared:INFO: (Emscripten: Running sanity checks)

            1 Reply Last reply
            0
            • C Offline
              C Offline
              codepriest
              wrote on last edited by
              #6

              Hi guys! I want to join you conversation because I have the same problem.

              So I will start from the beginning.
              I tried to compile just created(with help of Qt Creator) untouched GUI project. I cd to project directory and run /path/to/qt/install/dir/5.13.0/wasm_32/bin/qmake qtwindow.pro(emsdk was activated before source /path/to/emsdk/emsdk_env.sh). Then make and here I dot errors:

              error: undefined symbol: _ZNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6appendEPKcj
              error: undefined symbol: _Znaj
              error: undefined symbol: _Znwj
              error: undefined symbol: _ZnwjRKSt9nothrow_t
              

              First I tried to solve them but without any luck. Digging in the internet make me think that "may be problem in QT, maybe it was compiled with most recent libs or something". So I decided to compile QT from source. I followed instructions in https://blog.qt.io/blog/2018/11/19/getting-started-qt-webassembly/ but stuck on step make module-qtbase module-qtdeclarative with next error:

              em++ -c -pipe -O3 -Oz -std=c++1z -fvisibility=hidden -fvisibility-inlines-hidden -s ALLOW_MEMORY_GROWTH=1 -Wall -W -Wdate-time -Winconsistent-missing-override -DQT_NO_USING_NAMESPACE -DQT_NO_FOREACH -DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT -DQT_BUILD_CORE_LIB -DQT_BUILDING_QT -DQT_NO_CAST_TO_ASCII -DQT_ASCII_CAST_WARNINGS -DQT_MOC_COMPAT -DQT_USE_QSTRINGBUILDER -DQT_DEPRECATED_WARNINGS -DQT_DISABLE_DEPRECATED_BEFORE=0x050000 -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_NO_DEBUG -DPCRE2_CODE_UNIT_WIDTH=16 -I. -I../3rdparty/zlib/src -Iglobal -I../3rdparty/harfbuzz/src -I../3rdparty/md5 -I../3rdparty/md4 -I../3rdparty/sha3 -I../3rdparty -I../3rdparty/double-conversion/include -I../3rdparty/double-conversion/include/double-conversion -I../3rdparty/forkfd -I../3rdparty/tinycbor/src -I../../include -I../../include/QtCore -I../../include/QtCore/5.13.0 -I../../include/QtCore/5.13.0/QtCore -I.moc -I.tracegen -I../3rdparty/pcre2/src -I../../mkspecs/wasm-emscripten -o .obj/qendian.o global/qendian.cpp
              In file included from global/qendian.cpp:44:
              In file included from ../../include/QtCore/5.13.0/QtCore/private/qsimd_p.h:1:
              ../../include/QtCore/5.13.0/QtCore/private/../../../../../src/corelib/tools/qsimd_p.h:196:14: fatal error: 'x86intrin.h' file not found
              #    include <x86intrin.h>
                           ^~~~~~~~~~~~~
              1 error generated.
              

              I tried to edit qtbase/src/corelib/Makefile and add next paths to em++(-I option)

              locate x86intrin.h
              /home/codepriest/Android/Sdk/build-tools/26.0.2/renderscript/clang-include/x86intrin.h
              /home/codepriest/Android/Sdk/build-tools/27.0.3/renderscript/clang-include/x86intrin.h
              /home/codepriest/Works/playground/emsdk/clang/fastcomp/build_incoming_64/lib/clang/6.0.1/include/x86intrin.h
              /home/codepriest/Works/playground/emsdk/clang/fastcomp/src/tools/clang/lib/Headers/x86intrin.h
              /srv/big-data/qt/Tools/QtCreator/libexec/qtcreator/clang/lib/clang/7.0.0/include/x86intrin.h
              /usr/lib64/clang/4.0.1/include/x86intrin.h
              /usr/lib64/gcc/x86_64-suse-linux/4.8/include/x86intrin.h
              /usr/lib64/gcc/x86_64-suse-linux/8/include/x86intrin.h
              

              It solve problem with missing x86intrin.h(and other libs) but it start to complain on content of this headers, it look like it is not compatible with QT or emscripten or something like that(if it important I can reproduce this error).

              Thanks in advance.

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

                I suggest asking on interest Qt mailing list - the devs behind wasm hang out there, they might be able to help.

                (Z(:^

                lorn.potterL 1 Reply Last reply
                1
                • C Offline
                  C Offline
                  codepriest
                  wrote on last edited by
                  #8

                  How we can ask them? Can you share email address or something?

                  K 1 Reply Last reply
                  0
                  • C codepriest

                    How we can ask them? Can you share email address or something?

                    K Offline
                    K Offline
                    koahnig
                    wrote on last edited by
                    #9

                    @codepriest

                    https://lists.qt-project.org/listinfo/interest

                    Vote the answer(s) that helped you to solve your issue(s)

                    1 Reply Last reply
                    2
                    • Alex94102A Offline
                      Alex94102A Offline
                      Alex94102
                      wrote on last edited by
                      #10

                      I have exactly the same issue. Where is this header coming from?

                      corelib/tools/qsimd_p.h:196:14: fatal error: 'x86intrin.h' file not found

                      1 Reply Last reply
                      0
                      • strahlexS Offline
                        strahlexS Offline
                        strahlex
                        wrote on last edited by
                        #11

                        I have the same problem as well on Ubuntu Bionic. The include file should come from clang includes.

                        Feel free to check out my website machinekoder.com
                        and my pet projects Intellicute and QtQuickVcp

                        1 Reply Last reply
                        0
                        • strahlexS Offline
                          strahlexS Offline
                          strahlex
                          wrote on last edited by
                          #12

                          Got an answer from the mailing list: Use the latest version from the git 5.13 branch. With this hint I got it working on Ubuntu.

                          Feel free to check out my website machinekoder.com
                          and my pet projects Intellicute and QtQuickVcp

                          1 Reply Last reply
                          0
                          • T Offline
                            T Offline
                            Tiffany73
                            Banned
                            wrote on last edited by
                            #13
                            This post is deleted!
                            1 Reply Last reply
                            0
                            • sierdzioS sierdzio

                              I suggest asking on interest Qt mailing list - the devs behind wasm hang out there, they might be able to help.

                              lorn.potterL Offline
                              lorn.potterL Offline
                              lorn.potter
                              wrote on last edited by
                              #14

                              @sierdzio said in Ubuntu compile Qt failed:

                              I suggest asking on interest Qt mailing list - the devs behind wasm hang out there, they might be able to help.

                              Sorry, I didn't realize there were people actually using it and posting issues here. :)

                              Freelance Software Engineer, Platform Maintainer QtWebAssembly, Maintainer QtSensors
                              Author, Hands-On Mobile and Embedded Development with Qt 5 http://bit.ly/HandsOnMobileEmbedded

                              1 Reply Last reply
                              1
                              • Andy PelawiA Offline
                                Andy PelawiA Offline
                                Andy Pelawi
                                wrote on last edited by
                                #15

                                I use Fedora 29 kernel 5 for the OS, Qt 5.12.3 from source and Ryzen for processor. Just remove or comment some line of codes from the file
                                ~/[QT Source Directory]/qtbase/src/corelib/tools/qsimd_p.h

                                find " include <x86intrin.h>"
                                this from my file:

                                #  if defined(Q_CC_GNU) && !defined(Q_CC_INTEL)
                                // GCC 4.4 and Clang 2.8 added a few more intrinsics there
                                #    include <x86intrin.h>
                                #  endif
                                

                                after change:

                                /*
                                #  if defined(Q_CC_GNU) && !defined(Q_CC_INTEL)
                                // GCC 4.4 and Clang 2.8 added a few more intrinsics there
                                #    include <x86intrin.h>
                                #  endif
                                */
                                

                                and everything work fine now.
                                Sorry for my language :)

                                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