title: Error while building R from source with gcc OpenMP support
body: <p>I am trying to compile R in a Redhat linux environment on a HPC cluster. I have used environment modules to install recent versions of a number of tools including GCC 5.2.0. I cannot get R to build from the source. It fails with undefined reference to `GOMP_parallel'. When I compile with the --disable-openmp option it compiles fine.</p>
  
  <pre><code>array.o: In function `do_colsum':
  array.c:(.text+0x5829): undefined reference to `GOMP_parallel'
  collect2: error: ld returned 1 exit status
  make[3]: *** [R.bin] Error 1
  make[3]: Leaving directory `/scratch/kokul/240763.hpc5/R-  3.2.3/src/main'
  make[2]: *** [R] Error 2
  make[2]: Leaving directory `/scratch/kokul/240763.hpc5/R- 3.2.3/src/main'
  make[1]: *** [R] Error 1
  make[1]: Leaving directory `/scratch/kokul/240763.hpc5/R-3.2.3/src'
  make: *** [R] Error 1
  </code></pre>
  
  <p>A couple of questions</p>
  
  <ol>
  <li>What are the advantages of having openMP enabled, I am assuming this will enhance the performance?</li>
  <li>How do I fix the error I encounter while building? Is this related to linking the correct library? -fopenmp is correctly used while building. libgomp.* files are also in the $LIBRARY_PATH and $LD_LIBRARY_PATH.</li>
  </ol>
  
  <p>It might be a simple thing I am missing, but I have tried to search for a proper answer without success. </p>
  
  <p>Advanced thanks for any help.</p>