Cann't compile fshaprbinding. #24
Comments
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")
// --------------------------------------------------------------------------------------
|
hi, 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' 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? |
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 |
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.
|
I shared it in "booboo" Gentoo overlay. |
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. |
oO1eg, confirm. Patch helped and fsharpbinding compiled but monodevelop282 doesnot see it. |
where do I download this patch? |
Here #24 (comment) Patch doesn't help, because monodevelop gets errors when loading addin. |
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' above issue occurs |
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 |
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. |
I checked the following things to ensure the new template is recognized by monodevelop
|
MonoDevelop says that FSharpLibraryProject.xpt.xml exists in FSharpBinding.dll. |
any issues while creating the F# library project template? |
Which issues? I got existing project template from your patch. |
Is the library template working? Any issues with FSharpBinding addin? |
I cann't check it because monodevelop doesn't see this addin. |
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/... 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. |
Oh, and thanks! |
Hi, F# coders!
#! /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
#! /bin/sh
cd fsharp-fsharp-6d4f78d
autoreconf
./configure --prefix=/usr
make
su -c 'make install'
#! /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")
// -------------------------------------------------------------------------------------- |
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/... // 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. |
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 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'. |
Thanks guys. Thanks, thomaschrstnsn, for the easy instructions. I just got a mac, wanted to do some FSharping and ran into this problem. |
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! |
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. |
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. |
closing out this issue since the addin now compiles for MonoDevelop 3.0.x |
I use next patch to use .NET 4.0 and to fix error with Mono.Unix:
But when I compile I'm getting next errors:
I use Gentoo amd64, mono-2.10.5, monodevelop-2.6 and last fsharp from master branch.
The text was updated successfully, but these errors were encountered: