crystal from sources woe

c++ -c  -o src/llvm/ext/llvm_ext.o src/llvm/ext/llvm_ext.cc -I/usr/local/Cellar/llvm/5.0.1/include  -stdlib=libc++ -fPIC -fvisibility-inlines-hidden -Werror=date-time -std=c++11 -Wall -W -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wcovered-switch-default -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wstring-conversion -DNDEBUG   -DLLVM_BUILD_GLOBAL_ISEL -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS

cc -fPIC    -c -o src/ext/sigfault.o src/ext/sigfault.c

ar -rcs src/ext/libcrystal.a src/ext/sigfault.o

CRYSTAL_CONFIG_PATH=”/Users/packrd/dev/random/crystal/src” ./bin/crystal build  -o .build/crystal src/compiler/crystal.cr -D without_openssl -D without_zlib

Error in src/compiler/crystal.cr:1: while requiring “prelude”

# This is the file that is compiled to generate the

^

in src/prelude.cr:28: while requiring “string”

require “string”

^

Syntax error in src/string.cr:3942: invalid char escape sequence

      when ‘\a’ then io << “\\a”

           ^

make: *** [.build/crystal] Error 1

RogerPackMBP:crystal packrd$ crystal -v

Crystal 0.24.2 (2018-03-10)

 

meant”you need newer version of crystal to build that from source one”

One thought on “crystal from sources woe”

  1. llvm`.
    RogerPackMBP:crystal packrd$ make
    Using /usr/local/bin/llvm-config [version=6.0.1]
    CRYSTAL_CONFIG_PATH=”/Users/packrd/dev/random/crystal/src” ./bin/crystal build -o .build/crystal src/compiler/crystal.cr -D without_openssl -D without_zlib
    Undefined symbols for architecture x86_64:
    “llvm::DIBuilder::createCompileUnit(unsigned int, llvm::DIFile*, llvm::StringRef, bool, llvm::StringRef, unsigned int, llvm::StringRef, llvm::DICompileUnit::DebugEmissionKind, unsigned long long, bool, bool)”, referenced from:
    _LLVMDIBuilderCreateCompileUnit2 in llvm_ext.o
    (maybe you meant: __ZN4llvm9DIBuilder17createCompileUnitEjPNS_6DIFileENS_9StringRefEbS3_jS3_NS_13DICompileUnit17DebugEmissionKindEybbb)
    ld: symbol(s) not found for architecture x86_64
    clang: error: linker command failed with exit code 1 (use -v to see invocation)
    Error: execution of command failed with code: 1: `cc “${@}” -o ‘/Users/packrd/dev/random/crystal/.build/crystal’ -rdynamic /Users/packrd/dev/random/crystal/src/llvm/ext/llvm_ext.o `/usr/local/bin/llvm-config –libs –system-libs –ldflags 2> /dev/null` -lstdc++ -lpcre -lgc -lpthread /Users/packrd/dev/random/crystal/src/ext/libcrystal.a -levent -liconv -ldl -L/usr/lib -L/usr/local/lib`
    make: *** [.build/crystal] Error 1
    RogerPackMBP:crystal packrd$ make clean
    Using /usr/local/bin/llvm-config [version=6.0.1]
    rm -rf .build

    meant “use llvm 6 instead of 5” (I think)

Leave a Reply

Your email address will not be published. Required fields are marked *

Time limit is exhausted. Please reload the CAPTCHA.