Skip to content
This repository has been archived by the owner on Mar 8, 2022. It is now read-only.

Problem compiling 0.18.7 on OS X 10.11.6 with LLVM #16

Open
tpberntsen opened this issue Jul 22, 2016 · 6 comments
Open

Problem compiling 0.18.7 on OS X 10.11.6 with LLVM #16

tpberntsen opened this issue Jul 22, 2016 · 6 comments

Comments

@tpberntsen
Copy link

tpberntsen commented Jul 22, 2016

Hi guys,

Upon updating Crystal to 0.18.7 via Homebrew, with a prerequisite installation of LLVM 3.8.1, on an OS X 10.11.6 (15G31), I got the following error:

Last 15 lines from /Users/{username}/Library/Logs/Homebrew/crystal-lang/01.make:
  inline ref wrap(const ty *P) {                        \
             ^
src/llvm/ext/llvm_ext.cc:149:21: error: unknown type name 'DIDescriptor'; did you mean 'llvm::Intrinsic::IITDescriptor'?
      Tag, unwrapDI<DIDescriptor>(Scope), Name, unwrapDI<DIFile>(File), Line,
                    ^~~~~~~~~~~~
                    llvm::Intrinsic::IITDescriptor
/usr/local/Cellar/llvm/3.8.1/include/llvm/IR/Intrinsics.h:80:10: note: 'llvm::Intrinsic::IITDescriptor' declared here
  struct IITDescriptor {
         ^
src/llvm/ext/llvm_ext.cc:148:21: error: no member named 'createLocalVariable' in 'llvm::DIBuilder'
  DIVariable V = D->createLocalVariable(
                 ~  ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
make: *** [src/llvm/ext/llvm_ext.o] Error 1

READ THIS: https://git.io/brew-troubleshooting
If reporting this issue please do so at (not Homebrew/brew):
  https://github.com/manastech/homebrew-crystal/issues

Error: Validation Failed

Thanks for looking into it.

Best,
Thomas

@asterite
Copy link
Member

Please provide the output of:

command -v llvm-config-3.8 || command -v llvm-config38 || (command -v llvm-config > /dev/null && (case "$(llvm-config --version)" in 3.8*) command -v llvm-config;; *) false;; esac)) || command -v llvm-config-3.6 || command -v llvm-config36 || command -v llvm-config-3.5 || command -v llvm-config35 || command -v llvm-config

And then run --version on the output of the above command.

@ghost
Copy link

ghost commented Jul 24, 2016

I have the same issue.
Running on macOS 10.12 (16A254g) & Xcode 8 Beta3

$ brew install crystal-lang
Warning: You are using OS X 10.12.
We do not provide support for this pre-release version.
You may encounter build failures or other breakages.
Please create pull-requests instead of filing issues.
==> Downloading https://github.com/crystal-lang/crystal/archive/0.18.7.tar.gz
==> Downloading from https://codeload.github.com/crystal-lang/crystal/tar.gz/0.18.7
######################################################################## 100.0%
==> Downloading https://github.com/crystal-lang/crystal/releases/download/0.18.6/crystal-0.18.6-1-darwin-x86_64.tar.gz
Already downloaded: /Users/fibric/Library/Caches/Homebrew/crystal-lang--boot-0.18.6.tar.gz
==> make crystal release=true
Last 15 lines from /Users/fibric/Library/Logs/Homebrew/crystal-lang/01.make:
  inline ref wrap(const ty *P) {                        \
             ^
src/llvm/ext/llvm_ext.cc:149:21: error: unknown type name 'DIDescriptor'; did you mean 'llvm::Intrinsic::IITDescriptor'?
      Tag, unwrapDI<DIDescriptor>(Scope), Name, unwrapDI<DIFile>(File), Line,
                    ^~~~~~~~~~~~
                    llvm::Intrinsic::IITDescriptor
/usr/local/Cellar/llvm/3.8.1/include/llvm/IR/Intrinsics.h:80:10: note: 'llvm::Intrinsic::IITDescriptor' declared here
  struct IITDescriptor {
         ^
src/llvm/ext/llvm_ext.cc:148:21: error: no member named 'createLocalVariable' in 'llvm::DIBuilder'
  DIVariable V = D->createLocalVariable(
                 ~  ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
make: *** [src/llvm/ext/llvm_ext.o] Error 1

READ THIS: https://git.io/brew-troubleshooting
If reporting this issue please do so at (not Homebrew/brew):
  https://github.com/Homebrew/homebrew-core/issues

Warning: You are using OS X 10.12.
We do not provide support for this pre-release version.
You may encounter build failures or other breakages.
Please create pull-requests instead of filing issues.
$ command -v llvm-config-3.8 || command -v llvm-config38 || (command -v llvm-config > /dev/null && (case "$(llvm-config --version)" in 3.8*) command -v llvm-config;; *) false;; esac)) || command -v llvm-config-3.6 || command -v llvm-config36 || command -v llvm-config-3.5 || command -v llvm-config35 || command -v llvm-config

/usr/local/bin/llvm-config
$ llvm-config --version
3.8.1
$ /usr/local/bin/llvm-config --version
3.8.1
$ brew ls
antigen     cmake       gdbm        git     git-flow    libatomic_ops   libffi      libyaml     makedepend  nvm     pcre        s-lang      thefuck     zsh
bdw-gc      curl        gettext     git-extras  go      libevent    libpng      llvm        most        openssl     pkg-config  sphinx-doc  xz      zsh-completions

The error is the same regardless of brew link llvm --force or brew unlink llvm

$ brew doctor
Please note that these warnings are just used to help the Homebrew maintainers
with debugging if you file an issue. If everything you use Homebrew for is
working fine: please don't worry and just ignore them. Thanks!

Warning: You are using OS X 10.12.
We do not provide support for this pre-release version.
You may encounter build failures or other breakages.
Please create pull-requests instead of filing issues.

Warning: Some keg-only formula are linked into the Cellar.
Linking a keg-only formula, such as gettext, into the cellar with
`brew link <formula>` will cause other formulae to detect them during
the `./configure` step. This may cause problems when compiling those
other formulae.

Binaries provided by keg-only formulae may override system binaries
with other strange results.

You may wish to `brew unlink` these brews:
    llvm

@ghost
Copy link

ghost commented Jul 24, 2016

But the error changes when I install the HEAD version.

$ brew install crystal-lang --HEAD
Warning: You are using OS X 10.12.
We do not provide support for this pre-release version.
You may encounter build failures or other breakages.
Please create pull-requests instead of filing issues.
==> Cloning https://github.com/crystal-lang/crystal.git
Updating /Users/fibric/Library/Caches/Homebrew/crystal-lang--git
==> Checking out branch master
==> Downloading https://github.com/crystal-lang/crystal/releases/download/0.18.6/crystal-0.18.6-1-darwin-x86_64.tar.gz
Already downloaded: /Users/fibric/Library/Caches/Homebrew/crystal-lang--boot-0.18.6.tar.gz
==> make crystal release=true
Last 15 lines from /Users/fibric/Library/Logs/Homebrew/crystal-lang/01.make:
and by not initializing it here it's not clear if the variable is supposed
to be nilable or if this is a mistake.

To fix this error, either assign nil to it here:

  @stack_top = nil

Or declare it as nilable outside at the type level:

  @stack_top : (Pointer(Void))?

  def initialize(@name : String? = nil, &@proc : ->)
      ^~~~~~~~~~

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

READ THIS: https://git.io/brew-troubleshooting
If reporting this issue please do so at (not Homebrew/brew):
  https://github.com/Homebrew/homebrew-core/issues

Warning: You are using OS X 10.12.
We do not provide support for this pre-release version.
You may encounter build failures or other breakages.
Please create pull-requests instead of filing issues.

@philnash
Copy link

I'm getting these errors too. Same OS X version, llvm 3.8.1. Fails when upgrading to Crystal 0.18.7. Any ideas what's going on? Thanks!

@ghost
Copy link

ghost commented Sep 13, 2016

To me it's solved.

$ brew install crystal-lang
installing pkg-config ✔, libevent ✔, bdw-gc ✔, llvm ✔, pcre ✔, libyaml ✔
...
$ crystal -v
Crystal 0.19.1 (2016-09-10)

I'm on macOS 10.12 (16A319) (GM)

$ brew -v
Homebrew 0.9.9 (git revision b505e; last commit 2016-09-13)
Homebrew/homebrew-core (git revision b9d8; last commit 2016-09-13)
$ brew doctor
Please note that these warnings are just used to help the Homebrew maintainers
with debugging if you file an issue. If everything you use Homebrew for is
working fine: please don't worry and just ignore them. Thanks!

Warning: You are using OS X 10.12.
We do not provide support for this pre-release version.
You may encounter build failures or other breakages.
Please create pull-requests instead of filing issues.

@philnash
Copy link

I uninstalled crystal and then reinstalled and it worked and I got version 0.19.1.

The upgrade to 0.18.7 still wasn't working though.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants