<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:Wingdings;
        panose-1:5 0 0 0 0 0 0 0 0 0;}
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman",serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri",sans-serif;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D">We understand that iomp is undesirable.  What we don’t know is what name is desirable.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D">What name is desirable instead of iomp?  Do we want to link via…<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D">-lllvmomp<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D">-llvmomp<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D">-lclomp<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D">-lcomp<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D">-lnotintelomp ( just kidding
</span><span style="font-size:11.0pt;font-family:Wingdings;color:#1F497D">J</span><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D"> )<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D">… Some other name?  I get the feeling someone outside of Intel should make this choice.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D">-- Johnny<o:p></o:p></span></p>
<p class="MsoNormal"><a name="_MailEndCompose"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D"><o:p> </o:p></span></a></p>
<p class="MsoNormal"><b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">From:</span></b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif"> openmp-dev-bounces@cs.uiuc.edu [mailto:openmp-dev-bounces@cs.uiuc.edu]
<b>On Behalf Of </b>Chandler Carruth<br>
<b>Sent:</b> Wednesday, May 13, 2015 10:59 AM<br>
<b>To:</b> Jack Howarth; cfe-dev; openmp-dev@dcs-maillist2.engr.illinois.edu<br>
<b>Subject:</b> Re: [Openmp-dev] CMAKE_INSTALL_PREFIX vs -fopenmp and clang search library search path<o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal">I think that openmp should work much more like libc++ than like the sanitizers. It has a reasonably stable API and even supports the libgomp APIs and so it should be in the normal library tree just like libc++.<o:p></o:p></p>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">However, the CMake build of the openmp needs a lot of work. =/ It doesn't match the patterns and structures of any of our other runtime libraries.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">I think openmp needs to much more closely model its CMake build on libc++'s before we do anything more. Currently I can't even reasonably include it in my builds because it clobbers un-prefixed variable names and doesn't re-use any of the
 LLVM CMake logic.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Also, I'll point out that the CMake build completely and universally uses the term 'iomp'. This trend really needs to reverse....<o:p></o:p></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal">On Wed, May 13, 2015 at 8:32 AM Jack Howarth <<a href="mailto:howarth.mailing.lists@gmail.com">howarth.mailing.lists@gmail.com</a>> wrote:<o:p></o:p></p>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-right:0in">
<p class="MsoNormal">    I believe we have a gap in clang's library search path with the<br>
enabling of the openmp support via the proposed patch at...<br>
<br>
<a href="http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20150511/129075.html" target="_blank">http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20150511/129075.html</a><br>
<br>
Currently, in tree cmake builds of the openmp library using<br>
-DCMAKE_INSTALL_PREFIX to install the llvm build in a buried<br>
subdirectory will place the libiomp5.dylib shared library in a<br>
directory outside of the library search path used by clang...<br>
<br>
% clang-3.7 -fopenmp -o omp_getEnvInfo omp_getEnvInfo.c -v<br>
clang version 3.7.0 (trunk)<br>
Target: x86_64-apple-darwin14.4.0<br>
Thread model: posix<br>
 "/sw/opt/llvm-3.7.0/bin/clang-3.7" -cc1 -triple<br>
x86_64-apple-macosx10.10.0 -emit-obj -mrelax-all -disable-free<br>
-disable-llvm-verifier -main-file-name omp_getEnvInfo.c<br>
-mrelocation-model pic -pic-level 2 -mthread-model posix<br>
-mdisable-fp-elim -masm-verbose -munwind-tables -target-cpu core2<br>
-target-linker-version 242 -v -dwarf-column-info<br>
-fno-unique-section-names -resource-dir<br>
/sw/opt/llvm-3.7.0/bin/../lib/clang/3.7.0 -fdebug-compilation-dir<br>
/Users/howarth/openmp_examples -ferror-limit 19 -fmessage-length 140<br>
-fopenmp -stack-protector 1 -mstackrealign -fblocks<br>
-fobjc-runtime=macosx-10.10.0 -fencode-extended-block-signature<br>
-fmax-type-align=16 -fdiagnostics-show-option -fcolor-diagnostics -o<br>
/var/folders/1l/n78sywl52lz6kkys6nv7mnph0000gp/T/omp_getEnvInfo-e20595.o<br>
-x c omp_getEnvInfo.c<br>
clang -cc1 version 3.7.0 based upon LLVM 3.7.0svn default target<br>
x86_64-apple-darwin14.4.0<br>
ignoring nonexistent directory "/usr/local/include"<br>
#include "..." search starts here:<br>
#include <...> search starts here:<br>
 /sw/opt/llvm-3.7.0/bin/../lib/clang/3.7.0/include<br>
 /usr/include<br>
 /System/Library/Frameworks (framework directory)<br>
 /Library/Frameworks (framework directory)<br>
End of search list.<br>
 "/sw/opt/llvm-3.7.0/bin/ld" -demangle -dynamic -arch x86_64<br>
-macosx_version_min 10.10.0 -o omp_getEnvInfo -liomp5<br>
/var/folders/1l/n78sywl52lz6kkys6nv7mnph0000gp/T/omp_getEnvInfo-e20595.o<br>
-lSystem<br>
ld: library not found for -liomp5<br>
clang-3.7: error: linker command failed with exit code 1 (use -v to<br>
see invocation)<br>
<br>
requiring an explicit path to passed to the compiler...<br>
<br>
% clang-3.7 -fopenmp -L/sw/opt/llvm-3.7.0/lib -o omp_getEnvInfo omp_getEnvInfo.c<br>
% otool -L ./omp_getEnvInfo<br>
./omp_getEnvInfo:<br>
/sw/opt/llvm-3.7.0/lib/libiomp5.dylib (compatibility version 5.0.0,<br>
current version 5.0.0)<br>
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current<br>
version 1213.0.0)<br>
<br>
Currently, all the other shared libraries linked by the clang<br>
compilers (aside from libc++) are expected to be located in the<br>
clang/3.7.0/lib/darwin subdirectory (such as<br>
libclang_rt.asan_iossim_dynamic.dylib and<br>
libclang_rt.asan_osx_dynamic.dylib). Using CMAKE_INSTALL_PREFIX in the<br>
cmake build to bury the llvm installation has no impact on the usage<br>
of those two libraries with the -fsanitize flags but the current<br>
search library search path doesn't do the same for the libiomp5<br>
relocation in the same case.<br>
            Jack<br>
_______________________________________________<br>
Openmp-dev mailing list<br>
<a href="mailto:Openmp-dev@dcs-maillist2.engr.illinois.edu" target="_blank">Openmp-dev@dcs-maillist2.engr.illinois.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/openmp-dev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/openmp-dev</a><o:p></o:p></p>
</blockquote>
</div>
</div>
</body>
</html>