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. bits/math-vector.h: No such file or directory
Forum Updated to NodeBB v4.3 + New Features

bits/math-vector.h: No such file or directory

Scheduled Pinned Locked Moved Unsolved General and Desktop
8 Posts 3 Posters 7.8k 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.
  • T Offline
    T Offline
    The most recent future
    wrote on last edited by
    #1

    Hi All :
    os : ubuntu 16.04
    crosscompiler: gcc-linaro-arm-linux-gnueabihf-4.7-2012.11-20121123_linux.tar.bz2

    error :

                  cc1plus: warning: include location "/usr/include" is unsafe for cross-compilation [-Wpoison-system-directories]
    

    cc1plus: warning: include location "/usr/include" is unsafe for cross-compilation [-Wpoison-system-directories]
    In file included from ../../include/QtCore/../../src/corelib/kernel/qmath.h:49:0,
    from ../../include/QtCore/qmath.h:1,
    from animation/qabstractanimation.cpp:153:
    /usr/include/math.h:31:30: fatal error: bits/math-vector.h: No such file or directory
    #include <bits/math-vector.h>
    ^
    compilation terminated.
    Makefile:9860: recipe for target '.obj/qabstractanimation.o' failed
    make[3]: *** [.obj/qabstractanimation.o] Error 1
    make[3]: *** Waiting for unfinished jobs....
    In file included from /usr/local/crossComp/arm-2014.05/arm-none-linux-gnueabi/include/c++/4.8.3/cmath:44:0,
    from tools/qlocale_p.h:64,
    from tools/qbytearray.cpp:48:
    /usr/include/math.h:31:30: fatal error: bits/math-vector.h: No such file or directory
    #include <bits/math-vector.h>

    1 Reply Last reply
    0
    • dheerendraD Offline
      dheerendraD Offline
      dheerendra
      Qt Champions 2022
      wrote on last edited by
      #2

      U r doing cross compilation. Can u confirm /usr/include has right header files for cross compilation?. I suspect that u must be having different directory for target system.

      Dheerendra
      @Community Service
      Certified Qt Specialist
      http://www.pthinks.com

      J 1 Reply Last reply
      1
      • dheerendraD dheerendra

        U r doing cross compilation. Can u confirm /usr/include has right header files for cross compilation?. I suspect that u must be having different directory for target system.

        J Offline
        J Offline
        JiujiuTong
        wrote on last edited by JiujiuTong
        #3

        @dheerendra
        i have same question , i search my raspberry pi3 ,there is no bits/math-vector.h. should i add some packages to my rpi3 , it was said libc6-dev contained the file. but my rpi3 has installed the latest package, there is still no such file.
        and from https://github.molgen.mpg.de/git-mirror/glibc/blob/master/bits/math-vector.h
        #ifndef _MATH_H

        error "Never include <bits/math-vector.h> directly;\

        include <math.h> instead."
        #endif
        means that shoul i add this file or just include math.h instead ?

        J 1 Reply Last reply
        0
        • J JiujiuTong

          @dheerendra
          i have same question , i search my raspberry pi3 ,there is no bits/math-vector.h. should i add some packages to my rpi3 , it was said libc6-dev contained the file. but my rpi3 has installed the latest package, there is still no such file.
          and from https://github.molgen.mpg.de/git-mirror/glibc/blob/master/bits/math-vector.h
          #ifndef _MATH_H

          error "Never include <bits/math-vector.h> directly;\

          include <math.h> instead."
          #endif
          means that shoul i add this file or just include math.h instead ?

          J Offline
          J Offline
          JiujiuTong
          wrote on last edited by
          #4

          @JiujiuTong said in bits/math-vector.h: No such file or directory:

          @dheerendra
          i have same question , i search my raspberry pi3 ,there is no bits/math-vector.h. should i add some packages to my rpi3 , it was said libc6-dev contained the file. but my rpi3 has installed the latest package, there is still no such file.
          and from https://github.molgen.mpg.de/git-mirror/glibc/blob/master/bits/math-vector.h
          #ifndef _MATH_H

          error "Never include <bits/math-vector.h> directly;\

          include <math.h> instead."
          #endif
          means that shoul i add this file or just include math.h instead ?

          sorry for my mistake!
          yes, the include file is wrong ,the qtcreator is using the file from /usr/include, not from the directory from target system.
          Ii have set the "sysroot" options in qtcreator option. but how to let qtcreator select the math.h file from path "~/sysroot/usr/include/math.h" not using the file on host"/usr/include/math.h"?
          should i need to include lines like this in .pro file?
          INCLUDEPATH += ./usr/include/
          ./usr/include/activemq-cpp-3.9.3/
          ./usr/include/apr-1/
          it seems doesn't work.....or should it be the absolute path ? thank you very much !

          1 Reply Last reply
          0
          • dheerendraD Offline
            dheerendraD Offline
            dheerendra
            Qt Champions 2022
            wrote on last edited by
            #5

            Try from command line for compilation. There are clear instructions on how to do this. This way you will not see issues like this. Run the configure command with appropriate options by specifying the make-spec for raspi.

            Dheerendra
            @Community Service
            Certified Qt Specialist
            http://www.pthinks.com

            J 1 Reply Last reply
            1
            • dheerendraD dheerendra

              Try from command line for compilation. There are clear instructions on how to do this. This way you will not see issues like this. Run the configure command with appropriate options by specifying the make-spec for raspi.

              J Offline
              J Offline
              JiujiuTong
              wrote on last edited by
              #6

              @dheerendra
              sorry, can you give some more details instructions or give examples? thank you very much

              1 Reply Last reply
              0
              • dheerendraD Offline
                dheerendraD Offline
                dheerendra
                Qt Champions 2022
                wrote on last edited by
                #7

                Just see the instructions available in the wiki page. This should help you to compile everything from command line. Please read the instructions carefully and follow them one by one. You should sail through.

                Dheerendra
                @Community Service
                Certified Qt Specialist
                http://www.pthinks.com

                J 1 Reply Last reply
                2
                • dheerendraD dheerendra

                  Just see the instructions available in the wiki page. This should help you to compile everything from command line. Please read the instructions carefully and follow them one by one. You should sail through.

                  J Offline
                  J Offline
                  JiujiuTong
                  wrote on last edited by
                  #8

                  @dheerendra
                  thank you !

                  1 Reply Last reply
                  0

                  • Login

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