From: Victor A. <vic...@wi...> - 2012-07-07 02:27:51
|
Hi all, I'm brand new to the list and to the project. I have been hearing a lot of chatter about Clang lately, was curious and that led me here. My configuration is Ubuntu 12.04 So I start following the directions in the docs/gettingstarted.html file<http://avr-llvm.svn.sourceforge.net/viewvc/avr-llvm/llvm/trunk/docs/gettingstarted.html?revision=164>. Everything was going fine (ish... patching reported some failures) until I hit the steps: $ cd .. $ mkdir build $ cd ../build build$ ../llvm/configure --prefix=$HOME/usr/avr-llvm/ --disable-optimized --enable-targets=avr build$ make First of all I think "$HOME/usr/avr-llvm/" should be "$HOME/avr-llvm/". I also think the line "cd ../build" should just say "cd build". But anyway I get the following error after some crunching (even after those "fixes" I mentioned). ... > checking whether byte ordering is bigendian... no > configure: error: Unrecognized target avr > configure: error: ../../../llvm/projects/sample/configure failed for > projects/sample I followed all the preceding steps (copy/paste) of patching and what not, but apparently something is out of sync with the documentation, the patches, and the repositories? Some more details about the preceding step outputs are as follows: *llvm checkout*: Checked out revision 159885. *avr-llvm checkout*: Checked out revision 197. *patch* output: cat ../avr-llvm/patches/*.diff | patch -p0 > patching file lib/CodeGen/AsmPrinter/AsmPrinter.cpp > patching file CMakeLists.txt > Hunk #1 succeeded at 75 (offset 3 lines). > patching file cmake/config-ix.cmake > Hunk #1 succeeded at 317 (offset 2 lines). > patching file autoconf/configure.ac > Hunk #2 succeeded at 536 (offset 23 lines). > Hunk #3 FAILED at 631. > Hunk #4 succeeded at 668 (offset 22 lines). > Hunk #5 succeeded at 684 (offset 21 lines). > 1 out of 5 hunks FAILED -- saving rejects to file autoconf/configure.ac.rej > patching file include/llvm/CallingConv.h > patching file lib/VMCore/AsmWriter.cpp > Hunk #1 succeeded at 1533 (offset 28 lines). > Hunk #2 succeeded at 1836 (offset 28 lines). > Hunk #3 succeeded at 1894 (offset 28 lines). > patching file lib/AsmParser/LLParser.cpp > Hunk #1 succeeded at 1063 (offset 42 lines). > Hunk #2 succeeded at 1082 (offset 42 lines). > patching file lib/AsmParser/LLLexer.cpp > Hunk #1 succeeded at 521 (offset 3 lines). > patching file lib/AsmParser/LLToken.h > Hunk #1 succeeded at 77 (offset 1 line). > patching file lib/Target/LLVMBuild.txt > Hunk #1 FAILED at 16. > 1 out of 1 hunk FAILED -- saving rejects to file > lib/Target/LLVMBuild.txt.rej > patching file lib/CodeGen/RegAllocGreedy.cpp > patching file lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp > Hunk #1 FAILED at 6114. > Hunk #2 succeeded at 6672 (offset 365 lines). > 1 out of 2 hunks FAILED -- saving rejects to file > lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp.rej > patching file include/llvm/Target/TargetCallingConv.h > Hunk #1 succeeded at 40 with fuzz 1 (offset 4 lines). > Hunk #2 succeeded at 99 (offset 4 lines). > patching file include/llvm/ADT/Triple.h > Hunk #2 succeeded at 72 with fuzz 2 (offset 1 line). > patching file lib/Support/Triple.cpp > Hunk #2 succeeded at 56 (offset 1 line). > Hunk #3 succeeded at 94 with fuzz 1 (offset 8 lines). > Hunk #4 succeeded at 150 (offset 11 lines). > Hunk #5 succeeded at 219 (offset 13 lines). > Hunk #6 succeeded at 264 with fuzz 1 (offset 15 lines). > Hunk #7 succeeded at 678 (offset 41 lines). > Hunk #8 succeeded at 727 (offset 42 lines). > Hunk #9 succeeded at 766 (offset 43 lines). I can't imagine those FAILED messages are expected... so the problem is probably related I'm guessing. *rsync*: terminates silently. Can anyone lend me a hand continuing to make progress building? Kind Regards, Vic -- Victor Aprea // Wicked Device vic...@wi... T: twitter.com/vicatcu/ |
From: John M. <ato...@gm...> - 2012-07-07 05:46:21
|
Hi Victor, First of all I think "$HOME/usr/avr-llvm/" should be "$HOME/avr-llvm/". I > also think the line "cd ../build" should just say "cd build". But anyway I > I suspect Josef uses a Linux distro other then Ubuntu which is why his instructions in the getting started page don't match exactly. > get the following error after some crunching (even after those "fixes" I > mentioned). > > ... >> checking whether byte ordering is bigendian... no >> configure: error: Unrecognized target avr >> configure: error: ../../../llvm/projects/sample/configure failed for >> projects/sample > > This still needs to be updated in the patch files. You can just delete the projects/sample folder for now. I can't imagine those FAILED messages are expected... so the problem is > probably related I'm guessing. > > Nope, you should always expect the patches to apply cleanly. > Can anyone lend me a hand continuing to make progress building? > There seems to be constant refactoring and API changes in Clang / LLVM which causes our patch files to get out of date rather quickly. I've been very busy lately so haven't been able to keep the patches up to date. I'll try to fix it on Sunday. --John |
From: Nicklas Bo J. <nbj...@gm...> - 2012-07-07 16:32:17
|
Hi Victor, If the patches do not apply cleanly, you should be able to manually apply the patches where they are failing without too much hassle, e.g. look at the .rej files. Also besides deleting projects/sample, I've needed to manually patch the configure file: use the original and copy what e.g. msp430 does and replace msp430 with avr. I'm also running Ubuntu 12.04 so it should be possible. Please let us know any further issues. BR Nicklas On Sat, Jul 7, 2012 at 3:57 AM, Victor Aprea <vic...@wi...>wrote: > Hi all, > > I'm brand new to the list and to the project. I have been hearing a lot of > chatter about Clang lately, was curious and that led me here. My > configuration is Ubuntu 12.04 > > So I start following the directions in the docs/gettingstarted.html file<http://avr-llvm.svn.sourceforge.net/viewvc/avr-llvm/llvm/trunk/docs/gettingstarted.html?revision=164>. > Everything was going fine (ish... patching reported some failures) until I > hit the steps: > > $ cd .. > $ mkdir build > $ cd ../build > > build$ ../llvm/configure --prefix=$HOME/usr/avr-llvm/ --disable-optimized --enable-targets=avr > build$ make > > First of all I think "$HOME/usr/avr-llvm/" should be "$HOME/avr-llvm/". I > also think the line "cd ../build" should just say "cd build". But anyway I > get the following error after some crunching (even after those "fixes" I > mentioned). > > ... >> checking whether byte ordering is bigendian... no >> configure: error: Unrecognized target avr >> configure: error: ../../../llvm/projects/sample/configure failed for >> projects/sample > > > I followed all the preceding steps (copy/paste) of patching and what not, > but apparently something is out of sync with the documentation, the > patches, and the repositories? Some more details about the preceding step > outputs are as follows: > > *llvm checkout*: Checked out revision 159885. > *avr-llvm checkout*: Checked out revision 197. > *patch* output: > > cat ../avr-llvm/patches/*.diff | patch -p0 >> patching file lib/CodeGen/AsmPrinter/AsmPrinter.cpp >> patching file CMakeLists.txt >> Hunk #1 succeeded at 75 (offset 3 lines). >> patching file cmake/config-ix.cmake >> Hunk #1 succeeded at 317 (offset 2 lines). >> patching file autoconf/configure.ac >> Hunk #2 succeeded at 536 (offset 23 lines). >> Hunk #3 FAILED at 631. >> Hunk #4 succeeded at 668 (offset 22 lines). >> Hunk #5 succeeded at 684 (offset 21 lines). >> 1 out of 5 hunks FAILED -- saving rejects to file >> autoconf/configure.ac.rej >> patching file include/llvm/CallingConv.h >> patching file lib/VMCore/AsmWriter.cpp >> Hunk #1 succeeded at 1533 (offset 28 lines). >> Hunk #2 succeeded at 1836 (offset 28 lines). >> Hunk #3 succeeded at 1894 (offset 28 lines). >> patching file lib/AsmParser/LLParser.cpp >> Hunk #1 succeeded at 1063 (offset 42 lines). >> Hunk #2 succeeded at 1082 (offset 42 lines). >> patching file lib/AsmParser/LLLexer.cpp >> Hunk #1 succeeded at 521 (offset 3 lines). >> patching file lib/AsmParser/LLToken.h >> Hunk #1 succeeded at 77 (offset 1 line). >> patching file lib/Target/LLVMBuild.txt >> Hunk #1 FAILED at 16. >> 1 out of 1 hunk FAILED -- saving rejects to file >> lib/Target/LLVMBuild.txt.rej >> patching file lib/CodeGen/RegAllocGreedy.cpp >> patching file lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp >> Hunk #1 FAILED at 6114. >> Hunk #2 succeeded at 6672 (offset 365 lines). >> 1 out of 2 hunks FAILED -- saving rejects to file >> lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp.rej >> patching file include/llvm/Target/TargetCallingConv.h >> Hunk #1 succeeded at 40 with fuzz 1 (offset 4 lines). >> Hunk #2 succeeded at 99 (offset 4 lines). >> patching file include/llvm/ADT/Triple.h >> Hunk #2 succeeded at 72 with fuzz 2 (offset 1 line). >> patching file lib/Support/Triple.cpp >> Hunk #2 succeeded at 56 (offset 1 line). >> Hunk #3 succeeded at 94 with fuzz 1 (offset 8 lines). >> Hunk #4 succeeded at 150 (offset 11 lines). >> Hunk #5 succeeded at 219 (offset 13 lines). >> Hunk #6 succeeded at 264 with fuzz 1 (offset 15 lines). >> Hunk #7 succeeded at 678 (offset 41 lines). >> Hunk #8 succeeded at 727 (offset 42 lines). >> Hunk #9 succeeded at 766 (offset 43 lines). > > > I can't imagine those FAILED messages are expected... so the problem is > probably related I'm guessing. > > *rsync*: terminates silently. > > Can anyone lend me a hand continuing to make progress building? > > Kind Regards, > > Vic > -- > Victor Aprea // Wicked Device > vic...@wi... > T: twitter.com/vicatcu/ > > > > ------------------------------------------------------------------------------ > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. Discussions > will include endpoint security, mobile security and the latest in malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > _______________________________________________ > avr-llvm-devel mailing list > avr...@li... > https://lists.sourceforge.net/lists/listinfo/avr-llvm-devel > > |
From: John M. <ato...@gm...> - 2012-07-08 09:19:00
|
I updated the patch files. Please let me know if they work for you. When patching clang use (or reference) *doPatch.sh* since the order of the patches being applied matters. |
From: Victor A. <vic...@wi...> - 2012-07-08 23:57:33
|
John, Thanks I'll try this later tonight. Can you explain more about what you mean with regard to patching clang? My thought on how to do it was to checkout llvm. Then checkout clang into llvm per the getting started guide<http://clang.llvm.org/get_started.html>(step 3). Then build and end up with a clang executable that can target the avr machine architecture. Is there something I need to do between checking out clang and building? Regards, Vic On Sun, Jul 8, 2012 at 5:18 AM, John Myers <ato...@gm...> wrote: > I updated the patch files. > Please let me know if they work for you. > > When patching clang use (or reference) *doPatch.sh* since the order of > the patches being applied matters. > -- Victor Aprea // Wicked Device vic...@wi... M: 607.745.1515 T: twitter.com/vicatcu/ |
From: John M. <ato...@gm...> - 2012-07-09 01:32:25
|
The 'Getting started with avr-llvm' page is missing the clang info and only shows checking out the llvm/trunk. You'll also need to check out the cfe folder in avr-llvm. You can check out the whole of avr-llvm with: svn co https://avr-llvm.svn.sourceforge.net/svnroot/avr-llvm After following the clang getting started guide, from the root of Clang runthe doPatch.sh script: tools/clang$ ./PATH/TO/avr-llvm/cfe/trunk/patches/doPatch.sh On Sun, Jul 8, 2012 at 4:57 PM, Victor Aprea <vic...@wi...>wrote: > John, > > Thanks I'll try this later tonight. Can you explain more about what you > mean with regard to patching clang? My thought on how to do it was to > checkout llvm. Then checkout clang into llvm per the getting started guide<http://clang.llvm.org/get_started.html>(step 3). Then build and end up with a clang executable that can target the > avr machine architecture. Is there something I need to do between checking > out clang and building? > > Regards, > > Vic > > On Sun, Jul 8, 2012 at 5:18 AM, John Myers <ato...@gm...>wrote: > >> I updated the patch files. >> Please let me know if they work for you. >> >> When patching clang use (or reference) *doPatch.sh* since the order of >> the patches being applied matters. >> > > > > -- > Victor Aprea // Wicked Device > vic...@wi... > M: 607.745.1515 > T: twitter.com/vicatcu/ > > |
From: Victor A. <vic...@wi...> - 2012-07-09 04:38:38
|
John, For a start, thanks the patches applied correctly now... I was able to get the whole thing to build successfully by starting from scratch and then following your instructions below. Thanks so much! Now to start using it... exciting. Cheers, Vic On Sun, Jul 8, 2012 at 9:32 PM, John Myers <ato...@gm...> wrote: > The 'Getting started with avr-llvm' page is missing the clang info and > only shows checking out the llvm/trunk. > You'll also need to check out the cfe folder in avr-llvm. > You can check out the whole of avr-llvm with: > svn co https://avr-llvm.svn.sourceforge.net/svnroot/avr-llvm > > After following the clang getting started guide, from the root of Clang > run the doPatch.sh script: > tools/clang$ ./PATH/TO/avr-llvm/cfe/trunk/patches/doPatch.sh > > > On Sun, Jul 8, 2012 at 4:57 PM, Victor Aprea < > vic...@wi...> wrote: > >> John, >> >> Thanks I'll try this later tonight. Can you explain more about what you >> mean with regard to patching clang? My thought on how to do it was to >> checkout llvm. Then checkout clang into llvm per the getting started >> guide <http://clang.llvm.org/get_started.html> (step 3). Then build and >> end up with a clang executable that can target the avr machine >> architecture. Is there something I need to do between checking out clang >> and building? >> >> Regards, >> >> Vic >> >> On Sun, Jul 8, 2012 at 5:18 AM, John Myers <ato...@gm...>wrote: >> >>> I updated the patch files. >>> Please let me know if they work for you. >>> >>> When patching clang use (or reference) *doPatch.sh* since the order of >>> the patches being applied matters. >>> >> >> >> >> -- >> Victor Aprea // Wicked Device >> vic...@wi... >> M: 607.745.1515 >> T: twitter.com/vicatcu/ >> >> > -- Victor Aprea // Wicked Device vic...@wi... M: 607.745.1515 T: twitter.com/vicatcu/ |
From: Stefan L. <ton...@us...> - 2012-07-09 21:54:51
|
Hi, This is also my first appearance on these mailing lists, but I've been following this project for some time now. First of all, a big thanks for taking care of these build problems! I could now finally remove my own feeble attempts at fixing the patch files locally. I build on a VM with Ubuntu 12.04 using a Jenkins continuous integration server (with the hope of someday helping you guys out with keeping this project synced with llvm). However, I still get an get an error during the build(*): make[5]: Entering directory `/var/lib/jenkins/jobs/avr-llvm-build/workspace/llvm/projects/compiler-rt' MKDIR: /var/lib/jenkins/jobs/avr-llvm-build/workspace/llvm/tools/clang/runtime/compiler-rt/clang_linux/full-i386/i386/SubDir.lib COMPILE: clang_linux/full-i386/i386: /var/lib/jenkins/jobs/avr-llvm-build/workspace/llvm/projects/compiler-rt/lib/absvdi2.c error: unable to create target: 'No available targets are compatible with this triple, see -version for the available targets.' 1 error generated. make[5]: *** [/var/lib/jenkins/jobs/avr-llvm-build/workspace/llvm/tools/clang/runtime/compiler-rt/clang_linux/full-i386/i386/SubDir.lib/absvdi2.o] Error 1 make[5]: Leaving directory `/var/lib/jenkins/jobs/avr-llvm-build/workspace/llvm/projects/compiler-rt' *Revisions https://avr-llvm.svn.sourceforge.net/svnroot/avr-llvm/llvm/trunk : 202 http://llvm.org/svn/llvm-project/compiler-rt/trunk : 159934 http://llvm.org/svn/llvm-project/cfe/trunk : 159956 http://llvm.org/svn/llvm-project/llvm/trunk : 159955 https://avr-llvm.svn.sourceforge.net/svnroot/avr-llvm/cfe/trunk : 199 Also it seems like my test-results are a bit worse than what I've seen you get in other threads on the mailing list: Expected Passes : 2136 Expected Failures : 12 Unsupported Tests : 3386 Unexpected Failures: 210 And the since most of the failures have the following in the log, I think the problems might be related. - [...]/llvm/Debug+Asserts/bin/llc: : error: unable to get target for 'i386-pc-linux-gnu', see --version and --triple. - [...]/llvm/Debug+Asserts/bin/lli: error creating EE: Unable to find target for this triple (no targets are registered) Does anyone have any pointers on what the compiler-rt build error could be caused by? Kind regards, Stefan ----------------------------------- Information from the resulting binaries: + bin/llc --version LLVM (http://llvm.org/): LLVM version 3.2svn DEBUG build with assertions. Built Jul 9 2012 (21:02:23). Default target: i386-pc-linux-gnu Host CPU: core-avx-i Registered Targets: avr - Atmel AVR Microcontroller [experimental] + + bin/llc -march=avr -mcpu=help bin/llvm-as Available CPUs for this target: generic - Select the generic processor. Available features for this target: asmonly - Device is assembler only. Use +feature to enable a feature, or -feature to disable it. For example, llc -mcpu=mycpu -mattr=+feature1,-feature2 |
From: John M. <ato...@gm...> - 2012-07-10 00:05:40
|
Hi Stefan, However, I still get an get an error during the build(*): > > It looks like its trying to build for the host instead of the AVR target. What is your configure options set to? Is this error part of the LLVM build or are you trying to do a make in projects/compiler-rt ? When only building for the AVR target I don't believe compiler-rt is of much use yet (other then Apple's Blocks feature). There aren't any patches or code for AVR optimized library functions. So I'm guessing not much of the compiler-rt library should be included by the build system. --John |
From: Stefan L. <ton...@us...> - 2012-07-12 21:03:15
|
>> However, I still get an get an error during the build(*): >> > It looks like its trying to build for the host instead of the AVR target. > What is your configure options set to? ./configure --disable-optimized --enable-targets=avr > Is this error part of the LLVM build or are you trying to do a make in > projects/compiler-rt ? It's part of the LLVM build (just "make" in the llvm directory), but since I did have compiler-rt checked out in the projects folder as described in "Getting Started: Building and Running Clang" (http://clang.llvm.org/get_started.html) it got built too. The tests were run with "make check" in the llvm\test directory. I've now tried building without checking out compiler-rt, since you made it sound like it wasn't crucial for the AVR target, and the build came through without any errors. Thanks for the help. |