Osman Zakir via llvm-dev
2018-Nov-29 15:43 UTC
[llvm-dev] Errors in configuration for LLVM with CMake GUI
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. @Jonathan Goodwin<mailto:jondgoodwin at gmail.com> , 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? ________________________________ From: Jonathan Goodwin <jondgoodwin at gmail.com> Sent: Thursday, November 29, 2018 10:42 AM To: Osman Zakir Cc: llvm-dev at lists.llvm.org Subject: Re: [llvm-dev] Errors in configuration for LLVM with CMake GUI 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. 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. 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. I don't know anything about 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. 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. On Thu, Nov 29, 2018 at 2:52 PM Osman Zakir via llvm-dev <llvm-dev at lists.llvm.org<mailto:llvm-dev at lists.llvm.org>> wrote: 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. 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). _______________________________________________ LLVM Developers mailing list llvm-dev at lists.llvm.org<mailto:llvm-dev at lists.llvm.org> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20181129/d10138a8/attachment.html>
Osman Zakir via llvm-dev
2018-Nov-29 15:54 UTC
[llvm-dev] Errors in configuration for LLVM with CMake GUI
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. For some reason, it's trying to find Nuget as well. I'll try to find path to it and put it there. ________________________________ From: Osman Zakir <osmanzakir90 at hotmail.com> Sent: Thursday, November 29, 2018 8:43 PM To: llvm-dev at lists.llvm.org; Jonathan Goodwin Subject: Re: [llvm-dev] Errors in configuration for LLVM with CMake GUI 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. @Jonathan Goodwin<mailto:jondgoodwin at gmail.com> , 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? ________________________________ From: Jonathan Goodwin <jondgoodwin at gmail.com> Sent: Thursday, November 29, 2018 10:42 AM To: Osman Zakir Cc: llvm-dev at lists.llvm.org Subject: Re: [llvm-dev] Errors in configuration for LLVM with CMake GUI 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. 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. 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. I don't know anything about 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. 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. On Thu, Nov 29, 2018 at 2:52 PM Osman Zakir via llvm-dev <llvm-dev at lists.llvm.org<mailto:llvm-dev at lists.llvm.org>> wrote: 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. 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). _______________________________________________ LLVM Developers mailing list llvm-dev at lists.llvm.org<mailto:llvm-dev at lists.llvm.org> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20181129/43d6edc2/attachment.html>
Zachary Turner via llvm-dev
2018-Nov-29 16:49 UTC
[llvm-dev] Errors in configuration for LLVM with CMake GUI
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. 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. 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. 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 On Thu, Nov 29, 2018 at 7:55 AM Osman Zakir via llvm-dev < llvm-dev at lists.llvm.org> wrote:> 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. > > For some reason, it's trying to find Nuget as well. I'll try to find path > to it and put it there. > ------------------------------ > *From:* Osman Zakir <osmanzakir90 at hotmail.com> > *Sent:* Thursday, November 29, 2018 8:43 PM > *To:* llvm-dev at lists.llvm.org; Jonathan Goodwin > > *Subject:* Re: [llvm-dev] Errors in configuration for LLVM with CMake GUI > > 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. > > @Jonathan Goodwin <jondgoodwin at gmail.com> , 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? > ------------------------------ > *From:* Jonathan Goodwin <jondgoodwin at gmail.com> > *Sent:* Thursday, November 29, 2018 10:42 AM > *To:* Osman Zakir > *Cc:* llvm-dev at lists.llvm.org > *Subject:* Re: [llvm-dev] Errors in configuration for LLVM with CMake GUI > > 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. > > 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. > > 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. > > I don't know anything about 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. > > 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. > > On Thu, Nov 29, 2018 at 2:52 PM Osman Zakir via llvm-dev < > llvm-dev at lists.llvm.org> wrote: > > 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. > > 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). > > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org > http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev > > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org > http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20181129/d02b0b6f/attachment.html>
Zachary Turner via llvm-dev
2018-Nov-29 17:40 UTC
[llvm-dev] Errors in configuration for LLVM with CMake GUI
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). 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 cmake -G "Visual Studio 15 2017" -Thost=x64 -DLLVM_ENABLE_PROJECTS=clang;lld -DLLVM_TARGETS_TO_BUILD=X86 path/to/source/dir. You can adjust the variables as necessary for your targets. 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. On Thu, Nov 29, 2018 at 9:34 AM Osman Zakir <osmanzakir90 at hotmail.com> wrote:> 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. > > 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. > > 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. > > And what is the CLANG_VENDOR setting asking for? The vendor that I got > Clang from? And what about CLANG_VENDOR_UTI? > > CMAKE_INSTALL_OLDINCLUDEDIR is set to the Linux-specific /usr/local for > some reason. What should I set it to? > > Note: @Zachary Turner <zturner at google.com> I wrote this before I saw your > latest message. I'll try that now. Thanks. > ------------------------------ > *From:* Zachary Turner <zturner at google.com> > *Sent:* Thursday, November 29, 2018 9:49 PM > > *To:* Osman Zakir > *Cc:* llvm-dev at lists.llvm.org > *Subject:* Re: [llvm-dev] Errors in configuration for LLVM with CMake GUI > 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. > > 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. > > 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. > > 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 > On Thu, Nov 29, 2018 at 7:55 AM Osman Zakir via llvm-dev < > llvm-dev at lists.llvm.org> wrote: > > 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. > > For some reason, it's trying to find Nuget as well. I'll try to find path > to it and put it there. > ------------------------------ > *From:* Osman Zakir <osmanzakir90 at hotmail.com> > *Sent:* Thursday, November 29, 2018 8:43 PM > *To:* llvm-dev at lists.llvm.org; Jonathan Goodwin > > *Subject:* Re: [llvm-dev] Errors in configuration for LLVM with CMake GUI > > 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. > > @Jonathan Goodwin <jondgoodwin at gmail.com> , 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? > ------------------------------ > *From:* Jonathan Goodwin <jondgoodwin at gmail.com> > *Sent:* Thursday, November 29, 2018 10:42 AM > *To:* Osman Zakir > *Cc:* llvm-dev at lists.llvm.org > *Subject:* Re: [llvm-dev] Errors in configuration for LLVM with CMake GUI > > 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. > > 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. > > 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. > > I don't know anything about 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. > > 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. > > On Thu, Nov 29, 2018 at 2:52 PM Osman Zakir via llvm-dev < > llvm-dev at lists.llvm.org> wrote: > > 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. > > 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). > > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org > http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev > > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org > http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev > >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20181129/c6fa4b64/attachment-0001.html>
Osman Zakir via llvm-dev
2018-Nov-29 17:45 UTC
[llvm-dev] Errors in configuration for LLVM with CMake GUI
I opened up an elevated Developer Command Prompt for VS2017, ran vcvarsall with argument amd64, and then ran the command "cmake-gui" in that command prompt. Then in that gui window, I clicked on "Configure" without doing anything else. At the end, I got an error window saying that there were errors, and that project files may be invalid. Here's the output from CMake: " Could NOT find Backtrace (missing: Backtrace_LIBRARY Backtrace_INCLUDE_DIR) Native target architecture is X86 Threads enabled. Doxygen disabled. Go bindings disabled. Could NOT find OCaml (missing: OCAMLFIND OCAML_VERSION OCAML_STDLIB_PATH) OCaml bindings disabled. Could NOT find Python module pygments Could NOT find Python module pygments.lexers.c_cpp Could NOT find Python module yaml LLVM host triple: x86_64-pc-windows-msvc LLVM default target triple: x86_64-pc-windows-msvc Using Debug VC++ CRT: MDd Using Release VC++ CRT: MD Using MinSizeRel VC++ CRT: MD Using RelWithDebInfo VC++ CRT: MD Constructing LLVMBuild project information CMake Error at C:/Program Files/CMake/share/cmake-3.13/Modules/FindSubversion.cmake:123 (message): Command "C:/Program Files/TortoiseSVN/bin/ info C:/llvm" failed with output: Call Stack (most recent call first): cmake/modules/VersionFromVCS.cmake:19 (subversion_wc_info) CMakeLists.txt:757 (add_version_info_from_vcs) LLVMHello ignored -- Loadable modules not supported on this platform. Targeting AArch64 Targeting AMDGPU Targeting ARM Targeting BPF Targeting Hexagon Targeting Lanai Targeting Mips Targeting MSP430 Targeting NVPTX Targeting PowerPC Targeting Sparc Targeting SystemZ Targeting WebAssembly Targeting X86 Targeting XCore Compiler-RT supported architectures: x86_64 Builtin supported architectures: x86_64 Builtin supported architectures: x86_64 CMake Error at C:/Program Files/CMake/share/cmake-3.13/Modules/FindPackageHandleStandardArgs.cmake:137 (message): Could NOT find Perl (missing: PERL_EXECUTABLE) Call Stack (most recent call first): C:/Program Files/CMake/share/cmake-3.13/Modules/FindPackageHandleStandardArgs.cmake:378 (_FPHSA_FAILURE_MESSAGE) C:/Program Files/CMake/share/cmake-3.13/Modules/FindPerl.cmake:75 (FIND_PACKAGE_HANDLE_STANDARD_ARGS) projects/openmp/runtime/cmake/config-ix.cmake:147 (find_package) projects/openmp/runtime/CMakeLists.txt:234 (include) Configuring incomplete, errors occurred! See also "C:/llvm/build/CMakeFiles/CMakeOutput.log". See also "C:/llvm/build/CMakeFiles/CMakeError.log". " If I want Clang to use its own C++ standard libraries, with LLD as the linker, instead of MSVC's variants, what should I do? Tell me that too please. Thanks. ________________________________ From: Osman Zakir <osmanzakir90 at hotmail.com> Sent: Thursday, November 29, 2018 10:33 PM To: Zachary Turner Subject: Re: [llvm-dev] Errors in configuration for LLVM with CMake GUI 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. 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. 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. And what is the CLANG_VENDOR setting asking for? The vendor that I got Clang from? And what about CLANG_VENDOR_UTI? CMAKE_INSTALL_OLDINCLUDEDIR is set to the Linux-specific /usr/local for some reason. What should I set it to? Note: @Zachary Turner<mailto:zturner at google.com> I wrote this before I saw your latest message. I'll try that now. Thanks. ________________________________ From: Zachary Turner <zturner at google.com> Sent: Thursday, November 29, 2018 9:49 PM To: Osman Zakir Cc: llvm-dev at lists.llvm.org Subject: Re: [llvm-dev] Errors in configuration for LLVM with CMake GUI 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. 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. 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. 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 On Thu, Nov 29, 2018 at 7:55 AM Osman Zakir via llvm-dev <llvm-dev at lists.llvm.org<mailto:llvm-dev at lists.llvm.org>> wrote: 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. For some reason, it's trying to find Nuget as well. I'll try to find path to it and put it there. ________________________________ From: Osman Zakir <osmanzakir90 at hotmail.com<mailto:osmanzakir90 at hotmail.com>> Sent: Thursday, November 29, 2018 8:43 PM To: llvm-dev at lists.llvm.org<mailto:llvm-dev at lists.llvm.org>; Jonathan Goodwin Subject: Re: [llvm-dev] Errors in configuration for LLVM with CMake GUI 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. @Jonathan Goodwin<mailto:jondgoodwin at gmail.com> , 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? ________________________________ From: Jonathan Goodwin <jondgoodwin at gmail.com<mailto:jondgoodwin at gmail.com>> Sent: Thursday, November 29, 2018 10:42 AM To: Osman Zakir Cc: llvm-dev at lists.llvm.org<mailto:llvm-dev at lists.llvm.org> Subject: Re: [llvm-dev] Errors in configuration for LLVM with CMake GUI 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. 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. 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. I don't know anything about 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. 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. On Thu, Nov 29, 2018 at 2:52 PM Osman Zakir via llvm-dev <llvm-dev at lists.llvm.org<mailto:llvm-dev at lists.llvm.org>> wrote: 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. 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). _______________________________________________ LLVM Developers mailing list llvm-dev at lists.llvm.org<mailto:llvm-dev at lists.llvm.org> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev _______________________________________________ LLVM Developers mailing list llvm-dev at lists.llvm.org<mailto:llvm-dev at lists.llvm.org> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20181129/1969c4a5/attachment.html>
Zachary Turner via llvm-dev
2018-Nov-29 17:59 UTC
[llvm-dev] Errors in configuration for LLVM with CMake GUI
This output is much more interesting. Can you show the full cmake command line or set of variables that you configured? 1. I don't know why it's saying it requires Perl. Perl is absolutely not a requirement 2. I don't know why it's trying to build openmp or compiler-rt. I guess it depends on how you configured CMake. openmp I don't think is well supported (perhaps not even supported at all) on Windows 3. I also don't know why it would be trying to find subversion. However, even if it is trying to find subversion, "C:/Program Files/TortoiseSVN/bin/ info C:/llvm" is a meaningless command line, because there is no executable there. It looks like it is trying to "run" a directory. So these are the problems you should be looking at I think. Can you try it from a command line, and not the cmake gui? For example, you might start by trying the exact command line I posted earlier. Even if it's not suitable for your needs, I know for certain that command line works for me, so see if it works for you. If it does not work, there's a problem with your installation, system, cmake version, etc. If it does work, then it's more likely a problem with the cmake command line you're running. On Thu, Nov 29, 2018 at 9:45 AM Osman Zakir <osmanzakir90 at hotmail.com> wrote:> I opened up an elevated Developer Command Prompt for VS2017, ran vcvarsall > with argument amd64, and then ran the command "cmake-gui" in that command > prompt. Then in that gui window, I clicked on "Configure" without doing > anything else. At the end, I got an error window saying that there were > errors, and that project files may be invalid. > > Here's the output from CMake: > " > > Could NOT find Backtrace (missing: Backtrace_LIBRARY > Backtrace_INCLUDE_DIR) > > Native target architecture is X86 > > Threads enabled. > > Doxygen disabled. > > Go bindings disabled. > > Could NOT find OCaml (missing: OCAMLFIND OCAML_VERSION OCAML_STDLIB_PATH) > > OCaml bindings disabled. > > Could NOT find Python module pygments > > Could NOT find Python module pygments.lexers.c_cpp > > Could NOT find Python module yaml > > LLVM host triple: x86_64-pc-windows-msvc > > LLVM default target triple: x86_64-pc-windows-msvc > > Using Debug VC++ CRT: MDd > > Using Release VC++ CRT: MD > > Using MinSizeRel VC++ CRT: MD > > Using RelWithDebInfo VC++ CRT: MD > > Constructing LLVMBuild project information > > CMake Error at C:/Program > Files/CMake/share/cmake-3.13/Modules/FindSubversion.cmake:123 (message): > Command "C:/Program Files/TortoiseSVN/bin/ info C:/llvm" failed with > output: > > Call Stack (most recent call first): > cmake/modules/VersionFromVCS.cmake:19 (subversion_wc_info) > CMakeLists.txt:757 (add_version_info_from_vcs) > > LLVMHello ignored -- Loadable modules not supported on this platform. > > Targeting AArch64 > > Targeting AMDGPU > > Targeting ARM > > Targeting BPF > > Targeting Hexagon > > Targeting Lanai > > Targeting Mips > > Targeting MSP430 > > Targeting NVPTX > > Targeting PowerPC > > Targeting Sparc > > Targeting SystemZ > > Targeting WebAssembly > > Targeting X86 > > Targeting XCore > > Compiler-RT supported architectures: x86_64 > > Builtin supported architectures: x86_64 > > Builtin supported architectures: x86_64 > > CMake Error at C:/Program > Files/CMake/share/cmake-3.13/Modules/FindPackageHandleStandardArgs.cmake:137 > (message): > Could NOT find Perl (missing: PERL_EXECUTABLE) > Call Stack (most recent call first): > C:/Program > Files/CMake/share/cmake-3.13/Modules/FindPackageHandleStandardArgs.cmake:378 > (_FPHSA_FAILURE_MESSAGE) > C:/Program Files/CMake/share/cmake-3.13/Modules/FindPerl.cmake:75 > (FIND_PACKAGE_HANDLE_STANDARD_ARGS) > projects/openmp/runtime/cmake/config-ix.cmake:147 (find_package) > projects/openmp/runtime/CMakeLists.txt:234 (include) > > Configuring incomplete, errors occurred! > > See also "C:/llvm/build/CMakeFiles/CMakeOutput.log". > > See also "C:/llvm/build/CMakeFiles/CMakeError.log". > " > > If I want Clang to use its own C++ standard libraries, with LLD as the > linker, instead of MSVC's variants, what should I do? Tell me that too > please. Thanks. > ------------------------------ > *From:* Osman Zakir <osmanzakir90 at hotmail.com> > *Sent:* Thursday, November 29, 2018 10:33 PM > *To:* Zachary Turner > > *Subject:* Re: [llvm-dev] Errors in configuration for LLVM with CMake GUI > 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. > > 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. > > 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. > > And what is the CLANG_VENDOR setting asking for? The vendor that I got > Clang from? And what about CLANG_VENDOR_UTI? > > CMAKE_INSTALL_OLDINCLUDEDIR is set to the Linux-specific /usr/local for > some reason. What should I set it to? > > Note: @Zachary Turner <zturner at google.com> I wrote this before I saw your > latest message. I'll try that now. Thanks. > ------------------------------ > *From:* Zachary Turner <zturner at google.com> > *Sent:* Thursday, November 29, 2018 9:49 PM > *To:* Osman Zakir > *Cc:* llvm-dev at lists.llvm.org > *Subject:* Re: [llvm-dev] Errors in configuration for LLVM with CMake GUI > > 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. > > 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. > > 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. > > 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 > On Thu, Nov 29, 2018 at 7:55 AM Osman Zakir via llvm-dev < > llvm-dev at lists.llvm.org> wrote: > > 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. > > For some reason, it's trying to find Nuget as well. I'll try to find path > to it and put it there. > ------------------------------ > *From:* Osman Zakir <osmanzakir90 at hotmail.com> > *Sent:* Thursday, November 29, 2018 8:43 PM > *To:* llvm-dev at lists.llvm.org; Jonathan Goodwin > > *Subject:* Re: [llvm-dev] Errors in configuration for LLVM with CMake GUI > > 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. > > @Jonathan Goodwin <jondgoodwin at gmail.com> , 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? > ------------------------------ > *From:* Jonathan Goodwin <jondgoodwin at gmail.com> > *Sent:* Thursday, November 29, 2018 10:42 AM > *To:* Osman Zakir > *Cc:* llvm-dev at lists.llvm.org > *Subject:* Re: [llvm-dev] Errors in configuration for LLVM with CMake GUI > > 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. > > 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. > > 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. > > I don't know anything about 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. > > 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. > > On Thu, Nov 29, 2018 at 2:52 PM Osman Zakir via llvm-dev < > llvm-dev at lists.llvm.org> wrote: > > 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. > > 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). > > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org > http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev > > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org > http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev > >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20181129/e683fdf6/attachment.html>
Jonathan Goodwin via llvm-dev
2018-Nov-29 22:17 UTC
[llvm-dev] Errors in configuration for LLVM with CMake GUI
" are you sure you didn't have to tell it where the header files for Windows are?" You should not have to and I do not. The point of CMake's configure step is that it probes your system to find out what tools to use and where to find libraries and include files. Because you specify use of the Visual Studio generator, it uses Microsoft's conventions to locate where the compiler, linker, libraries and include files are stored. That should be an automatic part of the Cmake 'configure' step. Which is why I was confused by it even looking for non-Windows include files, and then failing the configure step. With regard to the executable path for SVN or Nuget (or anything else), I cannot think of why you need to specify it for CMake to build LLVM. I see the error messages you posted, but in reality the LLVM build process should not need access to SVN to access the files, as all of the LLVM files should be viewable by CMake or any other program as normal files in the file system. You only need SVN-aware tools when doing change management activities or looking at earlier history. CMake is only working on the current version of the files which should be 100% viewable as normal files. Thus, CMake needs no knowledge of the SVN executable. As someone else said, you might be better off using the git repo version of LLVM instead. With regard to Perl, that appears to be failing because you are trying to build OpenMP as a project as part of the LLVM build. My strong recommendation is not to complicate your problematic build process out of the gate. I would recommend you get a vanilla build working first (with clang and lld), before trying to handle projects like backtrace, compiler-rt and openmp. And you may want to build them separately anyway, following their respective build processes. Wrt needing gcc for Git bash, I don't understand why that would be necessary. I don't have it and I use Git bash just fine. I understand that gcc can be made to work on Windows by jumping through some hoops, but it seems like you plan to have three very different toolsets that do essentially the same things: Visual Studio, LLVM w/ clang/lld, and GCC. Personally, that's too complicated for my tastes as there is too much potential for colliding include files in PATHs and such, but you may have your reasons. When I want to play with GCC, I usually just do it on a Linux box. You said you use this command: cmake -G "Visual Studio 15 2017" -Thost=x64 -DLLVM_ENABLE_PROJECTS=clang;lld -DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD=WebAssembly -DLLVM_TARGETS_TO_BUILD=X86 . To build clang and lld, I would think you would need something like this, as I mentioned earlier: cmake -G "Visual Studio 15 2017" -Thost=x64 -D CLANG_BUILD_TOOLS -DLLD _BUILD_TOOLS -DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD=WebAssembly -DLLVM_TARGETS_TO_BUILD=X86 . Hopefully by using the Git version of the LLVM source and stripping out the irrelevant extra projects, you will get further along ... On Fri, Nov 30, 2018 at 1:43 AM Osman Zakir <osmanzakir90 at hotmail.com> wrote:> 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. > > @Jonathan Goodwin <jondgoodwin at gmail.com> , 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? > ------------------------------ > *From:* Jonathan Goodwin <jondgoodwin at gmail.com> > *Sent:* Thursday, November 29, 2018 10:42 AM > *To:* Osman Zakir > *Cc:* llvm-dev at lists.llvm.org > *Subject:* Re: [llvm-dev] Errors in configuration for LLVM with CMake GUI > > 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. > > 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. > > 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. > > I don't know anything about 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. > > 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. > > On Thu, Nov 29, 2018 at 2:52 PM Osman Zakir via llvm-dev < > llvm-dev at lists.llvm.org> wrote: > > 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. > > 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). > > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org > http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev > >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20181130/2cfa7e70/attachment.html>
via llvm-dev
2018-Nov-29 22:38 UTC
[llvm-dev] Errors in configuration for LLVM with CMake GUI
With regard to the executable path for SVN or Nuget (or anything else), I cannot think of why you need to specify it for CMake to build LLVM. CMake uses the version control system (SVN or git) to derive part of the version string for the build. Whichever one you use, the location of the tool should be on the PATH so that simple "svn status" or "git status" commands will work. FTR I'm using Visual Studio 2015, with the git "mono repo" and this is my CMake invocation: cmake -G "Visual Studio 14 Win64" -Thost=x64 -DLLVM_ENABLE_ASSERTIONS=ON ^ -DLLVM_ENABLE_PROJECTS="llvm;clang;lld" path\to\llvm As previously noted, if you are following the SVN instructions, and put your clang and lld checkouts under llvm\tools, then you should omit the LLVM_ENABLE_PROJECTS definition. --paulr -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20181129/f198e3ab/attachment.html>
Maybe Matching Threads
- Errors in configuration for LLVM with CMake GUI
- Errors in configuration for LLVM with CMake GUI
- Have LLD and Clang in their correct locations, but still can't generate project files for LLVM
- Couldn't successfully generate project files for LLVM (checked out from trunk)
- Errors in configuration for LLVM with CMake GUI