-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Julia crash on load(“RDatasets”) with "Invalid constantexpr cast!" linking or compilation error? #18
Comments
@staticfloat: this looks like it would be solved by a |
You should never have to do a |
I can reproduce, and can confirm that this is a Homebrew-specific problem. It looks like llvm is unhappy about something:
I don't think I have the llvm expertise to debug this; could this be a library issue? (e.g. not finding a shared library at runtime) The fact that the homebrew formula breaks whereas a straight-up compile works is suspicious. |
cc: @JeffBezanson, @vtjnash for LLVM expertise. |
Can you build / install / run the debug version? Pending Jeff already knowing exactly what this comes from, it would help to be able to see line numbers above. |
Just in case it will be useful - I cloned recent julia repo and compiled it successfully via LLVM: If you already have LLVM installed, then "brew upgrade llvm" might not work. so it seems like there is something with dependencies - sparce-suite etc. |
@AlexMikhalev, while you're waiting on this, you may want to install from source. It takes a bit of time and isn't as convenient as homebrew, but it's a pretty solid process at this point this is likely to "just work". |
Its possible one of the dependancies is corrupting the stack / other memory somewhere along the way. I would probably have to walk this in a debugger to see how generic_box is calling CreateBitCast |
@vtjnash; This is related to JuliaLang/julia#1694. Homebrew, by default, compiles LLVM with assertions enabled, which is the opposite of both Julia and MacPorts. I'm not sure if these assertions are causing the error, or if there are errors that are going uncaught in Julia, or if these are just warnings that we're fine with letting slip, but this is the cause of the problem. @AlexMikhalev; I've submitted a pull request to Homebrew-main adding a |
Note that although JuliaLang/julia#1694 is closed, this issue persists as long as llvm has been compiled without the |
But didn't they fixed that assertion in their master branch? Does this formula checkout another branch? |
This assertion is a different one, and I wanted to make sure people realized that. |
I suck. But still, I guess it's better not to wait for |
Agreed. :)
Disagreed. :) |
This happens because these two lines cause a size mismatch (in box), where enum expects to create a 64 bit integer, but can't because an 8 bit integer of the same name already exists. bitstype 8 NARule
@enum NARule KEEP FILTER REPLACE (edit: from DataFrames/src/datavec.jl) |
I just noticed that this happens when loading DataFrame as well, I think @vtjnash beat me to the punch though. |
This should be solved now, whether your llvm installation is installed with assertions or not. @AlexMikhalev, are you still experiencing this error? |
No, error is now different: julia> load("RDatasets") |
This looks to be an issue beyond Homebrew. Issue reported here. |
This has been fixed, can you confirm? You'll need to run a |
Yep homebrew issue solved. Forgot to comment after Pkg.update(). |
brew tap staticfloat/julia
brew install --HEAD julia
edited sparse-suite by copy paste from tap as tapping failed
brew edit suite-sparse
then:
brew install suite-sparse
brew install --HEAD julia
brew test -v julia
julia
_ _ ()_ | A fresh approach to technical computing
() | () () | Documentation: http://docs.julialang.org
_ _ | | __ _ | Type “help()” to list help topics
| | | | | | |/ ` | |
| | || | | | (| | | Version 0.0.0+103529310.r2458.dirty
/ |_’|||__’| | Commit 2458fa9da4 (2012-12-03 09:47:36)*
|__/ |
julia> load(“RDatasets”)
Warning: redefinition of constant NARule ignored.
Assertion failed: (CastInst::castIsValid(opc, C, Ty) && “Invalid constantexpr cast!”), function getCast, file Constants.cpp, line 1366.
Illegal instruction: 4
I was wondering if it's linking error?
what can I do to clean it?
The text was updated successfully, but these errors were encountered: