Xerxes Rånby
2009-Nov-16 10:42 UTC
[LLVMdev] Compilation error while cross compiling LLVM for ARM - the __clear_cache issue - now the __sync_val_compare_and_swap issue - now the internal compiler error issue.
Prasanth J wrote:> Hi, > > As you said i downloaded arm toolchain from codesourcery(2009q3 with > gcc 4.4.1 version).. if i use this toolchain i am getting the > following error.. > > make[2]: Entering directory > `/home/prasanth/LLVM_ARM/llvm-with-armgcc441/llvm-obj/lib/Analysis' > llvm[2]: Compiling LoopPass.cpp for Release build > if arm-none-linux-gnueabi-g++ > -I/home/prasanth/LLVM_ARM/llvm-with-armgcc433/llvm/include > -I/home/prasanth/LLVM_ARM/llvm-with-armgcc433/llvm/lib/Analysis > -I/home/prasanth/LLVM_ARM/llvm-with-armgcc441/llvm-obj/include > -I/home/prasanth/LLVM_ARM/llvm-with-armgcc441/llvm-obj/lib/Analysis > -D_DEBUG -D_GNU_SOURCE -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS > -O2 -fomit-frame-pointer -fno-exceptions -fPIC -Woverloaded-virtual > -pedantic -Wno-long-long -Wall -W -Wno-unused-parameter > -Wwrite-strings -c -MMD -MP -MF > "/home/prasanth/LLVM_ARM/llvm-with-armgcc441/llvm-obj/lib/Analysis/Release/LoopPass.d.tmp" > -MT > "/home/prasanth/LLVM_ARM/llvm-with-armgcc441/llvm-obj/lib/Analysis/Release/LoopPass.o" > -MT > "/home/prasanth/LLVM_ARM/llvm-with-armgcc441/llvm-obj/lib/Analysis/Release/LoopPass.d" > /home/prasanth/LLVM_ARM/llvm-with-armgcc433/llvm/lib/Analysis/LoopPass.cpp > -o > /home/prasanth/LLVM_ARM/llvm-with-armgcc441/llvm-obj/lib/Analysis/Release/LoopPass.o > ; \ > then /bin/mv -f > "/home/prasanth/LLVM_ARM/llvm-with-armgcc441/llvm-obj/lib/Analysis/Release/LoopPass.d.tmp" > "/home/prasanth/LLVM_ARM/llvm-with-armgcc441/llvm-obj/lib/Analysis/Release/LoopPass.d"; > else /bin/rm > "/home/prasanth/LLVM_ARM/llvm-with-armgcc441/llvm-obj/lib/Analysis/Release/LoopPass.d.tmp"; > exit 1; fi > /home/prasanth/LLVM_ARM/llvm-with-armgcc433/llvm/lib/Analysis/LoopPass.cpp: > In member function 'void > llvm::LPPassManager::deleteLoopFromQueue(llvm::Loop*)': > /home/prasanth/LLVM_ARM/llvm-with-armgcc433/llvm/lib/Analysis/LoopPass.cpp:100: > internal compiler error: Segmentation fault > Please submit a full bug report, > with preprocessed source if appropriate. > See <https://support.codesourcery.com/GNUToolchain/> for instructions. > /bin/rm: cannot remove > `/home/prasanth/LLVM_ARM/llvm-with-armgcc441/llvm-obj/lib/Analysis/Release/LoopPass.d.tmp': > No such file or directory > make[2]: *** > [/home/prasanth/LLVM_ARM/llvm-with-armgcc441/llvm-obj/lib/Analysis/Release/LoopPass.o] > Error 1 > make[2]: Leaving directory > `/home/prasanth/LLVM_ARM/llvm-with-armgcc441/llvm-obj/lib/Analysis' > make[1]: *** [Analysis/.makeall] Error 2 > make[1]: Leaving directory > `/home/prasanth/LLVM_ARM/llvm-with-armgcc441/llvm-obj/lib' > make: *** [all] Error 1 > > please let me know how should i resolve this error... > > Thanks and Regards, > Prasanth J >Make sure you are running a clean build. If you are then follow the suggested instructions in the error message and file a bugreport for your toolchain to codesourcery. /home/prasanth/LLVM_ARM/llvm-with-armgcc433/llvm/lib/Analysis/LoopPass.cpp:100: internal compiler error: Segmentation fault Please submit a full bug report, with preprocessed source if appropriate. See <https://support.codesourcery.com/GNUToolchain/> for instructions. Cheers Xerxes
Prasanth J
2009-Nov-16 10:55 UTC
[LLVMdev] Compilation error while cross compiling LLVM for ARM - the __clear_cache issue - now the __sync_val_compare_and_swap issue - now the internal compiler error issue.
Hi, I can able to compile LLVM using armgcc_4.3.3 (codesourcery2009q1..).. but when i tried to run it on target it shows GCC 4.3.0 version not found. So i copied the runtime libraries (libc.so and libgcc_s.so) from the toolchain to the target and exported its path in LD_LIBRARY_PATH. But when i tried to run any llvm tools on target its crashing with Segmentation fault. What could be the problem for this. My target kernel and rootfs are compiled with armgcc-4.2.1... so should i need to compile the kernel and rootfs with armgcc-4.3.3? If i want to use arm-toolchain-4.2.1 , what should i do for clearing the instruction cache call in lib/System/Memory.cpp? Thanks and Regards, Prasanth J On Mon, Nov 16, 2009 at 4:12 PM, Xerxes Rånby <xerxes at zafena.se> wrote:> > Prasanth J wrote: > > Hi, > > > > As you said i downloaded arm toolchain from codesourcery(2009q3 with > > gcc 4.4.1 version).. if i use this toolchain i am getting the > > following error.. > > > > make[2]: Entering directory > > `/home/prasanth/LLVM_ARM/llvm-with-armgcc441/llvm-obj/lib/Analysis' > > llvm[2]: Compiling LoopPass.cpp for Release build > > if arm-none-linux-gnueabi-g++ > > -I/home/prasanth/LLVM_ARM/llvm-with-armgcc433/llvm/include > > -I/home/prasanth/LLVM_ARM/llvm-with-armgcc433/llvm/lib/Analysis > > -I/home/prasanth/LLVM_ARM/llvm-with-armgcc441/llvm-obj/include > > -I/home/prasanth/LLVM_ARM/llvm-with-armgcc441/llvm-obj/lib/Analysis > > -D_DEBUG -D_GNU_SOURCE -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS > > -O2 -fomit-frame-pointer -fno-exceptions -fPIC -Woverloaded-virtual > > -pedantic -Wno-long-long -Wall -W -Wno-unused-parameter > > -Wwrite-strings -c -MMD -MP -MF > > > "/home/prasanth/LLVM_ARM/llvm-with-armgcc441/llvm-obj/lib/Analysis/Release/LoopPass.d.tmp" > > -MT > > > "/home/prasanth/LLVM_ARM/llvm-with-armgcc441/llvm-obj/lib/Analysis/Release/LoopPass.o" > > -MT > > > "/home/prasanth/LLVM_ARM/llvm-with-armgcc441/llvm-obj/lib/Analysis/Release/LoopPass.d" > > > /home/prasanth/LLVM_ARM/llvm-with-armgcc433/llvm/lib/Analysis/LoopPass.cpp > > -o > > > /home/prasanth/LLVM_ARM/llvm-with-armgcc441/llvm-obj/lib/Analysis/Release/LoopPass.o > > ; \ > > then /bin/mv -f > > > "/home/prasanth/LLVM_ARM/llvm-with-armgcc441/llvm-obj/lib/Analysis/Release/LoopPass.d.tmp" > > > "/home/prasanth/LLVM_ARM/llvm-with-armgcc441/llvm-obj/lib/Analysis/Release/LoopPass.d"; > > else /bin/rm > > > "/home/prasanth/LLVM_ARM/llvm-with-armgcc441/llvm-obj/lib/Analysis/Release/LoopPass.d.tmp"; > > exit 1; fi > > > /home/prasanth/LLVM_ARM/llvm-with-armgcc433/llvm/lib/Analysis/LoopPass.cpp: > > In member function 'void > > llvm::LPPassManager::deleteLoopFromQueue(llvm::Loop*)': > > > /home/prasanth/LLVM_ARM/llvm-with-armgcc433/llvm/lib/Analysis/LoopPass.cpp:100: > > internal compiler error: Segmentation fault > > Please submit a full bug report, > > with preprocessed source if appropriate. > > See <https://support.codesourcery.com/GNUToolchain/> for instructions. > > /bin/rm: cannot remove > > > `/home/prasanth/LLVM_ARM/llvm-with-armgcc441/llvm-obj/lib/Analysis/Release/LoopPass.d.tmp': > > No such file or directory > > make[2]: *** > > > [/home/prasanth/LLVM_ARM/llvm-with-armgcc441/llvm-obj/lib/Analysis/Release/LoopPass.o] > > Error 1 > > make[2]: Leaving directory > > `/home/prasanth/LLVM_ARM/llvm-with-armgcc441/llvm-obj/lib/Analysis' > > make[1]: *** [Analysis/.makeall] Error 2 > > make[1]: Leaving directory > > `/home/prasanth/LLVM_ARM/llvm-with-armgcc441/llvm-obj/lib' > > make: *** [all] Error 1 > > > > please let me know how should i resolve this error... > > > > Thanks and Regards, > > Prasanth J > > > > Make sure you are running a clean build. > If you are then follow the suggested instructions in the error message > and file a bugreport for your toolchain to codesourcery. > > > /home/prasanth/LLVM_ARM/llvm-with-armgcc433/llvm/lib/Analysis/LoopPass.cpp:100: > internal compiler error: Segmentation fault > Please submit a full bug report, > with preprocessed source if appropriate. > See <https://support.codesourcery.com/GNUToolchain/> for instructions. > > Cheers > Xerxes > >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20091116/ae7d6dc0/attachment.html>
Xerxes Rånby
2009-Nov-16 14:48 UTC
[LLVMdev] Compilation error while cross compiling LLVM for ARM - the __clear_cache issue - now the __sync_val_compare_and_swap issue - now the internal compiler error issue.
Prasanth J wrote:> Hi, > > I can able to compile LLVM using armgcc_4.3.3 (codesourcery2009q1..).. > but when i tried to run it on target it shows GCC 4.3.0 version not > found. So i copied the runtime libraries (libc.so and libgcc_s.so) > from the toolchain to the target and exported its path in > LD_LIBRARY_PATH. But when i tried to run any llvm tools on target its > crashing with Segmentation fault. What could be the problem for this.Impossible to know without debugging. whats the backtrace when running the program from inside the gnu debugger gdb? and what tools did you run. What command did you run that caused the crash? What are the output from llc -version and lli -version ?> > My target kernel and rootfs are compiled with armgcc-4.2.1... so > should i need to compile the kernel and rootfs with armgcc-4.3.3?Probably not needed.> > If i want to use arm-toolchain-4.2.1 , what should i do for clearing > the instruction cache call in lib/System/Memory.cpp?You have to implement it using inline assembler for GCC 4.2.1 and below to work. You can check the gcc sources to see how __clear_cache got implemeted in gcc 4.3.3 or check the arm reference manual (ARM ARM): http://www.arm.com/miscPDFs/14128.pdf Cheers Xerxes
Xerxes Rånby
2009-Nov-16 14:59 UTC
[LLVMdev] Compilation error while cross compiling LLVM for ARM - the __clear_cache issue - now the __sync_val_compare_and_swap issue - now the internal compiler error issue.
Prasanth J wrote:> > If i want to use arm-toolchain-4.2.1 , what should i do for clearing > the instruction cache call in lib/System/Memory.cpp? >You can also look how other projects have solved this problem in the past: http://www.complang.tuwien.ac.at/viewcvs/cgi-bin/viewcvs.cgi/gforth/arch/arm/cacheflush-linux.c?rev=1.4 Here the clear cache are implemented using inline asm and a linux systemcall to be usable with gcc 4.2.1. Cheers Xerxes
Reasonably Related Threads
- [LLVMdev] Compilation error while cross compiling LLVM for ARM - the __clear_cache issue - now the __sync_val_compare_and_swap issue - now the internal compiler error issue.
- [LLVMdev] Compilation error while cross compiling LLVM for ARM - the __clear_cache issue - now the __sync_val_compare_and_swap issue
- [LLVMdev] Compilation error while cross compiling LLVM for ARM - the __clear_cache issue - now the __sync_val_compare_and_swap issue
- [LLVMdev] Compilation error while cross compiling LLVM for ARM - the __clear_cache issue - now the __sync_val_compare_and_swap issue - now the internal compiler error issue.
- [LLVMdev] Compilation error while cross compiling LLVM for ARM - the __clear_cache issue