I have a simple openmp example:
#include <stdio.h>
int main() {
#pragma omp parallel
{
printf("https://helloacm.com\n");
}
return 0;
}
I created two conda environments on different machine using the same procedure.
On one of the machine, the compilation failed with
(rcqa) vimos@x86_64-conda_cos6-linux-gnu ➜ anaconda3 gcc -fopenmp /tmp/tmp.c
/home/vimos/anaconda3/envs/rcqa/bin/../lib/gcc/x86_64-conda_cos6-linux-gnu/7.3.0/../../../../x86_64-conda_cos6-linux-gnu/bin/ld: cannot find -lgomp
collect2: error: ld returned 1 exit status
I checked the output of the command
gcc --verbose -fopenmp /tmp/tmp.c
The only difference is that, the one failed has no such configure --with-host-libstdcxx='-static-libgcc -Wl,-Bstatic,-lstdc++,-Bdynamic -lm'
.
GCC version info, this one works
(smu) vimos@x86_64-conda_cos6-linux-gnu ➜ ~ gcc --version
gcc (crosstool-NG 1.23.0.450-d54ae) 7.3.0
this one failed
(rcqa) vimos@x86_64-conda_cos6-linux-gnu ➜ anaconda3 gcc --version
gcc (crosstool-NG 1.23.0.449-a04d0) 7.3.0
Is the configure the true reason of the failure?