2

I am new to F#. I get the following error when I attempt to build my F# project in Monodevelop:

/home/greenrd/git/hello/hello: Error FS0229: Error opening binary file '/usr/lib/mono/4.0/../../../../../usr/lib/mono/gac/kde-dotnet/4.1.0.0_194a23ba31c08164/kde-dotnet.dll': Could not find a part of the path "usr/lib/mono/gac/kde-dotnet/4.1.0.0_194a23ba31c08164/kde-dotnet.dll". (FS0229) (hello)

I don't think this is due to the 260 character file path limit in .NET, for the simple reason that the file path is only 102 characters. What could be the problem? file says:

/usr/lib/mono/4.0/../../../../../usr/lib/mono/gac/kde-dotnet/4.1.0.0__194a23ba31c08164/kde-dotnet.dll: PE32 executable (DLL) (console) Intel 80386 Mono/.Net assembly, for MS Windows

I don't even know where this filename comes from, I didn't enter such a strange filename anywhere. All I did was add the KDE C# bindings as a reference to the project.

Robert Harvey
182k48 gold badges349 silver badges516 bronze badges
asked Jan 6, 2014 at 21:49

1 Answer 1

4

This looks like a bug in the compiler when there are more .. than required - it looks like in this case the compiler drops the leading slash.

Changing the reference to

/usr/lib/mono/gac/kde-dotnet/4.1.0.0__194a23ba31c08164/kde-dotnet.dll

works just fine.

I am trying to chase this error up. Hopefully I will have a compiler patch today or tomorrow.

So after chasing a whole stack of functions in the compiler, it turns out this is actually a mono bug. This simplest way to reproduce it is

new FileStream("/../bin/bash",FileMode.Open,FileAccess.Read,FileShare.ReadWrite);;

which should work, but doesn't.

Reported to mono: https://bugzilla.xamarin.com/show_bug.cgi?id=17083

EDIT: This is apparently fixed in the latest mono - https://bugzilla.xamarin.com/show_bug.cgi?id=17083

answered Jan 6, 2014 at 22:03
Sign up to request clarification or add additional context in comments.

1 Comment

This is the kind of bug I'm surprised hasn't been found before. A lot of people use Mono...

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.