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



  • 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>


  • Qt Champions 2017

    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
    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 ?



  • @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 !


  • Qt Champions 2017

    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
    sorry, can you give some more details instructions or give examples? thank you very much


  • Qt Champions 2017

    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
    thank you !


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.