我正在更新我的項目llvm-fs的工具,所以我安裝了新版本的mono並嘗試編譯它。無論是使用mono 3.10.0
與下OS X fsharpc 3.1
或mono 3.2.8
用ubuntu下fsharpc 3.0
編譯失敗,堆棧溢出:在單聲道下運行的F#編譯器中的堆棧溢出
git clone [email protected]:fsprojects/llvm-fs.git
cd llvm-fs/
FSC=fsharpc ./build.bash
:
Unhandled Exception:
System.StackOverflowException: The requested operation caused a stack overflow.
at (wrapper managed-to-native) object:__icall_wrapper_mono_object_isinst (object,intptr)
at (wrapper castclass) object:__castclass_with_cache (object,intptr,intptr)
at Microsoft.FSharp.Compiler.Driver+DelayedDisposables.System-IDisposable-Dispose() [0x00000] in <filename unknown>:0
at Microsoft.FSharp.Compiler.Driver.typecheckAndCompile (System.String[] argv, Boolean bannerAlreadyPrinted, Exiter exiter, Microsoft.FSharp.Compiler.ErrorLoggerProvider errorLoggerProvider) [0x00000] in <filename unknown>:0
at Microsoft.FSharp.Compiler.Driver.mainCompile (System.String[] argv, Boolean bannerAlreadyPrinted, Exiter exiter) [0x00000] in <filename unknown>:0
at Microsoft.FSharp.Compiler.CommandLineMain.runMain (System.String[] argv) [0x00000] in <filename unknown>:0
at Microsoft.FSharp.Compiler.CommandLineMain.main (System.String[] argv) [0x00000] in <filename unknown>:0
[ERROR] FATAL UNHANDLED EXCEPTION: System.StackOverflowException: The requested operation caused a stack overflow.
at (wrapper managed-to-native) object:__icall_wrapper_mono_object_isinst (object,intptr)
at (wrapper castclass) object:__castclass_with_cache (object,intptr,intptr)
at Microsoft.FSharp.Compiler.Driver+DelayedDisposables.System-IDisposable-Dispose() [0x00000] in <filename unknown>:0
at Microsoft.FSharp.Compiler.Driver.typecheckAndCompile (System.String[] argv, Boolean bannerAlreadyPrinted, Exiter exiter, Microsoft.FSharp.Compiler.ErrorLoggerProvider errorLoggerProvider) [0x00000] in <filename unknown>:0
at Microsoft.FSharp.Compiler.Driver.mainCompile (System.String[] argv, Boolean bannerAlreadyPrinted, Exiter exiter) [0x00000] in <filename unknown>:0
at Microsoft.FSharp.Compiler.CommandLineMain.runMain (System.String[] argv) [0x00000] in <filename unknown>:0
at Microsoft.FSharp.Compiler.CommandLineMain.main (System.String[] argv) [0x00000] in <filename unknown>:0
您可以通過以下步驟重現Linux或OS X此錯誤
在windows下fsc 12.0.30815.0
編譯完成沒有任何錯誤:
fsc --nologo --debug --sig:LLVMFSharp.fsi --target:library --out:LLVMFSharp.dll src/LLVM/FFIUtil.fs src/LLVM/Generated.fs src/LLVM/Core.fs src/LLVM/BitReader.fs src/LLVM/ExecutionEngine.fs src/LLVM/Extra.fs src/LLVM/Target.fs src/LLVM/Quote.fs
這是一個已知的問題,有什麼辦法可以解決它嗎?我試過將不同的選項傳遞給mono運行時,並且沒有導致編譯器正常退出。我記得在過去,單聲道在遵守尾聲指示方面遇到了一些問題,但我認爲這些問題已經基本解決了。謝謝!
我忘了說這個編譯和F#2.0編譯器附帶的舊單聲道一起工作正常(但我不確定它的確切版本)。 – Keith 2014-11-21 03:54:59
這看起來像編譯器中的迴歸。我會將其報告爲一個錯誤。 – 2014-11-21 04:34:29
萬一有人在這裏跟着這個是bug報告https://bugzilla.xamarin.com/show_bug.cgi?id=24752 – Keith 2014-11-23 01:30:15