I've tried to build ellcc on Ubuntu 12.04 and it fails in llvm linking part. I'm not sure if I'm missing some pre-requisites, but here's the log: llvm[3]: Linking Release+Asserts executable llc (without symbols) /home/jaufranc/edev/playground/ellcc/llvm-build/Release+Asserts/lib/libLLVMX86CodeGen.a(X86TargetMachine.o): In function `(anonymous namespace)::X86PassConfig::addPostRegAlloc()': X86TargetMachine.cpp:(.text+0x140): undefined reference to `llvm::createX86FloatingPointStackifierPass()' /home/jaufranc/edev/playground/ellcc/llvm-build/Release+Asserts/lib/libLLVMX86CodeGen.a(X86TargetMachine.o): In function `(anonymous namespace)::X86PassConfig::addInstSelector()': X86TargetMachine.cpp:(.text+0x2aa): undefined reference to `llvm::createX86ISelDag(llvm::X86TargetMachine&, llvm::CodeGenOpt::Level)' /home/jaufranc/edev/playground/ellcc/llvm-build/Release+Asserts/lib/libLLVMX86CodeGen.a(X86TargetMachine.o): In function `llvm::X86TargetMachine::X86TargetMachine(llvm::Target const&, llvm::StringRef, llvm::StringRef, llvm::StringRef, llvm::TargetOptions const&, llvm::Reloc::Model, llvm::CodeModel::Model, llvm::CodeGenOpt::Level, bool)': X86TargetMachine.cpp:(.text+0x6e2): undefined reference to `vtable for llvm::X86FrameLowering' /home/jaufranc/edev/playground/ellcc/llvm-build/Release+Asserts/lib/libLLVMX86CodeGen.a(X86TargetMachine.o): In function `llvm::X86TargetMachine::~X86TargetMachine()': X86TargetMachine.cpp:(.text._ZN4llvm16X86TargetMachineD2Ev[_ZN4llvm16X86TargetMachineD5Ev]+0x39): undefined reference to `vtable for llvm::X86FrameLowering' /home/jaufranc/edev/playground/ellcc/llvm-build/Release+Asserts/lib/libLLVMX86CodeGen.a(X86TargetMachine.o): In function `llvm::X86TargetMachine::~X86TargetMachine()': X86TargetMachine.cpp:(.text._ZN4llvm16X86TargetMachineD0Ev[_ZN4llvm16X86TargetMachineD5Ev]+0x39): undefined reference to `vtable for llvm::X86FrameLowering' /home/jaufranc/edev/playground/ellcc/llvm-build/Release+Asserts/lib/libLLVMX86CodeGen.a(X86TargetMachine.o): In function `llvm::X86_32TargetMachine::~X86_32TargetMachine()': X86TargetMachine.cpp:(.text._ZN4llvm19X86_32TargetMachineD2Ev[_ZN4llvm19X86_32TargetMachineD5Ev]+0x24f): undefined reference to `vtable for llvm::X86FrameLowering' /home/jaufranc/edev/playground/ellcc/llvm-build/Release+Asserts/lib/libLLVMX86CodeGen.a(X86TargetMachine.o): In function `llvm::X86_64TargetMachine::~X86_64TargetMachine()': X86TargetMachine.cpp:(.text._ZN4llvm19X86_64TargetMachineD2Ev[_ZN4llvm19X86_64TargetMachineD5Ev]+0x24f): undefined reference to `vtable for llvm::X86FrameLowering' /home/jaufranc/edev/playground/ellcc/llvm-build/Release+Asserts/lib/libLLVMX86CodeGen.a(X86TargetMachine.o):X86TargetMachine.cpp:(.text._ZN4llvm19X86_64TargetMachineD0Ev[_ZN4llvm19X86_64TargetMachineD5Ev]+0x24f): more undefined references to `vtable for llvm::X86FrameLowering' follow /home/jaufranc/edev/playground/ellcc/llvm-build/Release+Asserts/lib/libLLVMX86CodeGen.a(X86ISelLowering.o): In function `llvm::X86TargetLowering::createFastISel(llvm::FunctionLoweringInfo&) const': X86ISelLowering.cpp:(.text+0x937): undefined reference to `llvm::X86::createFastISel(llvm::FunctionLoweringInfo&)' collect2: ld returned 1 exit status make[3]: *** [/home/jaufranc/edev/playground/ellcc/llvm-build/Release+Asserts/bin/llc] Error 1 make[3]: Leaving directory `/home/jaufranc/edev/playground/ellcc/llvm-build/tools/llc' make[2]: *** [llc/.makeall] Error 2 make[2]: Leaving directory `/home/jaufranc/edev/playground/ellcc/llvm-build/tools' make[1]: *** [all] Error 1 make[1]: Leaving directory `/home/jaufranc/edev/playground/ellcc/llvm-build' make: *** [all] Error 1
Sorry invalid bug. I had a power failure during the first build, and just carried on with make, if I do make clean then make, the build seems to have successfully built llvm (the rest is still in progress).
(In reply to comment #1) > Sorry invalid bug. I had a power failure during the first build, and just > carried on with make, if I do make clean then make, the build seems to have > successfully built llvm (the rest is still in progress). I could go further, but the build failed with: cp: cannot stat `../lib/clang//include/*': No such file or directory I have no bin or lib directory at that point of the build, so I copied the binary and library binaries as follows: cp ./llvm-build/Release+Asserts/* . -rf But then the build fails: /home/jaufranc/edev/playground/ellcc/libecc/../bin/ecc -std=c99 -nostdinc -ffreestanding -fexcess-precision=standard -frounding-math -D_XOPEN_SOURCE=700 -I./src/internal -I./include -I./arch/arm -g -pipe -falign-functions=1 -falign-labels=1 -falign-loops=1 -falign-jumps=1 -Wall -Wpointer-arith -Wcast-align -Wno-parentheses -Wno-uninitialized -Wno-missing-braces -Wno-unused-value -Wno-unknown-pragmas -target arm-ellcc-linux-eabi -mcpu=cortex-a9 -mfpu=neon -MP -MD -g -Werror -Qunused-arguments -Wno-unneeded-internal-declaration -Wno-cast-align -Wno-incompatible-pointer-types -Wno-string-plus-int -Wno-pointer-sign -Wno-array-bounds -Wno-dangling-else -c -o crt/crt1.o crt/arm/crt1.s ecc: error: unable to execute command: No such file or directory ecc: error: assembler command failed due to signal (use -v to see invocation) clang version 3.2 (http://ellcc.org/svn/ellcc/trunk/llvm/tools/clang 3039) Target: arm-ellcc-linux-eabi Thread model: posix ecc: note: diagnostic msg: PLEASE submit a bug report to http://llvm.org/bugs/ and include the crash backtrace, preprocessed source, and associated run script. ecc: note: diagnostic msg: Error generating preprocessed source(s) - no preprocessable inputs. make[2]: *** [crt/crt1.o] Error 255 make[2]: Leaving directory `/home/jaufranc/edev/playground/ellcc/libecc/src/musl' make[1]: *** [arm] Error 1 make[1]: Leaving directory `/home/jaufranc/edev/playground/ellcc/libecc' make: *** [all] Error 1 Using -v shows it's because it can't find arm-elf-as.
I changed some of the library make rules yesterday. It was trying to do a library build without having installed the binaries which worked for me, of course because I had installed binaries already. The latest build rules should work OK. Tell me if you have any issues.
The build completes, but sudo make install does not seem to install ecc, so I have to use the binary in ./bin/ecc (build directory) instead.
Right now the build scripts always put the executables in bin. This will have to be fixed for a real install. The good news is that you don't have to use sudo to install. The bad news is that the install directory isn't something like /usr/local/bin and you have to add the bin directory to your path.
These bugs are obsolete with the new build and deployment process.