fatal error: emmintrin.h: No such file or directory compilation terminated.

Hello everyone!

My jetson tx1 installed cuda-7.0,opencv-2.4.8,gcc-5.4.1. When I run my program, it shows that " fatal error: emmintrin.h: No such file or directory compilation terminated."

I checked /usr/lib/gcc/arm-linux-gnueabihf/5/include ,foud that there are no "emmintrin.h" , "xmmintrin.h" ,and so on. 

Now I want to know whether jetson tx1 support SSE/SSE2 or not ? How can I solve this problem ? Thank you!

If you are talking about the AMD x86_64 SSE/SSE2, then no, ARM CPUs do not support that. There is of course some equivalence with NEON. However, it is odd that running a program would complain of a missing header file…this is typically reserved for compiling a program prior to running it. Can you give more information about your program?

Hello,

I had a similar issue here when I was compliling GNSS-SDRLIB on Jetson AGX Xavi

gcc -c -Wall -O3 -march=native -I../../src -I../../lib/rtklib -I../../lib/fec -I../../src/rcv/stereo -I../../src/rcv/rtlsdr -I../../src/rcv/bladerf -DSSE2_ENABLE -DFFTMTX -DSTEREO -DSTEREOV26 -DRTLSDR -g ../../src/sdrmain.c
In file included from ../../src/sdrmain.c:6:0:
../../src/sdr.h:23:10: fatal error: emmintrin.h: No such file or directory
 #include <emmintrin.h>
          ^~~~~~~~~~~~~
compilation terminated.
makefile:50: recipe for target 'sdrmain.o' failed
make: *** [sdrmain.o] Error 1

What are the options I have now?

I see one of two possibilities. Either you are using a library which needs a dev version added (many packages have the regular package, plus an optional development version providing headers to include when developing against that library), or the file is already present, but the header include search path is missing the correct location. The former is likely correct since “<emmintrin.h>” implies a standard search path (though a given project might have its own “include” directory and use its own version).

You might install the package “locate”:

sudo apt-get install locate

…then run “sudo updatedb” (which might take a few minutes the first time it is run).

After that you can run “locate emmintrin.h”. If it turns out this file is in your project somewhere, then it might be as simple as adding that to a header search path. If not, then look at the name of all libraries your project links against…there will be a devel version of one of those which provides emmintrin.h.

FYI, I did see a version of this on a Fedora system which is part of clang. A comment inside this calls it an SSE2 intrinsics file. You have this option on your command line:

-DSSE2_ENABLE

It is likely this option is what causes a need for this file. There is a possibility this is mandatory for your project, but if not, then perhaps a less optimized version would result if you remove the “-DSSE2_ENABLE” option.

1 Like

the updateddb, then using locate to find it worked thanks