fsprojects / zarchive-fsharpbinding

Archive of F# Language Bindings for Open Editors
Other
307 stars 106 forks source link

Cann't compile fshaprbinding. #24

Closed o01eg closed 12 years ago

o01eg commented 13 years ago

I use next patch to use .NET 4.0 and to fix error with Mono.Unix:

--- configure.sh    2011-07-23 11:32:58.000000000 +0400
+++ configure.sh    2011-07-23 11:36:06.226984026 +0400
@@ -23,7 +23,5 @@
 echo ""
 echo "Press enter to continue..."

-read a
-
 # ------------------------------------------------------------------------------
 # Parse command line arguments and specify default values
@@ -83,12 +81,12 @@
 MDDIR=$RESULT
 echo "Successfully found MonoDevelop root directory." $MDDIR

-PATHS=( /usr/lib/fsharp /usr/local/lib/fsharp /opt/mono/lib/mono/2.0 )
+PATHS=( /usr/lib/mono/4.0 /usr/lib/fsharp )
 searchpaths "F#" FSharp.Core.dll PATHS[@]
 FSDIR=$RESULT
 echo "Successfully found F# root directory." $FSDIR

-PATHS=( /usr/lib/mono/2.0 /Library/Frameworks/Mono.framework/Versions/2.8/lib/mono/2.0 /opt/mono/lib/mono/2.0 )
+PATHS=( /usr/lib/mono/4.0 )
 searchpaths "Mono" mscorlib.dll PATHS[@]
 MONODIR=$RESULT
 echo "Successfully found Mono root directory." $MONODIR
@@ -135,3 +132,4 @@
 sed "s,INSERT_CSHARP_COMPILER,$GMCS,g" Makefile.1 > Makefile.2
 rm Makefile.1
 mv Makefile.2 Makefile
+
--- Makefile.orig   2011-07-29 19:16:55.000000000 +0400
+++ Makefile.orig   2011-07-29 19:18:10.000000000 +0400
@@ -59,5 +59,5 @@
 REFERENCES = \
    -r:$(MONOBIN)/mscorlib.dll \
-   -r:System.dll -r:System.Xml.dll \
+   -r:System.dll -r:System.Xml.dll -r:Mono.Posix.dll \
    -r:$(MDBIN)/MonoDevelop.Core.dll \
    -r:$(MDBIN)/MonoDevelop.Ide.dll \
--- src/Services/FSharpCompiler.fs  2011-07-29 19:16:55.000000000 +0400
+++ src/Services/FSharpCompiler.fs  2011-07-29 19:18:10.000000000 +0400
@@ -74,7 +74,7 @@

   /// Wrapper type for the 'FSharp.Compiler.dll' assembly - expose types we use
   type FSharpCompiler private () =      
-    static let asm = Assembly.Load("FSharp.Compiler, Version=2.0.0.0, Culture=neutral, PublicKeyToken=a19089b1c74d0809")
+    static let asm = Assembly.Load("FSharp.Compiler, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")
     static member InteractiveChecker = asm.GetType("Microsoft.FSharp.Compiler.SourceCodeServices.InteractiveChecker")
     static member IsResultObsolete = asm.GetType("Microsoft.FSharp.Compiler.SourceCodeServices.IsResultObsolete")
     static member CheckOptions = asm.GetType("Microsoft.FSharp.Compiler.SourceCodeServices.CheckOptions")
@@ -84,7 +84,7 @@

   /// Wrapper type for the 'FSharp.Compiler.Server.Shared.dll' assembly - expose types we use
   type FSharpCompilerServerShared private () =      
-    static let asm = Assembly.Load("FSharp.Compiler.Server.Shared, Version=2.0.0.0, Culture=neutral, PublicKeyToken=a19089b1c74d0809")
+    static let asm = Assembly.Load("FSharp.Compiler.Server.Shared, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")
     static member InteractiveServer = asm.GetType("Microsoft.FSharp.Compiler.Server.Shared.FSharpInteractiveServer")

 // --------------------------------------------------------------------------------------

But when I compile I'm getting next errors:

Successfully found MonoDevelop root directory. /usr/lib/monodevelop
Successfully found F# root directory. /usr/lib/mono/4.0
Successfully found Mono root directory. /usr/lib/mono/4.0
Successfully found Gtk# root directory. /usr/lib/mono/gtk-sharp-2.0
Successfully found Glib# root directory. /usr/lib/mono/gtk-sharp-2.0
Successfully found Atk# root directory. /usr/lib/mono/gtk-sharp-2.0
Successfully found Gdk# root directory. /usr/lib/mono/gtk-sharp-2.0
Successfully found Pango root directory. /usr/lib/mono/gtk-sharp-2.0
>>> Source configured.
>>> Compiling source in /tmp/portage/dev-dotnet/fsharpbinding-9999/work/fsharpbinding-9999 ...
make -j5 
mkdir -p bin
gmcs -debug+ -out:bin/FSharpBinding.Gui.dll -target:library -r:/usr/lib/mono/4.0/mscorlib.dll -r:System.dll -r:System.Xml.dll -r:Mono.Posix.dll -r:/usr/lib/monodevelop/bin/MonoDevelop.Core.dll -r:/usr/lib/monodevelop/bin/MonoDevelop.Ide.dll -r:/usr/lib/monodevelop/bin/Mono.TextEditor.dll -r:/usr/lib/mono/4.0/FSharp.Core.dll -r:/usr/lib/mono/4.0/FSharp.Compiler.dll -r:/usr/lib/mono/4.0/FSharp.Compiler.Interactive.Settings.dll -r:/usr/lib/mono/4.0/FSharp.Compiler.Server.Shared.dll -r:/usr/lib/mono/gtk-sharp-2.0/atk-sharp.dll -r:/usr/lib/mono/gtk-sharp-2.0/pango-sharp.dll -r:/usr/lib/mono/gtk-sharp-2.0/gtk-sharp.dll -r:/usr/lib/mono/gtk-sharp-2.0/gdk-sharp.dll -r:/usr/lib/mono/gtk-sharp-2.0/glib-sharp.dll src/Gui/FSharpBuildOrderWidget.cs src/Gui/FSharpSettingsWidget.cs src/Gui/FSharpCompilerOptionsWidget.cs src/Gui/gtk-gui/FSharp.MonoDevelop.Gui.FSharpBuildOrderWidget.cs src/Gui/gtk-gui/FSharp.MonoDevelop.Gui.FSharpSettingsWidget.cs src/Gui/gtk-gui/FSharp.MonoDevelop.Gui.FSharpCompilerOptionsWidget.cs src/Gui/gtk-gui/generated.cs 
fsharpc --noframework --debug --optimize- --target:library -r:bin/FSharpBinding.Gui.dll --out:bin/FSharpBinding.dll -r:/usr/lib/mono/4.0/mscorlib.dll -r:System.dll -r:System.Xml.dll -r:Mono.Posix.dll -r:/usr/lib/monodevelop/bin/MonoDevelop.Core.dll -r:/usr/lib/monodevelop/bin/MonoDevelop.Ide.dll -r:/usr/lib/monodevelop/bin/Mono.TextEditor.dll -r:/usr/lib/mono/4.0/FSharp.Core.dll -r:/usr/lib/mono/4.0/FSharp.Compiler.dll -r:/usr/lib/mono/4.0/FSharp.Compiler.Interactive.Settings.dll -r:/usr/lib/mono/4.0/FSharp.Compiler.Server.Shared.dll -r:/usr/lib/mono/gtk-sharp-2.0/atk-sharp.dll -r:/usr/lib/mono/gtk-sharp-2.0/pango-sharp.dll -r:/usr/lib/mono/gtk-sharp-2.0/gtk-sharp.dll -r:/usr/lib/mono/gtk-sharp-2.0/gdk-sharp.dll -r:/usr/lib/mono/gtk-sharp-2.0/glib-sharp.dll --resource:src/Resources/FSharpBinding.addin.xml --resource:src/Resources/EmptyFSharpSource.xft.xml --resource:src/Resources/EmptyFSharpScript.xft.xml --resource:src/Resources/FSharpConsoleProject.xpt.xml --resource:src/Resources/fsharp-icon-32.png --resource:src/Resources/fsharp-script-32.png --resource:src/Resources/fsharp-file-icon.png --resource:src/Resources/fsharp-project-icon.png --resource:src/Resources/fsharp-script-icon.png --resource:src/Resources/FSharpSyntaxMode.xml src/PowerPack/CodeDomVisitor.fs src/PowerPack/CodeDomGenerator.fs src/PowerPack/CodeProvider.fs src/PowerPack/LazyList.fsi src/PowerPack/LazyList.fs src/Services/Mailbox.fs src/Services/Parameters.fs src/Services/FSharpCompiler.fs src/Services/CompilerLocationUtils.fs src/Services/Common.fs src/Services/Parser.fs src/Services/LanguageService.fs src/Services/CompilerService.fs src/Services/InteractiveSession.fs src/FSharpInteractivePad.fs src/FSharpOptionsPanels.fs src/FSharpSyntaxMode.fs src/FSharpResourceIdBuilder.fs src/FSharpLanguageBinding.fs src/FSharpParser.fs src/FSharpTextEditorCompletion.fs src/FSharpResolverProvider.fs 
Microsoft (R) F# 2.0 Compiler build (private)
Copyright (c) 2002-2010 Microsoft Corporation. All Rights Reserved.

/tmp/portage/dev-dotnet/fsharpbinding-9999/work/fsharpbinding-9999/src/PowerPack/CodeDomGenerator.fs(248,44): warning FS0044: This construct is deprecated

/tmp/portage/dev-dotnet/fsharpbinding-9999/work/fsharpbinding-9999/src/Services/Parameters.fs(45,14): error FS0855: No abstract or interface member was found that corresponds to this override

/tmp/portage/dev-dotnet/fsharpbinding-9999/work/fsharpbinding-9999/src/Services/Parameters.fs(51,14): error FS0855: No abstract or interface member was found that corresponds to this override

/tmp/portage/dev-dotnet/fsharpbinding-9999/work/fsharpbinding-9999/src/Services/Common.fs(11,11): error FS0039: The namespace 'Addins' is not defined

/tmp/portage/dev-dotnet/fsharpbinding-9999/work/fsharpbinding-9999/src/Services/Common.fs(381,39): error FS0039: The namespace or module 'AddinManager' is not defined

/tmp/portage/dev-dotnet/fsharpbinding-9999/work/fsharpbinding-9999/src/Services/Common.fs(383,9): error FS0039: The namespace or module 'AddinManager' is not defined

/tmp/portage/dev-dotnet/fsharpbinding-9999/work/fsharpbinding-9999/src/Services/Common.fs(397,39): error FS0039: The namespace or module 'AddinManager' is not defined

/tmp/portage/dev-dotnet/fsharpbinding-9999/work/fsharpbinding-9999/src/Services/Common.fs(399,9): error FS0039: The namespace or module 'AddinManager' is not defined

/tmp/portage/dev-dotnet/fsharpbinding-9999/work/fsharpbinding-9999/src/FSharpSyntaxMode.fs(10,21): error FS1108: The type 'Context' is required here and is unavailable. You must add a reference to assembly 'Mono.Cairo, Version=4.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756'.
make: *** [all] Error 1
emake failed

I use Gentoo amd64, mono-2.10.5, monodevelop-2.6 and last fsharp from master branch.

o01eg commented 13 years ago

I fix my patch to add forgotten dependencies but errors about override stay unfixed:

--- configure.sh    2011-07-23 11:32:58.000000000 +0400
+++ configure.sh    2011-07-23 11:36:06.226984026 +0400
@@ -23,7 +23,5 @@
 echo ""
 echo "Press enter to continue..."

-read a
-
 # ------------------------------------------------------------------------------
 # Parse command line arguments and specify default values
@@ -83,12 +81,17 @@
 MDDIR=$RESULT
 echo "Successfully found MonoDevelop root directory." $MDDIR

-PATHS=( /usr/lib/fsharp /usr/local/lib/fsharp /opt/mono/lib/mono/2.0 )
+PATHS=( /usr/lib/mono/4.0 /usr/lib/fsharp )
 searchpaths "F#" FSharp.Core.dll PATHS[@]
 FSDIR=$RESULT
 echo "Successfully found F# root directory." $FSDIR
+
+PATHS=( /usr/lib/mono/mono-addins )
+searchpaths "Mono.Addins" Mono.Addins.dll PATHS[@]
+MADIR=$RESULT
+echo "Successfully found Mono.Addins root directory." $MADIR

-PATHS=( /usr/lib/mono/2.0 /Library/Frameworks/Mono.framework/Versions/2.8/lib/mono/2.0 /opt/mono/lib/mono/2.0 )
+PATHS=( /usr/lib/mono/4.0 )
 searchpaths "Mono" mscorlib.dll PATHS[@]
 MONODIR=$RESULT
 echo "Successfully found Mono root directory." $MONODIR
@@ -135,3 +137,5 @@
 sed "s,INSERT_CSHARP_COMPILER,$GMCS,g" Makefile.1 > Makefile.2
+sed "s,INSERT_MA_ROOT,$MADIR,g" Makefile.2 > Makefile.1
+rm Makefile.2
+mv Makefile.1 Makefile
-rm Makefile.1
-mv Makefile.2 Makefile
+
--- Makefile.orig   2011-07-29 19:16:55.000000000 +0400
+++ Makefile.orig   2011-07-29 19:18:10.000000000 +0400
@@ -7,3 +7,4 @@
 MDROOT  = INSERT_MD_ROOT
+MAROOT  = INSERT_MA_ROOT
 MONOBIN = INSERT_MONO_BIN
 FSBIN = INSERT_FSHARP_BIN
@@ -59,5 +60,5 @@
 REFERENCES = \
    -r:$(MONOBIN)/mscorlib.dll \
-   -r:System.dll -r:System.Xml.dll \
+   -r:System.dll -r:System.Xml.dll -r:Mono.Posix.dll -r:$(MAROOT)/Mono.Addins.dll -r:Mono.Cairo.dll \
    -r:$(MDBIN)/MonoDevelop.Core.dll \
    -r:$(MDBIN)/MonoDevelop.Ide.dll \
--- src/Services/FSharpCompiler.fs  2011-07-29 19:16:55.000000000 +0400
+++ src/Services/FSharpCompiler.fs  2011-07-29 19:18:10.000000000 +0400
@@ -74,7 +74,7 @@

   /// Wrapper type for the 'FSharp.Compiler.dll' assembly - expose types we use
   type FSharpCompiler private () =      
-    static let asm = Assembly.Load("FSharp.Compiler, Version=2.0.0.0, Culture=neutral, PublicKeyToken=a19089b1c74d0809")
+    static let asm = Assembly.Load("FSharp.Compiler, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")
     static member InteractiveChecker = asm.GetType("Microsoft.FSharp.Compiler.SourceCodeServices.InteractiveChecker")
     static member IsResultObsolete = asm.GetType("Microsoft.FSharp.Compiler.SourceCodeServices.IsResultObsolete")
     static member CheckOptions = asm.GetType("Microsoft.FSharp.Compiler.SourceCodeServices.CheckOptions")
@@ -84,7 +84,7 @@

   /// Wrapper type for the 'FSharp.Compiler.Server.Shared.dll' assembly - expose types we use
   type FSharpCompilerServerShared private () =      
-    static let asm = Assembly.Load("FSharp.Compiler.Server.Shared, Version=2.0.0.0, Culture=neutral, PublicKeyToken=a19089b1c74d0809")
+    static let asm = Assembly.Load("FSharp.Compiler.Server.Shared, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")
     static member InteractiveServer = asm.GetType("Microsoft.FSharp.Compiler.Server.Shared.FSharpInteractiveServer")

 // --------------------------------------------------------------------------------------
gmcs -debug+ -out:bin/FSharpBinding.Gui.dll -target:library -r:/usr/lib/mono/4.0/mscorlib.dll -r:System.dll -r:System.Xml.dll -r:Mono.Posix.dll -r:/usr/lib/mono/mono-addins/Mono.Addins.dll -r:Mono.Cairo.dll -r:/usr/lib/monodevelop/bin/MonoDevelop.Core.dll -r:/usr/lib/monodevelop/bin/MonoDevelop.Ide.dll -r:/usr/lib/monodevelop/bin/Mono.TextEditor.dll -r:/usr/lib/mono/4.0/FSharp.Core.dll -r:/usr/lib/mono/4.0/FSharp.Compiler.dll -r:/usr/lib/mono/4.0/FSharp.Compiler.Interactive.Settings.dll -r:/usr/lib/mono/4.0/FSharp.Compiler.Server.Shared.dll -r:/usr/lib/mono/gtk-sharp-2.0/atk-sharp.dll -r:/usr/lib/mono/gtk-sharp-2.0/pango-sharp.dll -r:/usr/lib/mono/gtk-sharp-2.0/gtk-sharp.dll -r:/usr/lib/mono/gtk-sharp-2.0/gdk-sharp.dll -r:/usr/lib/mono/gtk-sharp-2.0/glib-sharp.dll src/Gui/FSharpBuildOrderWidget.cs src/Gui/FSharpSettingsWidget.cs src/Gui/FSharpCompilerOptionsWidget.cs src/Gui/gtk-gui/FSharp.MonoDevelop.Gui.FSharpBuildOrderWidget.cs src/Gui/gtk-gui/FSharp.MonoDevelop.Gui.FSharpSettingsWidget.cs src/Gui/gtk-gui/FSharp.MonoDevelop.Gui.FSharpCompilerOptionsWidget.cs src/Gui/gtk-gui/generated.cs 
fsharpc --noframework --debug --optimize- --target:library -r:bin/FSharpBinding.Gui.dll --out:bin/FSharpBinding.dll -r:/usr/lib/mono/4.0/mscorlib.dll -r:System.dll -r:System.Xml.dll -r:Mono.Posix.dll -r:/usr/lib/mono/mono-addins/Mono.Addins.dll -r:Mono.Cairo.dll -r:/usr/lib/monodevelop/bin/MonoDevelop.Core.dll -r:/usr/lib/monodevelop/bin/MonoDevelop.Ide.dll -r:/usr/lib/monodevelop/bin/Mono.TextEditor.dll -r:/usr/lib/mono/4.0/FSharp.Core.dll -r:/usr/lib/mono/4.0/FSharp.Compiler.dll -r:/usr/lib/mono/4.0/FSharp.Compiler.Interactive.Settings.dll -r:/usr/lib/mono/4.0/FSharp.Compiler.Server.Shared.dll -r:/usr/lib/mono/gtk-sharp-2.0/atk-sharp.dll -r:/usr/lib/mono/gtk-sharp-2.0/pango-sharp.dll -r:/usr/lib/mono/gtk-sharp-2.0/gtk-sharp.dll -r:/usr/lib/mono/gtk-sharp-2.0/gdk-sharp.dll -r:/usr/lib/mono/gtk-sharp-2.0/glib-sharp.dll --resource:src/Resources/FSharpBinding.addin.xml --resource:src/Resources/EmptyFSharpSource.xft.xml --resource:src/Resources/EmptyFSharpScript.xft.xml --resource:src/Resources/FSharpConsoleProject.xpt.xml --resource:src/Resources/fsharp-icon-32.png --resource:src/Resources/fsharp-script-32.png --resource:src/Resources/fsharp-file-icon.png --resource:src/Resources/fsharp-project-icon.png --resource:src/Resources/fsharp-script-icon.png --resource:src/Resources/FSharpSyntaxMode.xml src/PowerPack/CodeDomVisitor.fs src/PowerPack/CodeDomGenerator.fs src/PowerPack/CodeProvider.fs src/PowerPack/LazyList.fsi src/PowerPack/LazyList.fs src/Services/Mailbox.fs src/Services/Parameters.fs src/Services/FSharpCompiler.fs src/Services/CompilerLocationUtils.fs src/Services/Common.fs src/Services/Parser.fs src/Services/LanguageService.fs src/Services/CompilerService.fs src/Services/InteractiveSession.fs src/FSharpInteractivePad.fs src/FSharpOptionsPanels.fs src/FSharpSyntaxMode.fs src/FSharpResourceIdBuilder.fs src/FSharpLanguageBinding.fs src/FSharpParser.fs src/FSharpTextEditorCompletion.fs src/FSharpResolverProvider.fs 
Microsoft (R) F# 2.0 Compiler build (private)
Copyright (c) 2002-2010 Microsoft Corporation. All Rights Reserved.

/tmp/portage/dev-dotnet/fsharpbinding-9999/work/fsharpbinding-9999/src/PowerPack/CodeDomGenerator.fs(248,44): warning FS0044: This construct is deprecated

/tmp/portage/dev-dotnet/fsharpbinding-9999/work/fsharpbinding-9999/src/Services/Parameters.fs(45,14): error FS0855: No abstract or interface member was found that corresponds to this override

/tmp/portage/dev-dotnet/fsharpbinding-9999/work/fsharpbinding-9999/src/Services/Parameters.fs(51,14): error FS0855: No abstract or interface member was found that corresponds to this override
andreionutz commented 13 years ago

hi, i had a similar problem (Mono.Unix) on OS X. i tried the patch above but got stuck a bit earlier: Successfully found MonoDevelop root directory. /Applications/MonoDevelop.app/Contents/MacOS/lib/monodevelop Successfully found F# root directory. /usr/lib/fsharp Successfully found Mono.Addins root directory. /Library/Frameworks/Mono.framework/Versions/2.10.6/lib/mono/gac/Mono.Addins/0.6.0.00738eb9f132ed756 Successfully found Mono root directory. /Library/Frameworks/Mono.framework/Versions/2.10.6/lib/mono/4.0 Successfully found Gtk# root directory. /Library/Frameworks/Mono.framework/Versions/2.10.6/lib/mono/gtk-sharp-2.0 Successfully found Glib# root directory. /Library/Frameworks/Mono.framework/Versions/2.10.6/lib/mono/gtk-sharp-2.0 Successfully found Atk# root directory. /Library/Frameworks/Mono.framework/Versions/2.10.6/lib/mono/gtk-sharp-2.0 Successfully found Gdk# root directory. /Library/Frameworks/Mono.framework/Versions/2.10.6/lib/mono/gtk-sharp-2.0 Successfully found Pango root directory. /Library/Frameworks/Mono.framework/Versions/2.10.6/lib/mono/gtk-sharp-2.0 andrei-istudors-MacBook-Pro:fsharpbinding andreii$ make mkdir -p bin gmcs -debug+ -out:bin/FSharpBinding.Gui.dll -target:library -r:/Library/Frameworks/Mono.framework/Versions/2.10.6/lib/mono/4.0/mscorlib.dll -r:System.dll -r:System.Xml.dll -r:Mono.Posix.dll -r:/Library/Frameworks/Mono.framework/Versions/2.10.6/lib/mono/gac/Mono.Addins/0.6.0.00738eb9f132ed756/Mono.Addins.dll -r:Mono.Cairo.dll -r:/Applications/MonoDevelop.app/Contents/MacOS/lib/monodevelop/bin/MonoDevelop.Core.dll -r:/Applications/MonoDevelop.app/Contents/MacOS/lib/monodevelop/bin/MonoDevelop.Ide.dll -r:/Applications/MonoDevelop.app/Contents/MacOS/lib/monodevelop/bin/Mono.TextEditor.dll -r:/usr/lib/fsharp/FSharp.Core.dll -r:/usr/lib/fsharp/FSharp.Compiler.dll -r:/usr/lib/fsharp/FSharp.Compiler.Interactive.Settings.dll -r:/usr/lib/fsharp/FSharp.Compiler.Server.Shared.dll -r:/Library/Frameworks/Mono.framework/Versions/2.10.6/lib/mono/gtk-sharp-2.0/atk-sharp.dll -r:/Library/Frameworks/Mono.framework/Versions/2.10.6/lib/mono/gtk-sharp-2.0/pango-sharp.dll -r:/Library/Frameworks/Mono.framework/Versions/2.10.6/lib/mono/gtk-sharp-2.0/gtk-sharp.dll -r:/Library/Frameworks/Mono.framework/Versions/2.10.6/lib/mono/gtk-sharp-2.0/gdk-sharp.dll -r:/Library/Frameworks/Mono.framework/Versions/2.10.6/lib/mono/gtk-sharp-2.0/glib-sharp.dll src/Gui/FSharpBuildOrderWidget.cs src/Gui/FSharpSettingsWidget.cs src/Gui/FSharpCompilerOptionsWidget.cs src/Gui/gtk-gui/FSharp.MonoDevelop.Gui.FSharpBuildOrderWidget.cs src/Gui/gtk-gui/FSharp.MonoDevelop.Gui.FSharpSettingsWidget.cs src/Gui/gtk-gui/FSharp.MonoDevelop.Gui.FSharpCompilerOptionsWidget.cs src/Gui/gtk-gui/generated.cs fsharpc --noframework --debug --optimize- --target:library -r:bin/FSharpBinding.Gui.dll --out:bin/FSharpBinding.dll -r:/Library/Frameworks/Mono.framework/Versions/2.10.6/lib/mono/4.0/mscorlib.dll -r:System.dll -r:System.Xml.dll -r:Mono.Posix.dll -r:/Library/Frameworks/Mono.framework/Versions/2.10.6/lib/mono/gac/Mono.Addins/0.6.0.0__0738eb9f132ed756/Mono.Addins.dll -r:Mono.Cairo.dll -r:/Applications/MonoDevelop.app/Contents/MacOS/lib/monodevelop/bin/MonoDevelop.Core.dll -r:/Applications/MonoDevelop.app/Contents/MacOS/lib/monodevelop/bin/MonoDevelop.Ide.dll -r:/Applications/MonoDevelop.app/Contents/MacOS/lib/monodevelop/bin/Mono.TextEditor.dll -r:/usr/lib/fsharp/FSharp.Core.dll -r:/usr/lib/fsharp/FSharp.Compiler.dll -r:/usr/lib/fsharp/FSharp.Compiler.Interactive.Settings.dll -r:/usr/lib/fsharp/FSharp.Compiler.Server.Shared.dll -r:/Library/Frameworks/Mono.framework/Versions/2.10.6/lib/mono/gtk-sharp-2.0/atk-sharp.dll -r:/Library/Frameworks/Mono.framework/Versions/2.10.6/lib/mono/gtk-sharp-2.0/pango-sharp.dll -r:/Library/Frameworks/Mono.framework/Versions/2.10.6/lib/mono/gtk-sharp-2.0/gtk-sharp.dll -r:/Library/Frameworks/Mono.framework/Versions/2.10.6/lib/mono/gtk-sharp-2.0/gdk-sharp.dll -r:/Library/Frameworks/Mono.framework/Versions/2.10.6/lib/mono/gtk-sharp-2.0/glib-sharp.dll --resource:src/Resources/FSharpBinding.addin.xml --resource:src/Resources/EmptyFSharpSource.xft.xml --resource:src/Resources/EmptyFSharpScript.xft.xml --resource:src/Resources/FSharpConsoleProject.xpt.xml --resource:src/Resources/fsharp-icon-32.png --resource:src/Resources/fsharp-script-32.png --resource:src/Resources/fsharp-file-icon.png --resource:src/Resources/fsharp-project-icon.png --resource:src/Resources/fsharp-script-icon.png --resource:src/Resources/FSharpSyntaxMode.xml src/PowerPack/CodeDomVisitor.fs src/PowerPack/CodeDomGenerator.fs src/PowerPack/CodeProvider.fs src/PowerPack/LazyList.fsi src/PowerPack/LazyList.fs src/Services/Mailbox.fs src/Services/Parameters.fs src/Services/FSharpCompiler.fs src/Services/CompilerLocationUtils.fs src/Services/Common.fs src/Services/Parser.fs src/Services/LanguageService.fs src/Services/CompilerService.fs src/Services/InteractiveSession.fs src/FSharpInteractivePad.fs src/FSharpOptionsPanels.fs src/FSharpSyntaxMode.fs src/FSharpResourceIdBuilder.fs src/FSharpLanguageBinding.fs src/FSharpParser.fs src/FSharpTextEditorCompletion.fs src/FSharpResolverProvider.fs Microsoft (R) F# 2.0 Compiler build 2.0.0.0 Copyright (c) Microsoft Corporation. All Rights Reserved.

error FS0219: The referenced or default base CLI library 'mscorlib' is binary-incompatible with the referenced F# core library '/usr/lib/fsharp/FSharp.Core.dll'. Consider recompiling the library or making an explicit reference to a version of this library that matches the CLI version you are using.

error FS0218: Unable to read assembly '/usr/lib/fsharp/FSharp.Core.dll' make: *\ [all] Error 1

does this means there's some incompatibility between the MonoDevelop binary and the latest version of Mono? I just don't know where to search anymore. anyone out there tried to compiled this on Mac?

o01eg commented 13 years ago

You need to check version of used .NET. Check this for you fsharp and set appropriate version in src/Services/FSharpCompiler.fs and configure.sh

o01eg commented 12 years ago

I update Monodevelop to 2.8.2. fsharpbinding became compiled but Monodevelop doesn't use it. If I change 4.0 version in patch to 2.0 version fsharpbinding cann't be compiled.

warning FS0217: The referenced or default base CLI library 'mscorlib' is binary-incompatible with the referenced library '/usr/lib/monodevelop/bin/MonoDevelop.Core.dll'. Consider recompiling the library or making an explicit reference to a version of this library that matches the CLI version you are using.

warning FS0217: The referenced or default base CLI library 'mscorlib' is binary-incompatible with the referenced library '/usr/lib/monodevelop/bin/MonoDevelop.Ide.dll'. Consider recompiling the library or making an explicit reference to a version of this library that matches the CLI version you are using.

warning FS0217: The referenced or default base CLI library 'mscorlib' is binary-incompatible with the referenced library '/usr/lib/monodevelop/bin/Mono.TextEditor.dll'. Consider recompiling the library or making an explicit reference to a version of this library that matches the CLI version you are using.

/tmp/portage/dev-dotnet/fsharpbinding-9999/work/fsharpbinding-9999/src/PowerPack/CodeDomGenerator.fs(248,44): warning FS0044: This construct is deprecated

error FS0193: The module/namespace 'System.Func`1' from compilation unit 'mscorlib' did not contain the namespace, module or type 'Func`1'

/tmp/portage/dev-dotnet/fsharpbinding-9999/work/fsharpbinding-9999/src/Services/LanguageService.fs(415,7): error FS1109: A reference to the type 'System.Func`1' in assembly 'mscorlib' was found, but the type could not be found in that assembly
o01eg commented 12 years ago

I shared it in "booboo" Gentoo overlay.

klaeufer commented 12 years ago

Same problem here on Ubuntu 11.10, which provides Mono 2.10.5 out of the box, and MonoDevelop 2.8.2 from ppa:keks9n/monodevelop-latest.

I hope the F# add-in will work by the end so I can use it in the PL class I am scheduled to teach. Thanks for all the work.

danbst commented 12 years ago

oO1eg, confirm. Patch helped and fsharpbinding compiled but monodevelop282 doesnot see it.

karthikvishnu commented 12 years ago

where do I download this patch?

danbst commented 12 years ago

Here https://github.com/fsharp/fsharpbinding/issues/24#issuecomment-2535129

Patch doesn't help, because monodevelop gets errors when loading addin.

karthikvishnu commented 12 years ago

yeah, monodevelop doesn't recognise the generated mpack, installation fails, Following issue occurs

System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.InvalidOperationException: Type 'FSharp.MonoDevelop.FSharpProjectFileNodeExtension' not found in add-in 'MonoDevelop.FSharpBinding,2.8.2' at Mono.Addins.RuntimeAddin.GetType (System.String typeName, Boolean throwIfNotFound) [0x000f6] in /private/tmp/monobuild/build/BUILD/mono-addins-0.6.2/Mono.Addins/Mono.Addins/RuntimeAddin.cs:343

above issue occurs

karthikvishnu commented 12 years ago

I made some changes to refer the latest versions binaries for mono in Mac os x. Pushed changes in the following fork: https://github.com/karthikvishnu/fsharpbinding FSharpbinding works with the above changes also included a library template project

o01eg commented 12 years ago

I've changed versions from 2.8 to 2.8.2, added FSharpLibraryProject.xpt.xml and fsharp files as in your patch but monodevelop doesn't see it.

karthikvishnu commented 12 years ago

I checked the following things to ensure the new template is recognized by monodevelop

o01eg commented 12 years ago

MonoDevelop says that FSharpLibraryProject.xpt.xml exists in FSharpBinding.dll.

karthikvishnu commented 12 years ago

any issues while creating the F# library project template?

o01eg commented 12 years ago

Which issues? I got existing project template from your patch.

karthikvishnu commented 12 years ago

Is the library template working? Any issues with FSharpBinding addin?

o01eg commented 12 years ago

I cann't check it because monodevelop doesn't see this addin.

hardlianotion commented 12 years ago

I have just managed to get monodevelop 2.8.5 working with mono 2.10.8 and your update, karthikvishnu. But I did modify a couple of lines in Services/Common.fs to get it working for me. I changed all references for the compiler that read

/Library/Frameworks/Mono.framework/Versions/2.10.6/... to /Library/Frameworks/Mono.framework/Versions/Current/...

as otherwise, the wrong framework was being picked to run the compiler. Given that we are using configure.sh to control the build, it seems that this is a tiny step toward making this slightly less hardcoded.

hardlianotion commented 12 years ago

Oh, and thanks!

tementy commented 12 years ago

Hi, F# coders! I've installed this bindings on Fedora16 x64 with default mono 2.10.5 + monodevelop 2.8.1 from repository. Code completion and debugging works great. Maybe, you'll find some of the following scripts useful. Run them from regular user.

0) yum install monodevelop autoconf automake 1) download fsharp compiler and bindings:

#! /bin/sh

wget -O fsharp-fsharp-6d4f78d.zip https://github.com/fsharp/fsharp/zipball/6d4f78d60b8ca8158a10e348ffc0a050095a18f6
unzip fsharp-fsharp-6d4f78d.zip
wget -O fsharp-fsharpbinding-1154261.zip https://github.com/fsharp/fsharpbinding/zipball/1154261c52504bd5573ba8599ad1e3f17c1eeda9
unzip fsharp-fsharpbinding-1154261.zip

2) compile and install fsharp core:

#! /bin/sh

cd fsharp-fsharp-6d4f78d
autoreconf
./configure --prefix=/usr
make
su -c 'make install'

3) patch bindings sources and build package for monodevelop:

#! /bin/sh

patch -p0 -i fsharpbinding.fc16.tementy.patch
cd fsharp-fsharpbinding-1154261
./configure.sh
make
make package

Here is patch file: fsharpbinding.fc16.tementy.patch

diff -Naur fsharp-fsharpbinding-1154261/configure.sh fsharp-fsharpbinding-1154261-tementy/configure.sh
--- fsharp-fsharpbinding-1154261/configure.sh   2011-10-21 08:21:36.000000000 +0400
+++ fsharp-fsharpbinding-1154261-tementy/configure.sh   2012-02-02 21:04:40.370680731 +0400
@@ -78,42 +78,42 @@
 # ------------------------------------------------------------------------------
 # Find all paths that we need in order to generate the make file

-PATHS=( /usr/lib/monodevelop /Applications/MonoDevelop.app/Contents/MacOS/lib/monodevelop /opt/mono/lib/monodevelop )
+PATHS=( /usr/lib/monodevelop /usr/lib64/monodevelop )
 searchpaths "MonoDevelop" bin/MonoDevelop.Core.dll PATHS[@]
 MDDIR=$RESULT
 echo "Successfully found MonoDevelop root directory." $MDDIR

-PATHS=( /usr/lib/fsharp /usr/local/lib/fsharp /opt/mono/lib/mono/2.0 )
+PATHS=( /usr/lib/mono/4.0 /usr/lib64/mono/4.0 )
 searchpaths "F#" FSharp.Core.dll PATHS[@]
 FSDIR=$RESULT
 echo "Successfully found F# root directory." $FSDIR

-PATHS=( /usr/lib/mono/2.0 /Library/Frameworks/Mono.framework/Versions/2.8/lib/mono/2.0 /opt/mono/lib/mono/2.0 )
+PATHS=( /usr/lib/mono/4.0 /usr/lib64/mono/4.0 )
 searchpaths "Mono" mscorlib.dll PATHS[@]
 MONODIR=$RESULT
 echo "Successfully found Mono root directory." $MONODIR

-PATHS=( /usr/lib/mono/gtk-sharp-2.0 /usr/lib/cli/gtk-sharp-2.0 /Library/Frameworks/Mono.framework/Versions/2.8/lib/mono/gtk-sharp-2.0 /opt/mono/lib/mono/gtk-sharp-2.0 )
+PATHS=( /usr/lib/mono/gtk-sharp-2.0 /usr/lib64/mono/gtk-sharp-2.0 )
 searchpaths "Gtk#" gtk-sharp.dll PATHS[@]
 GTKDIR=$RESULT
 echo "Successfully found Gtk# root directory." $GTKDIR

-PATHS=( /usr/lib/mono/gtk-sharp-2.0 /usr/lib/cli/glib-sharp-2.0 /Library/Frameworks/Mono.framework/Versions/2.8/lib/mono/gtk-sharp-2.0 /opt/mono/lib/mono/gtk-sharp-2.0 )
+PATHS=( /usr/lib/mono/gtk-sharp-2.0 /usr/lib64/mono/gtk-sharp-2.0 )
 searchpaths "Glib" glib-sharp.dll PATHS[@]
 GLIBDIR=$RESULT
 echo "Successfully found Glib# root directory." $GLIBDIR

-PATHS=( /usr/lib/mono/gtk-sharp-2.0 /usr/lib/cli/atk-sharp-2.0 /Library/Frameworks/Mono.framework/Versions/2.8/lib/mono/gtk-sharp-2.0 /opt/mono/lib/mono/gtk-sharp-2.0 )
+PATHS=( /usr/lib/mono/gtk-sharp-2.0 /usr/lib64/mono/gtk-sharp-2.0 )
 searchpaths "Atk#" atk-sharp.dll PATHS[@]
 ATKDIR=$RESULT
 echo "Successfully found Atk# root directory." $ATKDIR

-PATHS=( /usr/lib/mono/gtk-sharp-2.0 /usr/lib/cli/gdk-sharp-2.0 /Library/Frameworks/Mono.framework/Versions/2.8/lib/mono/gtk-sharp-2.0 /opt/mono/lib/mono/gtk-sharp-2.0 )
+PATHS=( /usr/lib/mono/gtk-sharp-2.0 /usr/lib64/mono/gtk-sharp-2.0 )
 searchpaths "Gdk#" gdk-sharp.dll PATHS[@]
 GDKDIR=$RESULT
 echo "Successfully found Gdk# root directory." $GDKDIR

-PATHS=( /usr/lib/mono/gtk-sharp-2.0 /usr/lib/cli/pango-sharp-2.0 /Library/Frameworks/Mono.framework/Versions/2.8/lib/mono/gtk-sharp-2.0 /opt/mono/lib/mono/gtk-sharp-2.0 )
+PATHS=( /usr/lib/mono/gtk-sharp-2.0 /usr/lib64/mono/gtk-sharp-2.0 )
 searchpaths "Pango#" pango-sharp.dll PATHS[@]
 PANGODIR=$RESULT
 echo "Successfully found Pango root directory." $PANGODIR
diff -Naur fsharp-fsharpbinding-1154261/Makefile.orig fsharp-fsharpbinding-1154261-tementy/Makefile.orig
--- fsharp-fsharpbinding-1154261/Makefile.orig  2011-10-21 08:21:36.000000000 +0400
+++ fsharp-fsharpbinding-1154261-tementy/Makefile.orig  2012-02-02 21:15:01.428698890 +0400
@@ -13,7 +13,7 @@
 GDKDIR = INSERT_GDK_DIR
 GLIBDIR = INSERT_GLIB_DIR
 MONO = INSERT_MONO
-MDRUN = $(MONO) $(MDROOT)/bin/mdrun.exe
+MDRUN = $(MONO) $(MDROOT)/bin/mdtool.exe

 FSC = INSERT_FSHARP_COMPILER
 CSC = INSERT_CSHARP_COMPILER
@@ -54,11 +54,15 @@
    src/FSharpLanguageBinding.fs \
    src/FSharpParser.fs \
    src/FSharpTextEditorCompletion.fs \
-   src/FSharpResolverProvider.fs
+   src/FSharpResolverProvider.fs \
+   src/FSharpProjectServiceExtension.fs \
+   src/FSharpProjectFileNodeExtension.fs

 REFERENCES = \
    -r:$(MONOBIN)/mscorlib.dll \
    -r:System.dll -r:System.Xml.dll \
+   -r:Mono.Posix.dll -r:Mono.Cairo.dll \
+   -r:../mono-addins/Mono.Addins.dll \
    -r:$(MDBIN)/MonoDevelop.Core.dll \
    -r:$(MDBIN)/MonoDevelop.Ide.dll \
    -r:$(MDBIN)/Mono.TextEditor.dll \
@@ -107,5 +111,6 @@
    mkdir -p repository
    cp bin/FSharpBinding.* bin/repository
    cp src/Resources/FSharpBinding.addin.xml bin/repository
+   cp $(FSBIN)/FSharp.*.dll $(FSBIN)/FSharp.*.optdata $(FSBIN)/FSharp.*.sigdata $(FSBIN)/fsc.exe $(FSBIN)/fsi.exe bin/repository
    $(MDRUN) setup pack bin/repository/FSharpBinding.addin.xml -d:repository

diff -Naur fsharp-fsharpbinding-1154261/src/Services/FSharpCompiler.fs fsharp-fsharpbinding-1154261-tementy/src/Services/FSharpCompiler.fs
--- fsharp-fsharpbinding-1154261/src/Services/FSharpCompiler.fs 2011-10-21 08:21:36.000000000 +0400
+++ fsharp-fsharpbinding-1154261-tementy/src/Services/FSharpCompiler.fs 2012-02-02 20:29:09.911953267 +0400
@@ -74,7 +74,7 @@

   /// Wrapper type for the 'FSharp.Compiler.dll' assembly - expose types we use
   type FSharpCompiler private () =      
-    static let asm = Assembly.Load("FSharp.Compiler, Version=2.0.0.0, Culture=neutral, PublicKeyToken=a19089b1c74d0809")
+    static let asm = Assembly.Load("FSharp.Compiler, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")
     static member InteractiveChecker = asm.GetType("Microsoft.FSharp.Compiler.SourceCodeServices.InteractiveChecker")
     static member IsResultObsolete = asm.GetType("Microsoft.FSharp.Compiler.SourceCodeServices.IsResultObsolete")
     static member CheckOptions = asm.GetType("Microsoft.FSharp.Compiler.SourceCodeServices.CheckOptions")
@@ -84,7 +84,7 @@

   /// Wrapper type for the 'FSharp.Compiler.Server.Shared.dll' assembly - expose types we use
   type FSharpCompilerServerShared private () =      
-    static let asm = Assembly.Load("FSharp.Compiler.Server.Shared, Version=2.0.0.0, Culture=neutral, PublicKeyToken=a19089b1c74d0809")
+    static let asm = Assembly.Load("FSharp.Compiler.Server.Shared, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")
     static member InteractiveServer = asm.GetType("Microsoft.FSharp.Compiler.Server.Shared.FSharpInteractiveServer")

 // --------------------------------------------------------------------------------------
farley13 commented 12 years ago

Thanks karthikvishnu and hardlianotion,

With your efforts combined this was a breeze: https://github.com/karthikvishnu/fsharpbinding is 99% of the way there (on OSX), with just one thing missing:

//SNIP from hardlianotion's post

I have just managed to get monodevelop 2.8.5 working with mono 2.10.8 and your update, karthikvishnu. But I did modify a couple of lines in Services/Common.fs to get it working for me. I changed all references for the compiler that read

/Library/Frameworks/Mono.framework/Versions/2.10.6/... to /Library/Frameworks/Mono.framework/Versions/Current/...

// SNIP

BTW are there any maintainers still on this project? Karthikvishnu - if you could make the above change in your own repo, that would be ideal! F# is just getting started...

tementy - good to share, but it unfortunately includes your own filesystem path and removes the Library/... used on MacOSX from the PATHS.

thomaschrstnsn commented 12 years ago

I took farley13's fix and created a fork with instructions on how to build on OS X (10.7 w/ Mono Develop 2.8.6.5):

$ git clone git://github.com/thomaschrstnsn/fsharpbinding.git $ cd fsharpbinding $ ./configure.sh # press enter $ make && make install $ ln -s /Library/Frameworks/Mono.framework/Versions/Current/lib/mono/4.0/FSharp.Core.dll /Applications/MonoDevelop.app/Contents/MacOS/lib/monodevelop/AddIns/BackendBindings

Note: the package built with 'make package' will not install correctly on my machine and I have not looked further into this, therefore the 'make install'.

mhogstrom commented 12 years ago

Thanks guys.

Thanks, thomaschrstnsn, for the easy instructions.

I just got a mac, wanted to do some FSharping and ran into this problem. I solved a few compile and reference errors but was a bit discouraged by the CLI binary incompatibility problems. Too bad they haven't updated the FSharp AddIn package for the latest release of MonoDevelop 2.8.

klaeufer commented 12 years ago

I finally got it to work on Ubuntu 11.10 based on a synthesis tementy and thomaschrstnsn's comments and modifications, including the symbolic link in monodevelop/AddIns. Code completion does appear to work. Just in time for class tonight. Thanks, guys!

https://github.com/klaeufer/fsharpbinding

klaeufer commented 12 years ago

FYI, the add-in currently compiles for me against MonoDevelop 2.8.2 but not 2.8.8.4, where I get these errors:

/home/laufer/Work/GitHub/klaeufer/fsharpbinding-2.8.8.4/src/PowerPack/CodeDomGenerator.fs(248,44): warning FS0044: This construct is deprecated

/home/laufer/Work/GitHub/klaeufer/fsharpbinding-2.8.8.4/src/FSharpProjectServiceExtension.fs(17,14): error FS0855: No abstract or interface member was found that corresponds to this override

/home/laufer/Work/GitHub/klaeufer/fsharpbinding-2.8.8.4/src/FSharpProjectServiceExtension.fs(18,10): error FS0039: The field, constructor or member 'PopulateSupportFileList' is not defined

I have not tried any MD versions in between.

yveszhang commented 12 years ago

Klaeufer, I got exactly the same error on my mac (OS X 10.7.3, MonoDevelop 2.8.8.4).

I used thomaschrstnsn's repository and it compiled with OS X 10.6 and MonoDevelop 2.8.1 (thanks, thomaschrstnsn!). I just copied the files to the MonoDevelop 2.8.8.4 directory and create the link, and it works very well.

funnelweb commented 12 years ago

closing out this issue since the addin now compiles for MonoDevelop 3.0.x