Error using --static option with macrubyc

I want to create a binary executable for a relatively simple script that would not require people to install macruby or HotCocoa. script here . I realized that I want to use the parameter --staticfor the compiler, and I use 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 to do to run this?

+3
source share
2 answers

I really found a solution. Make sure that you are using the LLVM version specified by MacRuby and that you are using the code from the main MacRuby branch. It takes some time to compile everything, but it's worth it.

, macruby GitHub, .

0

, - LLVM macruby README ( ) LLVM. , , , .

+1

Source: https://habr.com/ru/post/1744637/


All Articles