<div dir="ltr"> It appears that the failure in the openmp build is due to a race condition as if I use…<div><br></div><div><span style="font-family:arial,sans-serif;font-size:13px">make -j1 compiler=clang</span><br>
</div><div><br></div><div>the failure in building openmp on my 10.8 box disappears.</div><div><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Sun, May 18, 2014 at 1:36 PM, Jack Howarth <span dir="ltr"><<a href="mailto:howarth.mailing.lists@gmail.com" target="_blank">howarth.mailing.lists@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Bill,<div> Are there any plans to integrate the new openmp support into the llvm/clang 3.5 build process? I have been able to build the current llvm/clang/compiler-rt/openmp svn on Mac OS X 10.9 out of tree with…</div>
<div><br></div><div><div> pushd projects/openmp/runtime</div><div> make compiler=clang</div><div> popd</div></div><div><br></div><div>and then</div><div><br></div><div><div> OPENMP_DIR=`ls projects/openmp/runtime/tmp | grep dyn`</div>
<div> pushd projects/openmp/runtime/tmp/$OPENMP_DIR</div><div> install -m 755 libiomp5.dylib %i/opt/llvm-%v/lib/libgomp.dylib</div><div> install -m 644 *.h %i/opt/llvm-%v/lib/clang/%v/include</div><div>
popd</div></div><div><br></div><div>in our fink llvm packaging.</div><div> It would be nice to see the cmake build machinery updated to automatically build and install openmp if its sources are placed in the projects subdirectory of the llvm-3.5.0 source directory. Even if there isn't cmake build integration, but assuming an openmp 3.5.0 tar ball will be released for llvm/clang 3.5.0, the flag for openmp support needs to be synced to the library name generated in openmp. Currently, the clang flag -fopenmp flag emits -lgomp whereas the openmp svn currently produces a libiomp5.dylib instead. Also, the clang compiler currently has to be passed an explicitly library path to the location of the libgomp.dylib with -L. While the openmp headers can be found by clang when placed in clang's include directory, the libgomp.dylib shared lib isn't found when placed in any of the llvm/clang internal lib directories. If the file is going to be renamed as libgomp.dylib, it should be buried in the llvm/clang directories so that it doesn't collide with the FSF one. I can see the rational of using libgomp.dylib, so that configure and cmake detection of openmp is triggered, but in the long run it probably should be using a different shared library name.</div>
<div> Jack</div><div>ps I found on 10.9, that current llvm/clang/openmp can compile and run all of the example code at <span style="font-size:13px;font-family:arial,sans-serif"> </span><a href="https://computing.llnl.gov/tutorials/openMP/exercise.html" style="font-size:13px;font-family:arial,sans-serif" target="_blank">https://computing.llnl.gov/tutorials/openMP/exercise.html</a><span style="font-size:13px;font-family:arial,sans-serif"> to build except for </span><a href="https://computing.llnl.gov/tutorials/openMP/samples/C/omp_workshare2.c" style="font-size:medium;color:rgb(51,51,153);font-family:monospace" target="_blank">omp_workshare2.c</a><font face="arial, sans-serif">. FYI, there appears to be an issue with building current openmp on 10.8 using the same approach. The openmp code appears to compile but the build fails with…</font></div>
<div><font face="arial, sans-serif"><br></font></div><div><div style="font-family:arial,sans-serif;font-size:13px"><div>make[1]: Leaving directory '/sw/src/fink.build/llvm35-3.5.0-0/llvm-3.5.0/projects/openmp/runtime/tmp/mac_32e-rtl_5_nor_dyn.12.rel.40.c0.t0-prrg4'</div>
<div>-------------------------------------------------------------------------------</div><div>Finished : 2014-05-17 01:49:01 UTC</div><div>Elapsed : 00:00:02</div><div>Result : --- Failure ---</div><div>-------------------------------------------------------------------------------</div>
<div><br></div></div></div></div>
</blockquote></div><br></div>