views:

67

answers:

3

I want to create a binary executable for a relatively simple script that would not require people to install macruby or HotCocoa. The script is here. I've understood that I want to use the --static option for the compiler and I'm using the following command:

macrubyc -o postprocessor --static postprocessor.rb

I get the following error:

ld: library not found for -lLLVMBitWriter
collect2: ld returned 1 exit status
Error when executing `/usr/bin/g++ -o "postprocessor" -arch x86_64 -L/Library/Frameworks/MacRuby.framework/Versions/0.6/usr/lib -lmacruby-static -L/usr/local/lib  -lpthread -lffi -lm -lLLVMBitWriter -lLLVMX86CodeGen -lLLVMX86Info -lLLVMSelectionDAG -lLLVMAsmPrinter -lLLVMJIT -lLLVMExecutionEngine -lLLVMCodeGen -lLLVMScalarOpts -lLLVMTransformUtils -lLLVMipa -lLLVMAnalysis -lLLVMTarget -lLLVMMC -lLLVMCore -lLLVMSupport -lLLVMSystem -lpthread -ldl -lxml2 -lobjc -lauto -licucore -framework Foundation  "/var/folders/wU/wUGgoG1JGeKBgwalWLPMAU+++TI/-Tmp-/main-72203.o" "./postprocessor.o"'

What should I do to get this running?

+1  A: 

Looks like you are missing something from LLVM and macruby's README suggests (under Requirements) to install a certain revision of LLVM. So please check wether you have installed it.

Thomas R. Koll
A: 

Did you find a solution for this?

A: 

I actually did just find a solution. Ensure that you're running the version of LLVM specified by MacRuby, and that you're using code from the master branch of MacRuby. It'll take a while to compile everything, but it's worth it.

In short, if you follow the instructions at macruby on GitHub, you'll be good to go.

arbales