<div dir="ltr">pthread.h is the standard threads library on unix-like systems, but it definitely doesn't exist on windows unless you are building with MinGW, which you are not (because you said you're trying to use the Visual Studio generator).<div><br></div><div>You don't need to put anything for any of the variables you specify. You also don't need to put anything for the linker. As long as you run vcvarsall.bat ahead of time, cmake should be able to find everything it needs to compile. FWIW, this is my cmake command line when i use the visual studio generator using the mono-repo source-tree layout</div><div><br></div><div>cmake -G "Visual Studio 15 2017" -Thost=x64 -DLLVM_ENABLE_PROJECTS=clang;lld -DLLVM_TARGETS_TO_BUILD=X86 path/to/source/dir.</div><div><br></div><div>You can adjust the variables as necessary for your targets.</div><div><br></div><div>However, I never use an installed LLVM/clang. If you're trying to build llvm / clang from sources you shouldn't even need an installed llvm/clang, because you can use MSVC to build it. You can install a fresh image of Windows, then install nothing but git, visual studio, and cmake, and you should be able to bootstrap clang and llvm from sources.</div><br><div class="gmail_quote"><div dir="ltr">On Thu, Nov 29, 2018 at 9:34 AM Osman Zakir <<a href="mailto:osmanzakir90@hotmail.com" target="_blank">osmanzakir90@hotmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">
<div style="color:rgb(0,0,0);font-family:Calibri,Helvetica,sans-serif;font-size:12pt">
After it finishes trying to configure, it says that there were errors with the configure step and that program files may be invalid. And I also don't know what executable to point it to for SVN. </div>
<div style="color:rgb(0,0,0);font-family:Calibri,Helvetica,sans-serif;font-size:12pt">
<br>
</div>
<div style="color:rgb(0,0,0);font-family:Calibri,Helvetica,sans-serif;font-size:12pt">
What should I put for CLANG_DEFAULT_CXX_STDLIB, CLANG_DEFAULT_LINKER, CLANG_DEFAULT_RTLIB, CLANG_DEFAULT_STD_C and CLANG_DEFAULT_STD_CXX? Would it be okay to provide the path to the MSVC include directory for the CLANG_DEFAULT_CXX_STDLIB, or should I provide
the path to the include directory in the libcxx folder in the LLVM source tree? For the Linker I think I'll just put llvm_root/tools/lld, if that's good enough. </div>
<div style="color:rgb(0,0,0);font-family:Calibri,Helvetica,sans-serif;font-size:12pt">
<br>
</div>
<div style="color:rgb(0,0,0);font-family:Calibri,Helvetica,sans-serif;font-size:12pt">
As for pthread, shouldn't I have that? I mean, it's the standard threads library, isn't it? And CMake also can't find the header that malloc is in, among some other headers. </div>
<div style="color:rgb(0,0,0);font-family:Calibri,Helvetica,sans-serif;font-size:12pt">
<br>
</div>
<div style="color:rgb(0,0,0);font-family:Calibri,Helvetica,sans-serif;font-size:12pt">
And what is the CLANG_VENDOR setting asking for? The vendor that I got Clang from? And what about CLANG_VENDOR_UTI? </div>
<div style="color:rgb(0,0,0);font-family:Calibri,Helvetica,sans-serif;font-size:12pt">
<br>
</div>
<div style="color:rgb(0,0,0);font-family:Calibri,Helvetica,sans-serif;font-size:12pt">
CMAKE_INSTALL_OLDINCLUDEDIR is set to the Linux-specific /usr/local for some reason. What should I set it to? </div>
<div style="color:rgb(0,0,0);font-family:Calibri,Helvetica,sans-serif;font-size:12pt">
<br>
</div>
<div style="color:rgb(0,0,0);font-family:Calibri,Helvetica,sans-serif;font-size:12pt">
Note: <a class="m_4761682453184771379m_3368414305041250506fbmgFYeENi2_gph5O8mp8 m_4761682453184771379m_3368414305041250506mention m_4761682453184771379m_3368414305041250506ms-bgc-nlr m_4761682453184771379m_3368414305041250506ms-fcl-b" id="m_4761682453184771379m_3368414305041250506OWAAM356255" href="mailto:zturner@google.com" target="_blank">
@Zachary Turner</a> I wrote this before I saw your latest message. I'll try that now. Thanks.</div>
<hr style="display:inline-block;width:98%">
<div id="m_4761682453184771379m_3368414305041250506divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> Zachary Turner <<a href="mailto:zturner@google.com" target="_blank">zturner@google.com</a>><br>
<b>Sent:</b> Thursday, November 29, 2018 9:49 PM</font></div></div><div dir="ltr"><div id="m_4761682453184771379m_3368414305041250506divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><br>
<b>To:</b> Osman Zakir<br>
<b>Cc:</b> <a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a><br>
<b>Subject:</b> Re: [llvm-dev] Errors in configuration for LLVM with CMake GUI</font></div></div><div dir="ltr">
<div>I think you are heading down the wrong path. All of those error messages are normal. That’s just cmake doing feature detection, for example it will test whether your system has pthread.h by compiling a program that includes that header. So an error in
your log about is missing pthread.h just means it will set HAVE_PTHREAD_H to false which is fine.<br>
<br>
I’m confused why we’re talking about gcc and libomp if you’re trying to do a Windows build. You should just use msvc to build it. You don’t need any of the things you mentioned to do a build.<br>
<br>
I still haven’t seen the output from cmake (just a paste of stdout). That’s going to tell you the real problem. The pog files I don’t think are very useful and will just lead you in the wrong direction.<br>
<br>
You said you’re using cmake gui, maybe the problem is that the gui can’t find the Visual Studio installation. Did you run vcvarsall first? Try first running vcvarsall from a command prompt and tgen running cmake (command line or gui) from that same command
prompt<br>
<div class="m_4761682453184771379m_3368414305041250506x_gmail_quote">
<div dir="ltr">On Thu, Nov 29, 2018 at 7:55 AM Osman Zakir via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>> wrote:<br>
</div>
<blockquote class="m_4761682453184771379m_3368414305041250506x_gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">
<div style="color:rgb(0,0,0);font-family:Calibri,Helvetica,sans-serif;font-size:12pt">
<span>Also, what executable's path do I put in for SVN? I just use SVN by right-clicking and then clicking on what I need in the context menu that comes up, since SVN is integrated into my context menus too. But I don't know what .exe file it's using. And
because of that I don't know what path I need to give to it so it can find it. </span></div>
<div style="color:rgb(0,0,0);font-family:Calibri,Helvetica,sans-serif;font-size:12pt">
<span><br>
</span></div>
<div style="color:rgb(0,0,0);font-family:Calibri,Helvetica,sans-serif;font-size:12pt">
<span>For some reason, it's trying to find Nuget as well. I'll try to find path to it and put it there.</span></div>
<hr style="display:inline-block;width:98%">
<div id="m_4761682453184771379m_3368414305041250506x_m_8191804362881219129divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>From:</b> Osman Zakir <<a href="mailto:osmanzakir90@hotmail.com" target="_blank">osmanzakir90@hotmail.com</a>><br>
<b>Sent:</b> Thursday, November 29, 2018 8:43 PM<br>
<b>To:</b> <a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>; Jonathan Goodwin</font></div>
</div>
<div dir="ltr">
<div id="m_4761682453184771379m_3368414305041250506x_m_8191804362881219129divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><br>
<b>Subject:</b> Re: [llvm-dev] Errors in configuration for LLVM with CMake GUI</font>
<div> </div>
</div>
<div dir="ltr">
<div style="color:rgb(0,0,0);font-family:Calibri,Helvetica,sans-serif;font-size:12pt">
<span>I probably need GCC for Git bash. And the one I have is MinGW's GCC, which is the one for Windows. I don't know why CMake is trying to find Linux headers. Hopefully someone who knows better what to do will weigh in here. </span></div>
<div style="color:rgb(0,0,0);font-family:Calibri,Helvetica,sans-serif;font-size:12pt">
<span><br>
</span></div>
<div style="color:rgb(0,0,0);font-family:Calibri,Helvetica,sans-serif;font-size:12pt">
<a class="m_4761682453184771379m_3368414305041250506x_m_8191804362881219129x_fbmgFYeENi2_gph5O8mp8 m_4761682453184771379m_3368414305041250506x_m_8191804362881219129x_mention m_4761682453184771379m_3368414305041250506x_m_8191804362881219129x_ms-bgc-nlr m_4761682453184771379m_3368414305041250506x_m_8191804362881219129x_ms-fcl-b" id="m_4761682453184771379m_3368414305041250506x_m_8191804362881219129OWAAM40675" href="mailto:jondgoodwin@gmail.com" target="_blank">@Jonathan
Goodwin</a> , are you sure you didn't have to tell it where the header files for Windows are? If I need to specify the paths to those headers, how do I do it?</div>
<hr style="display:inline-block;width:98%">
<div id="m_4761682453184771379m_3368414305041250506x_m_8191804362881219129x_divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>From:</b> Jonathan Goodwin <<a href="mailto:jondgoodwin@gmail.com" target="_blank">jondgoodwin@gmail.com</a>><br>
<b>Sent:</b> Thursday, November 29, 2018 10:42 AM<br>
<b>To:</b> Osman Zakir<br>
<b>Cc:</b> <a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a><br>
<b>Subject:</b> Re: [llvm-dev] Errors in configuration for LLVM with CMake GUI</font>
<div> </div>
</div>
<div>
<div dir="ltr">I checked your CMakeError.log again. The .h include files it is marking as missing are not LLVM include files, but are OS-related (e.g., malloc/malloc.h), and in some cases appear to be potentially Linux ones (dlfcn.h, sys/ioctl, malloc_np.h).
I can't imagine why your build might be looking for Linux as opposed to Windows include files. That could be a clue to your problem.
<div><br>
</div>
<div>You said you installed the latest version of GCC before this attempt. This confuses me further, since you are using Visual Studio to build with, and that makes no use of GCC. In fact, honestly I am wondering if your GCC implementation libraries are somehow
in your search path wrt environment variables, and your build is actually trying to use the GNU/Linux header files rather than the VS Windows header files, which would certainly blow it up. Again, I am no expert here, so I don't have a definite answer, but
based on what little I know, this setup doesn't sound safe. Maybe get rid of GCC completely, as I am not sure when/how you would even use it on the Windows side.</div>
<div><br>
</div>
<div>Similarly, I don't believe Perl has anything to do with this either, as neither CMake nor VS make any use of it. But I can't imagine it causing any problems for you to have it.</div>
<div><br>
</div>
<div>I don't know anything about <span style="color:rgb(0,0,0);font-family:Calibri,Helvetica,sans-serif;font-size:16px">Backtrace, Libomp, Compiler-RT, so I cannot help you there. As we have discussed before, the source for clang and lld go into the llvm
source folder's "tools" folder by those names. If they are there, after the configure step of the CMake-Gui, options will automatically appear for both clang and lld. You will want to mouse click the checkbox next to CLANG_BUILD_TOOLS and LLD_BUILD_TOOLS prior
to hitting the generate button.</span></div>
<div><span style="color:rgb(0,0,0);font-family:Calibri,Helvetica,sans-serif;font-size:16px"><br>
</span></div>
<div><span style="color:rgb(0,0,0);font-family:Calibri,Helvetica,sans-serif;font-size:16px">Sorry I don't know more than that, but hopefully that will help some ... and then others can chime in if they know more about this than me.</span></div>
</div>
<br>
<div class="m_4761682453184771379m_3368414305041250506x_m_8191804362881219129x_x_gmail_quote">
<div dir="ltr">On Thu, Nov 29, 2018 at 2:52 PM Osman Zakir via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>> wrote:<br>
</div>
<blockquote class="m_4761682453184771379m_3368414305041250506x_m_8191804362881219129x_x_gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">
<div style="color:rgb(0,0,0);font-family:Calibri,Helvetica,sans-serif;font-size:12pt">
<span>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size-adjust:none;font-stretch:100%;margin-bottom:0px;margin-top:0px">
<span style="font-size-adjust:none;font-stretch:100%;margin-bottom:0px;margin-top:0px">I tried to configure CMake for LLVM using the GUI and I've attached the logs for the attempt to this message. I installed Perl and the latest version of GCC before that
attempt. There were still errors that stopped it from being able to generate project files, though. </span></div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size-adjust:none;font-stretch:100%;margin-bottom:0px;margin-top:0px">
<span style="font-size-adjust:none;font-stretch:100%;margin-bottom:0px;margin-top:0px"><br>
</span></div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size-adjust:none;font-stretch:100%;margin-bottom:0px;margin-top:0px">
<span style="font-size-adjust:none;font-stretch:100%;margin-bottom:0px;margin-top:0px">I'd like to know how I can get this to work. How do I tell it where to find Backtrace, Libomp, Compiler-RT, LLD and Clang? And where exactly is Backtrace? I copy-pasted
the locations for the stuff I checked out for LLVM, so I'm not really sure where the stuff I need to put into CMake for Compiler-RT, Backtrace and Libomp is (it's where it should be, that's all I know). </span></div>
<br>
</span></div>
<div style="color:rgb(0,0,0);font-family:Calibri,Helvetica,sans-serif;font-size:12pt">
<span></span></div>
</div>
_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br>
</blockquote>
</div>
</div>
</div>
</div>
_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br>
</blockquote>
</div>
</div>
</div></blockquote></div></div>