You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am running into an issue where running stack ghci after building will cause a segfault. I am running on Mac OSX (High Sierra if it makes a difference...). Here is what I did:
installed llvm-4.0 via Homebrew, which created an installation in homebrew's directory, and every llvm executable has a "-4.0" suffix. Because of this, I have resolved the dependency on llvm-config by symlinking llvm-config to llvm-config-4.0 and adding the project root directory to my path.
stack build succeeds on all the chapters, but when trying to run stack ghci gets me the following error:
bash-3.2$ stack ghci
Configuring GHCi with the following packages: kaleidoscope
* * * * * * * *
Error: Multiple files use the same module name:
* Codegen found at the following paths
* /Users/gautam/research/llvm/kaleidoscope/src/chapter3/Codegen.hs (kaleidosco
pe:exe:chapter3)
* /Users/gautam/research/llvm/kaleidoscope/src/chapter4/Codegen.hs (kaleidosco
pe:exe:chapter4)
* /Users/gautam/research/llvm/kaleidoscope/src/chapter5/Codegen.hs (kaleidosco
pe:exe:chapter5)
* /Users/gautam/research/llvm/kaleidoscope/src/chapter6/Codegen.hs (kaleidosco
pe:exe:chapter6)
* /Users/gautam/research/llvm/kaleidoscope/src/chapter7/Codegen.hs (kaleidosco
pe:exe:chapter7)
(Repeated for Emit, Jit, Lexer, Parser, etc for all the chapters)
To mitigate this issue, I commented out all chapters in the kaleidoscope.cabal file except for chapter 3, and tried again using stack clean --full and stack build. Running this command from the kaleidoscope root (so that my llvm-config symlink can be seen), I get a bunch of linking errors (attached in the error.log) file. error.log
Note that stack exec works fine, just like what was specified in the example. However, intero relies on ghci and I'd love to figure out how to get all of its benefits on files using llvm-hs.
Not sure if this is the right place to post this issue. Thanks in advance for any help.
The text was updated successfully, but these errors were encountered:
Hi there,
I am running into an issue where running
stack ghci
after building will cause a segfault. I am running on Mac OSX (High Sierra if it makes a difference...). Here is what I did:installed llvm-4.0 via Homebrew, which created an installation in homebrew's directory, and every llvm executable has a "-4.0" suffix. Because of this, I have resolved the dependency on
llvm-config
by symlinkingllvm-config
tollvm-config-4.0
and adding the project root directory to my path.stack build
succeeds on all the chapters, but when trying to runstack ghci
gets me the following error:To mitigate this issue, I commented out all chapters in the
kaleidoscope.cabal
file except for chapter 3, and tried again usingstack clean --full
andstack build
. Running this command from the kaleidoscope root (so that myllvm-config
symlink can be seen), I get a bunch of linking errors (attached in the error.log) file. error.logNote that
stack exec
works fine, just like what was specified in the example. However, intero relies on ghci and I'd love to figure out how to get all of its benefits on files using llvm-hs.Not sure if this is the right place to post this issue. Thanks in advance for any help.
The text was updated successfully, but these errors were encountered: