cgccopenmpcrosstool-ng

fatal error: omp.h: No such file or directory using arm-unknown-linux-uclibcgnueabi (crosstool-ng)


It seems that any gcc created with crosstool-ng is missing omp.h, is there a way to solve this issue?

tomas@ubuntu:~/eHHAlgorithm/infoli_static$ /home/tomas/x-tools/arm-unknown-linux-uclibcgnueabi/bin/arm-unknown-linux-uclibcgnueabi-gcc infoli.c main.c -o infoli_arm_ns100_ss10_noout_nobench -lm -O3 -DNETWORK_SIZE=100 -DSIMULATION_STEPS=10 -DNO_OUTPUT -DNO_BENCH -static
infoli.c:3:10: fatal error: omp.h: No such file or directory
 #include <omp.h>
          ^~~~~~~
compilation terminated.

If I use arm-linux-gnueabi-gcc, which I installed with apt-get directly in Ubuntu I don't get this error.


Solution

  • Solution:

    ./ct-ng arm-unknown-linux-uclibcgnueabi

    ./ct-ng menuconfig -> C compiler -> Compile libgomp (enable pressing < y >). Save changes.

    ./ct-ng build

    This will enable the LIBGOMP option in the .config file:

    tomas@ubuntu:~/crosstool-ng$ grep LIBGOMP .config*
    .config:CT_CC_GCC_LIBGOMP=y
    .config.old:# CT_CC_GCC_LIBGOMP is not set