Jack Orenstein via llvm-dev
2019-Jan-09 04:34 UTC
[llvm-dev] Problems trying to build LLVM
Hi, I am brand new to LLVM, or more precisely, trying to be. I'm getting stuck on compiling LLVM. - I tried installing on a Mint 18.1 VM with 6GB RAM, and the builds of some large executables were killed by the OOM killer. I finally realized that I needed to build using shared libraries, and succeeded. This was in November. - I put aside my LLVM project, and just got back to it. I got stuck compiling the Kaleidoscope demo, encountering this error: /tmp/kal-2072b8.o:(.data._ZN4llvm30VerifyDisableABIBreakingChecksE+0x0): undefined reference to `llvm::DisableABIBreakingChecks' This discussion, from this mailing list, points out that I need to build LLVM with -DLLVM_DISABLE_ABI_BREAKING_CHECKS_ENFORCING=OFF. - So now I am trying to rebuild LLVM, and ran into a few new problems. First, I discovered that I need the Z3 theorem prover. Unsure why this problem did not show up before. Second, I'm running into many errors like this: CMake Error at cmake/modules/AddLLVM.cmake:570 (target_link_libraries): Attempt to add link library "clangAST" to target "clangApplyReplacements" which is not built in this directory. Call Stack (most recent call first): tools/clang/cmake/modules/AddClang.cmake:86 (llvm_add_library) tools/extra/clang-apply-replacements/CMakeLists.txt:5 (add_clang_library) Getting LLVM installed is proving much more problematic than I was expecting, based on experience with many other open source projects. Can someone give me a push in the right direction? I started with this document: http://llvm.org/docs/GettingStarted.html, but found no guidance about the problems with huge executables, advice about shared libraries, etc. Thanks. Jack Orenstein -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20190108/a783ec17/attachment.html>
On 01/08/2019 08:34 PM, Jack Orenstein via llvm-dev wrote:> Hi, I am brand new to LLVM, or more precisely, trying to be. I'm getting stuck on compiling LLVM. > > - I tried installing on a Mint 18.1 VM with 6GB RAM, and the builds of some large executables were killed by the OOM killer. I finally realized that I needed to build using shared libraries, and succeeded. This was in November. > > - I put aside my LLVM project, and just got back to it. I got stuck compiling the Kaleidoscope demo, encountering this error: > > /tmp/kal-2072b8.o:(.data._ZN4llvm30VerifyDisableABIBreakingChecksE+0x0): undefined reference to `llvm::DisableABIBreakingChecks' > > This discussion, from this mailing list, points out that I need to build LLVM with -DLLVM_DISABLE_ABI_BREAKING_CHECKS_ENFORCING=OFF. > > - So now I am trying to rebuild LLVM, and ran into a few new problems. First, I discovered that I need the Z3 theorem prover. Unsure why this problem did not show up before. Second, I'm running into many errors like this: > > CMake Error at cmake/modules/AddLLVM.cmake:570 (target_link_libraries): > Attempt to add link library "clangAST" to target "clangApplyReplacements" > which is not built in this directory. > Call Stack (most recent call first): > tools/clang/cmake/modules/AddClang.cmake:86 (llvm_add_library) > tools/extra/clang-apply-replacements/CMakeLists.txt:5 (add_clang_library) > > Getting LLVM installed is proving much more problematic than I was expecting, based on experience with many other open source projects. Can someone give me a push in the right direction? I started with this document: http://llvm.org/docs/GettingStarted.html, but found no guidance about the problems with huge executables, advice about shared libraries, etc. >Hi, I would recommend doing a clean build (i.e. delete your current build directory or use a new one) of llvm and then post the cmake options you used if you still have issues even with a clean build. -Tom> Thanks. > > Jack Orenstein > > > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org > http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev >
Alberto Barbaro via llvm-dev
2019-Jan-09 06:48 UTC
[llvm-dev] Problems trying to build LLVM
Hi Jack, I'm sure few weeks ago I had the same problem with DisableABI and if I remember properly it was because I used different version of llvm-config and clang or because I used the -I with a wrong path. Can you send us the source code you are trying to compile and the command you use for compiling it? Thanks On Wed, Jan 9, 2019, 04:35 Jack Orenstein via llvm-dev < llvm-dev at lists.llvm.org wrote:> Hi, I am brand new to LLVM, or more precisely, trying to be. I'm getting > stuck on compiling LLVM. > > - I tried installing on a Mint 18.1 VM with 6GB RAM, and the builds of > some large executables were killed by the OOM killer. I finally realized > that I needed to build using shared libraries, and succeeded. This was in > November. > > - I put aside my LLVM project, and just got back to it. I got stuck > compiling the Kaleidoscope demo, encountering this error: > > > /tmp/kal-2072b8.o:(.data._ZN4llvm30VerifyDisableABIBreakingChecksE+0x0): > undefined reference to `llvm::DisableABIBreakingChecks' > > This discussion, from this mailing list, points out that I need to build > LLVM with -DLLVM_DISABLE_ABI_BREAKING_CHECKS_ENFORCING=OFF. > > - So now I am trying to rebuild LLVM, and ran into a few new problems. > First, I discovered that I need the Z3 theorem prover. Unsure why this > problem did not show up before. Second, I'm running into many errors like > this: > > CMake Error at cmake/modules/AddLLVM.cmake:570 (target_link_libraries): > Attempt to add link library "clangAST" to target > "clangApplyReplacements" > which is not built in this directory. > Call Stack (most recent call first): > tools/clang/cmake/modules/AddClang.cmake:86 (llvm_add_library) > tools/extra/clang-apply-replacements/CMakeLists.txt:5 > (add_clang_library) > > Getting LLVM installed is proving much more problematic than I was > expecting, based on experience with many other open source projects. Can > someone give me a push in the right direction? I started with this > document: http://llvm.org/docs/GettingStarted.html, but found no guidance > about the problems with huge executables, advice about shared libraries, > etc. > > Thanks. > > Jack Orenstein > _______________________________________________ > 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/20190109/12132748/attachment.html>
George Karpenkov via llvm-dev
2019-Jan-09 06:54 UTC
[llvm-dev] Problems trying to build LLVM
Hi Jack, None of the options you have mentioned are necessary, and neither is Z3. As Tom said, try doing a clean build (IMO it’s easier with a monorepo) and post exact commands you have used if it fails. Sent from my iPhone> On Jan 8, 2019, at 22:44, Tom Stellard via llvm-dev <llvm-dev at lists.llvm.org> wrote: > >> On 01/08/2019 08:34 PM, Jack Orenstein via llvm-dev wrote: >> Hi, I am brand new to LLVM, or more precisely, trying to be. I'm getting stuck on compiling LLVM. >> >> - I tried installing on a Mint 18.1 VM with 6GB RAM, and the builds of some large executables were killed by the OOM killer. I finally realized that I needed to build using shared libraries, and succeeded. This was in November. >> >> - I put aside my LLVM project, and just got back to it. I got stuck compiling the Kaleidoscope demo, encountering this error: >> >> /tmp/kal-2072b8.o:(.data._ZN4llvm30VerifyDisableABIBreakingChecksE+0x0): undefined reference to `llvm::DisableABIBreakingChecks' >> >> This discussion, from this mailing list, points out that I need to build LLVM with -DLLVM_DISABLE_ABI_BREAKING_CHECKS_ENFORCING=OFF. >> >> - So now I am trying to rebuild LLVM, and ran into a few new problems. First, I discovered that I need the Z3 theorem prover. Unsure why this problem did not show up before. Second, I'm running into many errors like this: >> >> CMake Error at cmake/modules/AddLLVM.cmake:570 (target_link_libraries): >> Attempt to add link library "clangAST" to target "clangApplyReplacements" >> which is not built in this directory. >> Call Stack (most recent call first): >> tools/clang/cmake/modules/AddClang.cmake:86 (llvm_add_library) >> tools/extra/clang-apply-replacements/CMakeLists.txt:5 (add_clang_library) >> >> Getting LLVM installed is proving much more problematic than I was expecting, based on experience with many other open source projects. Can someone give me a push in the right direction? I started with this document: http://llvm.org/docs/GettingStarted.html, but found no guidance about the problems with huge executables, advice about shared libraries, etc. >> > Hi, > > I would recommend doing a clean build (i.e. delete your current build directory > or use a new one) of llvm and then post the cmake options you used if you > still have issues even with a clean build. > > -Tom > >> Thanks. >> >> Jack Orenstein >> >> >> _______________________________________________ >> 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
Jack Orenstein via llvm-dev
2019-Jan-09 17:10 UTC
[llvm-dev] Problems trying to build LLVM
Thank you for all the responses. I am going to start from scratch, trying a release build and no other options, and work my way to trying the Kaleidoscope demo again. I will post problems encountered, if any. Jack On Wed, Jan 9, 2019 at 1:56 AM Alberto Barbaro <barbaro.alberto at gmail.com> wrote:> Hi Jack, > I'm sure few weeks ago I had the same problem with DisableABI and if I > remember properly it was because I used different version of llvm-config > and clang or because I used the -I with a wrong path. Can you send us the > source code you are trying to compile and the command you use for compiling > it? > > Thanks > > > On Wed, Jan 9, 2019, 04:35 Jack Orenstein via llvm-dev < > llvm-dev at lists.llvm.org wrote: > >> Hi, I am brand new to LLVM, or more precisely, trying to be. I'm getting >> stuck on compiling LLVM. >> >> - I tried installing on a Mint 18.1 VM with 6GB RAM, and the builds of >> some large executables were killed by the OOM killer. I finally realized >> that I needed to build using shared libraries, and succeeded. This was in >> November. >> >> - I put aside my LLVM project, and just got back to it. I got stuck >> compiling the Kaleidoscope demo, encountering this error: >> >> >> /tmp/kal-2072b8.o:(.data._ZN4llvm30VerifyDisableABIBreakingChecksE+0x0): >> undefined reference to `llvm::DisableABIBreakingChecks' >> >> This discussion, from this mailing list, points out that I need to >> build LLVM with -DLLVM_DISABLE_ABI_BREAKING_CHECKS_ENFORCING=OFF. >> >> - So now I am trying to rebuild LLVM, and ran into a few new problems. >> First, I discovered that I need the Z3 theorem prover. Unsure why this >> problem did not show up before. Second, I'm running into many errors like >> this: >> >> CMake Error at cmake/modules/AddLLVM.cmake:570 >> (target_link_libraries): >> Attempt to add link library "clangAST" to target >> "clangApplyReplacements" >> which is not built in this directory. >> Call Stack (most recent call first): >> tools/clang/cmake/modules/AddClang.cmake:86 (llvm_add_library) >> tools/extra/clang-apply-replacements/CMakeLists.txt:5 >> (add_clang_library) >> >> Getting LLVM installed is proving much more problematic than I was >> expecting, based on experience with many other open source projects. Can >> someone give me a push in the right direction? I started with this >> document: http://llvm.org/docs/GettingStarted.html, but found no >> guidance about the problems with huge executables, advice about shared >> libraries, etc. >> >> Thanks. >> >> Jack Orenstein >> _______________________________________________ >> 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/20190109/3d72e9ec/attachment.html>