Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 31 Oct 2015 21:48:03 -0700
From:      Russell Haley <russ.haley@gmail.com>
To:        monodevelop-list@lists.ximian.com, mono@freebsd.org
Subject:   Re: [MonoDevelop] Monodevelop 5.10
Message-ID:  <CABx9NuSvZNyDy3N5dZ0d0GutKzoag74Dj0S2QYb7evXUh8NEaA@mail.gmail.com>
In-Reply-To: <BN3PR13MB085247B3FD2551A19391F211A62E0@BN3PR13MB0852.namprd13.prod.outlook.com>
References:  <CABx9NuQwXXjkzJ1d-158T%2BSDA_ycQT%2Bgphut28PYXJ%2Bnx4v4Cw@mail.gmail.com> <BN3PR13MB0852D6C1FF7ADAEB708687AFA62F0@BN3PR13MB0852.namprd13.prod.outlook.com> <CABx9NuQ0u=GBUNnDSw6ftv-7rch7k=PsU6KbhVJ5HyAfwd9GMg@mail.gmail.com> <BN3PR13MB085247B3FD2551A19391F211A62E0@BN3PR13MB0852.namprd13.prod.outlook.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Hey,

So a big win last night: after installing libgit2 from ports, was able to
build and run MOnoDevelop from MonoDevelop. I patched
file:///usr/home/rhaley/git/monodevelop/main/external/libgit2sharp/LibGit2S=
harp/Core/NativeDllName.cs:

        public const string Name =3D "/usr/local/lib/libgit2.so";

and had to make some other changes and remove an NFactory test.  I'll try
to reproduce it and create a patch some time later. Yay!

The REAL error I am trying to track down occurs when adding or removing a
new project to a solution. I get a general I/O error. I've tracked it down
to

main/src/core/MonoDevelop.Core/MonoDevelop.Core/FileService.cs

at line 572 a Syscall.rename is attempted and the error code is not handled
in the case statement. I am getting
Mono.Unix.Native.Errno.EXDEV (value 18)

Which I tracked down here:
http://docs.go-mono.com/index.aspx?link=3DF%3AMono.Unix.Native.Errno.EXDEV
"Cross-device link. A hard link to a file on another file system was
attempted."

Values are:

sourceFile    "/tmp/tmp51cc4b8d.tmp"
destFile
"/usr/home/rhaley/Projects/Objektiv2/Objektiv/Objektiv/Objektiv.sln"

mount reveals the following:

tank/tmp on /tmp (zfs, local, nosuid, nfsv4acls)
tank/usr/home on /usr/home (zfs, local, nfsv4acls)
tank/usr/home/rhaley on /usr/home/rhaley (zfs, local, nfsv4acls)


however, I can manuall mv the file.

Any thoughts? I am guessing that the syscall.rename is doing something
other than an mv and zfs doesn't like it. Or conversly, zfs is doing
something funky and the mono wrapper library doesn't like it?

Anyway, all input welcome. Much thanks!

Russell


On Sat, Oct 31, 2015 at 1:03 AM, Robert N <sushihangover@outlook.com> wrote=
:

> Great to hear...
>
>
> ------------------------------
> *From:* Russell Haley <russ.haley@gmail.com>
> *Sent:* Friday, October 30, 2015 9:14 PM
> *To:* Robert N; monodevelop-list@lists.ximian.com
> *Subject:* Re: [MonoDevelop] Monodevelop 5.10
>
> Hey Robert,
>
> Thanks for the great input. Someone on the freebsd-mono@ mailing list
> told me to build libgit2 from ports. With your information now everything
> makes sense.
>
> Thanks for the help!
>
> Russ
>
> On Fri, Oct 30, 2015 at 7:43 AM, Robert N <sushihangover@outlook.com>
> wrote:
>
>>
>> "Can anyone tell me more about "git2-3d5286e"? Where will I find it if
>> it does exist?"
>>
>>
>> Libgit2sharp version of the libgit2 native dll/shared object is
>> versioned with the git sha of the build.
>>
>>
>> 'Normally' you obtain the libgit2sharp CIL assembly with the
>> corresponding native Win32/64 dll (via the Window's nuget). There is als=
o a
>> nuget (LibGit2Sharp.NativeBinaries) for Win32/64, OS-X and Linux libgit2
>> native binaries that can be used.
>>
>>
>> Since you are on BSD, I assume you would need to go to source and build
>> it: https://github.com/libgit2/libgit2 .
>>
>>
>>
>> -Robert
>> libgit2/libgit2 =C2=B7 GitHub <https://github.com/libgit2/libgit2>;
>> github.com
>> libgit2 - The Library ... README.md libgit2 - the Git linkable library.
>> libgit2 is a portable, pure C implementation of the Git core methods
>> provided as a re-entrant ...
>>
>>
>>
>>
>>
>> ------------------------------
>> *From:* monodevelop-list-bounces@lists.ximian.com <
>> monodevelop-list-bounces@lists.ximian.com> on behalf of Russell Haley <
>> russ.haley@gmail.com>
>> *Sent:* Thursday, October 29, 2015 11:34 PM
>> *To:* mono@freebsd.org; monodevelop-list@lists.ximian.com
>> *Subject:* [MonoDevelop] Monodevelop 5.10
>>
>> Hey I have been able to compile and run Monodevelop on FreeBSD 10.2. The
>> source is from git and I use the gmake method to build. I am trying to l=
oad
>> the MonoDevelop workspace IN MonoDevelop to debug some issues, but when
>> loading I am getting the following error:
>>
>> An unhandled exception has occured. Terminating MonoDevelop? True
>> System.TypeInitializationException: An exception was thrown by the type
>> initializer for LibGit2Sharp.Core.NativeMethods --->
>> System.DllNotFoundException: git2-3d5286e
>>   at (wrapper managed-to-native)
>> LibGit2Sharp.Core.NativeMethods:git_libgit2_init ()
>>   at LibGit2Sharp.Core.NativeMethods+LibraryLifetimeObject..ctor ()
>> [0x00000] in <filename unknown>:0
>>   at LibGit2Sharp.Core.NativeMethods..cctor () [0x00000] in <filename
>> unknown>:0
>>   --- End of inner exception stack trace ---
>>   at
>> LibGit2Sharp.Core.Proxy+<git_repository_discover>c__AnonStoreyE.<>m__0
>> (LibGit2Sharp.Core.Handles.GitBuf buf) [0x00000] in <filename unknown>:0
>>   at LibGit2Sharp.Core.Proxy.ConvertPath (System.Func`2 pathRetriever)
>> [0x00000] in <filename unknown>:0
>>   at LibGit2Sharp.Core.Proxy.git_repository_discover
>> (LibGit2Sharp.Core.FilePath start_path) [0x00000] in <filename unknown>:=
0
>>   at LibGit2Sharp.Repository.Discover (System.String startingPath)
>> [0x00000] in <filename unknown>:0
>>   at MonoDevelop.VersionControl.Git.GitRepository..ctor
>> (MonoDevelop.VersionControl.VersionControlSystem vcs, FilePath path,
>> System.String url) [0x00000] in <filename unknown>:0
>>   at
>> MonoDevelop.VersionControl.Git.GitVersionControl.GetRepositoryReference
>> (FilePath path, System.String id) [0x00000] in <filename unknown>:0
>>   at
>> MonoDevelop.VersionControl.VersionControlService.GetRepositoryReference
>> (System.String path, System.String id) [0x00000] in <filename unknown>:0
>>   at MonoDevelop.VersionControl.VersionControlService.GetRepository
>> (IWorkspaceObject entry) [0x00000] in <filename unknown>:0
>>   at MonoDevelop.VersionControl.Git.GitNodeBuilderExtension.OnNodeAdded
>> (System.Object dataObject) [0x00000] in <filename unknown>:0
>>   at MonoDevelop.Ide.Gui.Components.ExtensibleTreeView.RegisterNode
>> (TreeIter it, System.Object dataObject,
>> MonoDevelop.Ide.Gui.Components.NodeBuilder[] chain, Boolean fireAddedEve=
nt)
>> [0x00000] in <filename unknown>:0
>>
>>
>> The Workspace mostly loads (po triansaltions fail?) but when I try to
>> compile I get a very similar error. Incidently, I am trying to update th=
e
>> FreeBSD port to 5.10 and something similar is what is failing there too.
>>
>> I think I have tracked it down to this:
>> the LibGit2Sharp project contains a reference to a class file called
>> NativeDLLName.cs and in it is a string const:
>>
>> namespace LibGit2Sharp.Core
>> {
>>     internal static class NativeDllName
>>     {
>>         public const string Name =3D "git2-3d5286e";
>>     }
>> }
>>
>> This is what is loaded into NativeMethods.cs:
>>
>> // ReSharper disable InconsistentNaming
>> namespace LibGit2Sharp.Core
>> {
>>     internal static class NativeMethods
>>     {
>>         public const uint GIT_PATH_MAX =3D 4096;
>>         private const string libgit2 =3D NativeDllName.Name;
>>         private static readonly LibraryLifetimeObject lifetimeObject;
>>         private static int handlesCount;
>>
>> ...
>>
>>
>>         [DllImport(libgit2)]
>>         internal static extern GitErrorSafeHandle giterr_last();
>>
>>         [DllImport(libgit2)]
>>         internal static extern void giterr_set_str(
>>             GitErrorCategory error_class,
>>             [MarshalAs(UnmanagedType.CustomMarshaler, MarshalCookie =3D
>> UniqueId.UniqueIdentifier, MarshalTypeRef =3D typeof(StrictUtf8Marshaler=
))]
>>  string errorString);
>>
>>         [DllImport(libgit2)]
>>         internal static extern void giterr_set_oom();
>> ...
>> }
>> }
>>
>> Can anyone tell me more about "git2-3d5286e"? Where will I find it if it
>> does exist?
>>
>> Thanks,
>>
>> Russ
>>
>>
>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CABx9NuSvZNyDy3N5dZ0d0GutKzoag74Dj0S2QYb7evXUh8NEaA>