Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Arch Linux - Compilation Error - "No rule to make target 'ChunkedStream.cs'" #744

Open
errotu opened this issue Apr 30, 2017 · 10 comments
Open

Comments

@errotu
Copy link
Contributor

errotu commented Apr 30, 2017

I try to compile the CmisSync on an Arch system. I'm following the steps from: https://github.com/aegif/CmisSync/blob/master/CmisSync/Linux/README.md with one change, I'm using
./configure --with-dotcmis=Extras/DotCMIS.dll --with-newtonsoft-json=Extras/Newtonsoft.Json.dll
instead of
./configure --with-dotcmis=Extras/DotCMIS.dll

Unfortunately, when I'm executing the command:
make

I get the following terminal output:

Making all in build
make[1]: Entering directory '/home/anon/CmisSync/build'
Making all in m4
make[2]: Entering directory '/home/anon/CmisSync/build/m4'
make[2]: Nothing to be done for 'all'.
make[2]: Leaving directory '/home/anon/CmisSync/build/m4'
make[2]: Entering directory '/home/anon/CmisSync/build'
make[2]: Nothing to be done for 'all-am'.
make[2]: Leaving directory '/home/anon/CmisSync/build'
make[1]: Leaving directory '/home/anon/CmisSync/build'
Making all in CmisSync.Auth
make[1]: Entering directory '/home/anon/CmisSync/CmisSync.Auth'
make[1]: Nothing to be done for 'all'.
make[1]: Leaving directory '/home/anon/CmisSync/CmisSync.Auth'
Making all in CmisSync.Lib
make[1]: Entering directory '/home/anon/CmisSync/CmisSync.Lib'
make[1]: *** No rule to make target 'ChunkedStream.cs', needed by '../bin/CmisSync.Lib.dll'. Stop.
make[1]: Leaving directory '/home/anon/CmisSync/CmisSync.Lib'
make: *** [Makefile:413: all-recursive] Error 1

Do you have any idea how I can solve this?

@nicolas-raoul
Copy link
Contributor

nicolas-raoul commented May 1, 2017 via email

@errotu
Copy link
Contributor Author

errotu commented May 1, 2017

Very good, thanks! I'm still not able to compile, nevertheless, I'm one step further. This is the current error message:

./StatusIcon.cs(155,63): error CS0246: The type or namespace name `SyncStatus' could not be found. Are you missing an assembly reference?

And this is the complete console output of make:

Making all in build
make[1]: Entering directory '/home/anon/CmisSync/build'
Making all in m4
make[2]: Entering directory '/home/anon/CmisSync/build/m4'
make[2]: Nothing to be done for 'all'.
make[2]: Leaving directory '/home/anon/CmisSync/build/m4'
make[2]: Entering directory '/home/anon/CmisSync/build'
make[2]: Nothing to be done for 'all-am'.
make[2]: Leaving directory '/home/anon/CmisSync/build'
make[1]: Leaving directory '/home/anon/CmisSync/build'
Making all in CmisSync.Auth
make[1]: Entering directory '/home/anon/CmisSync/CmisSync.Auth'
make[1]: Nothing to be done for 'all'.
make[1]: Leaving directory '/home/anon/CmisSync/CmisSync.Auth'
Making all in CmisSync.Lib
make[1]: Entering directory '/home/anon/CmisSync/CmisSync.Lib'
make[1]: Nothing to be done for 'all'.
make[1]: Leaving directory '/home/anon/CmisSync/CmisSync.Lib'
Making all in CmisSync
make[1]: Entering directory '/home/anon/CmisSync/CmisSync'
Making all in Common
make[2]: Entering directory '/home/anon/CmisSync/CmisSync/Common'
Making all in HTML
make[3]: Entering directory '/home/anon/CmisSync/CmisSync/Common/HTML'
make[3]: Nothing to be done for 'all'.
make[3]: Leaving directory '/home/anon/CmisSync/CmisSync/Common/HTML'
Making all in Plugins
make[3]: Entering directory '/home/anon/CmisSync/CmisSync/Common/Plugins'
make[3]: Nothing to be done for 'all'.
make[3]: Leaving directory '/home/anon/CmisSync/CmisSync/Common/Plugins'
Making all in Pixmaps
make[3]: Entering directory '/home/anon/CmisSync/CmisSync/Common/Pixmaps'
make[3]: Nothing to be done for 'all'.
make[3]: Leaving directory '/home/anon/CmisSync/CmisSync/Common/Pixmaps'
make[3]: Entering directory '/home/anon/CmisSync/CmisSync/Common'
make[3]: Nothing to be done for 'all-am'.
make[3]: Leaving directory '/home/anon/CmisSync/CmisSync/Common'
make[2]: Leaving directory '/home/anon/CmisSync/CmisSync/Common'
Making all in Linux
make[2]: Entering directory '/home/anon/CmisSync/CmisSync/Linux'
Making all in Pixmaps
make[3]: Entering directory '/home/anon/CmisSync/CmisSync/Linux/Pixmaps'
Making all in icons
make[4]: Entering directory '/home/anon/CmisSync/CmisSync/Linux/Pixmaps/icons'
Making all in ubuntu-mono-dark
make[5]: Entering directory '/home/anon/CmisSync/CmisSync/Linux/Pixmaps/icons/ubuntu-mono-dark'
make[5]: Nothing to be done for 'all'.
make[5]: Leaving directory '/home/anon/CmisSync/CmisSync/Linux/Pixmaps/icons/ubuntu-mono-dark'
Making all in ubuntu-mono-light
make[5]: Entering directory '/home/anon/CmisSync/CmisSync/Linux/Pixmaps/icons/ubuntu-mono-light'
make[5]: Nothing to be done for 'all'.
make[5]: Leaving directory '/home/anon/CmisSync/CmisSync/Linux/Pixmaps/icons/ubuntu-mono-light'
make[5]: Entering directory '/home/anon/CmisSync/CmisSync/Linux/Pixmaps/icons'
make[5]: Nothing to be done for 'all-am'.
make[5]: Leaving directory '/home/anon/CmisSync/CmisSync/Linux/Pixmaps/icons'
make[4]: Leaving directory '/home/anon/CmisSync/CmisSync/Linux/Pixmaps/icons'
make[4]: Entering directory '/home/anon/CmisSync/CmisSync/Linux/Pixmaps'
make[4]: Nothing to be done for 'all-am'.
make[4]: Leaving directory '/home/anon/CmisSync/CmisSync/Linux/Pixmaps'
make[3]: Leaving directory '/home/anon/CmisSync/CmisSync/Linux/Pixmaps'
make[3]: Entering directory '/home/anon/CmisSync/CmisSync/Linux'
/usr/bin/dmcs



-codepage:utf8
-nowarn:0278 -nowarn:0078 $warn
-define:HAVE_GTK_2_10 -define:NET_2_0
-debug -target:exe -out:../../bin/CmisSync.exe
-define:HAVE_APP_INDICATOR -define:ENABLE_ATK
-r:../../bin/CmisSync.Auth.dll -r:../../bin/CmisSync.Lib.dll -r:../../Extras/DotCMIS.dll -r:Mono.Posix -r:System -r:System.Windows.Forms -r:/usr/lib/mono/appindicator-sharp-0.1/appindicator-sharp.dll -r:/usr/lib/mono/log4net/log4net.dll -r:/usr/lib/mono/notify-sharp/notify-sharp.dll -r:/usr/lib/pkgconfig/../../lib/mono/gtk-sharp-2.0/atk-sharp.dll -r:/usr/lib/pkgconfig/../../lib/mono/gtk-sharp-2.0/gdk-sharp.dll -r:/usr/lib/pkgconfig/../../lib/mono/gtk-sharp-2.0/glib-sharp.dll -r:/usr/lib/pkgconfig/../../lib/mono/gtk-sharp-2.0/gtk-sharp.dll -r:/usr/lib/pkgconfig/../../lib/mono/gtk-sharp-2.0/pango-sharp.dll -resource:./CmisSync.Properties.Resources.no.resources,CmisSync.Properties.Resources.no.resources -resource:./CmisSync.Properties.Resources.uk.resources,CmisSync.Properties.Resources.uk.resources -resource:./CmisSync.Properties.Resources.tlh-AA.resources,CmisSync.Properties.Resources.tlh-AA.resources -resource:./CmisSync.Properties.Resources.de.resources,CmisSync.Properties.Resources.de.resources -resource:./CmisSync.Properties.Resources.es-ES.resources,CmisSync.Properties.Resources.es-ES.resources -resource:./CmisSync.Properties.Resources.pl.resources,CmisSync.Properties.Resources.pl.resources -resource:./CmisSync.Properties.Resources.da.resources,CmisSync.Properties.Resources.da.resources -resource:./CmisSync.Properties.Resources.fr.resources,CmisSync.Properties.Resources.fr.resources -resource:./CmisSync.Properties.Resources.it.resources,CmisSync.Properties.Resources.it.resources -resource:./CmisSync.Properties.Resources.resources,CmisSync.Properties.Resources.resources -resource:./CmisSync.Properties.Resources.cs.resources,CmisSync.Properties.Resources.cs.resources -resource:./CmisSync.Properties.Resources.nl.resources,CmisSync.Properties.Resources.nl.resources -resource:./CmisSync.Properties.Resources.ru.resources,CmisSync.Properties.Resources.ru.resources -resource:./CmisSync.Properties.Resources.sl.resources,CmisSync.Properties.Resources.sl.resources -resource:./CmisSync.Properties.Resources.tlh-KX.resources,CmisSync.Properties.Resources.tlh-KX.resources -resource:./CmisSync.Properties.Resources.pt-PT.resources,CmisSync.Properties.Resources.pt-PT.resources -resource:./CmisSync.Properties.Resources.ja.resources,CmisSync.Properties.Resources.ja.resources ./../AboutController.cs ./../CertPolicyHandler.cs ./../ControllerBase.cs ./../EditController.cs ./../Program.cs ./../SetupController.cs ./../StatusIconController.cs ./About.cs ./CertPolicyWindow.cs ./CmisTree/CmisTreeStore.cs ./CmisTree/LoadingStatusModel.cs ./CmisTree/NodeLoader.cs ./CmisTree/NodeModel.cs ./CmisTree/NodeModelUtils.cs ./CmisTree/StatusCellRenderer.cs ./Controller.cs ./Resources.Designer.cs ./Setup.cs ./SetupWindow.cs ./Spinner.cs ./StatusIcon.cs ./UserNotificationListenerLinux.cs ./GUI.cs ./UIHelpers.cs ./Utils.cs ./Defines.cs
Note: dmcs is deprecated, please use mcs instead!
./StatusIcon.cs(155,63): error CS0246: The type or namespace name `SyncStatus' could not be found. Are you missing an assembly reference?
Compilation failed: 1 error(s), 0 warnings
make[3]: *** [Makefile:895: ../../bin/CmisSync.exe] Error 1
make[3]: Leaving directory '/home/anon/CmisSync/CmisSync/Linux'
make[2]: *** [Makefile:596: all-recursive] Error 1
make[2]: Leaving directory '/home/anon/CmisSync/CmisSync/Linux'
make[1]: *** [Makefile:380: all-recursive] Error 1
make[1]: Leaving directory '/home/anon/CmisSync/CmisSync'
make: *** [Makefile:413: all-recursive] Error 1

@errotu
Copy link
Contributor Author

errotu commented Oct 17, 2017

I just wanted to give the feedback that this error does unfortunately still exist exactly the same way in the current version of CmisSync.

Any suggestions which might help?

@nicolas-raoul
Copy link
Contributor

Sorry for that, you have to modify the Makefile.am files (for instance CmisSync.Lib/Makefile.am) to reference the files that the compiler wants. Thanks! :-)

@errotu
Copy link
Contributor Author

errotu commented Oct 18, 2017

I took a look at the CmisSync.Lib/Makefile.am but did not find anything what hits me.
If I understand

./StatusIcon.cs(155,63): error CS0246: The type or namespace name `SyncStatus' could not be found. Are you missing an assembly reference?

correctly, I guess the error lies in between line 155 to 168 of /CmisSync/CmisSync/Linux/StatusIcon.cs:

    private void setSyncItemState(ImageMenuItem syncitem, SyncStatus status)
    {
        switch (status)
        {
            case SyncStatus.Idle:
                (syncitem.Child as Label).Text = CmisSync.Properties_Resources.PauseSync;
                syncitem.Image = new Image (UIHelpers.GetIcon ("media_playback_pause", 12));
                break;
            case SyncStatus.Suspend:
                (syncitem.Child as Label).Text = CmisSync.Properties_Resources.ResumeSync;
                syncitem.Image = new Image (UIHelpers.GetIcon ("media_playback_start", 12));
                break;
        }
    }

@ghost
Copy link

ghost commented Nov 10, 2017

I'm experiencing the same issue on Gentoo Linux. Which resource provides SyncStatus, where does the SyncStatus class/namespace come from? I can't find any occurence in CmisSync aside from the Mac and Linux StatusIcon.cs files.

@nicolas-raoul
"... to reference the files that the compiler wants." Which files are you talking about and where does it show me which files it is missing? Is there a database of which classes exist in which mono dll file?

Edit 2018-02-26:

After months of no activity, I've taken a closer look myself and finally found the missing piece in the commit history of the CmisSync library.

SyncStatus was removed from CmisSync.Lib/RepoBase.cs in commit 118e469 on 19 Jul 2016:

-        public SyncStatus Status { get; private set; }
+        public bool Enabled { get; private set; }

-    public enum SyncStatus
-    {
-        /// <summary>
-        /// Normal operation.
-        /// </summary>
-        Idle,
-
-        /// <summary>
-        /// Synchronization is suspended.
-        /// </summary>
-        Suspend
-    }

Obviously the intention was to replace the different enum types of SyncStatus by a boolean value.

A grep of SyncStatus shows:

CmisSync/Linux/StatusIcon.cs:   public enum SyncStatus {
CmisSync/Linux/StatusIcon.cs:        private void setSyncItemState(ImageMenuItem syncitem, SyncStatus status)
CmisSync/Linux/StatusIcon.cs:                case SyncStatus.Idle:
CmisSync/Linux/StatusIcon.cs:                case SyncStatus.Suspend:
CmisSync/Mac/StatusIcon.cs:                            setSyncItemState(PauseItem, getSyncStatus(reponame));
CmisSync/Mac/StatusIcon.cs:            setSyncItemState(pauseitem, getSyncStatus(folder_name));
CmisSync/Mac/StatusIcon.cs:        private SyncStatus getSyncStatus(string reponame) {
CmisSync/Mac/StatusIcon.cs:            return SyncStatus.Idle;
CmisSync/Mac/StatusIcon.cs:        private void setSyncItemState(NSMenuItem item, SyncStatus status) {
CmisSync/Mac/StatusIcon.cs:                case SyncStatus.Idle:
CmisSync/Mac/StatusIcon.cs:                case SyncStatus.Suspend:

So the enum is still in use. Furthermore we can see that the function Status of the class RepoBase is still used in CmisSync/*/StatusIcon.cs:

setSyncItemState(pauseItem, aRepo.Status);
setSyncItemState(suspend_folder_item, aRepo.Status);
return repo.Status;

From what i could gather the errors that people are experiencing are then related to errors in the CmisSync code where the SyncStatus enum and Status function are still not replaced by the new objects.

This problem must then exist for the last year and a half.

Something has to be very wrong, when a search for SyncStatus in the whole source tree doesn't return a single definition. Why this hasn't been fixed yet, I don't know.

In any case, this should definitely concern both Mac and Linux systems, as both StatusIcon.cs files contain the errors.

@nicolas-raoul: Could you please comment, whether you intend to fix this error and if there are likely more still hidden in the code?

In the face of such obvious bugs, I have problems trusting a software with my important files.

@ghost
Copy link

ghost commented Mar 3, 2018

I've fixed it with the following patch:

diff --git a/CmisSync/Linux/StatusIcon.cs b/CmisSync/Linux/StatusIcon.cs
index 56e098a..a100d0b 100644
--- a/CmisSync/Linux/StatusIcon.cs
+++ b/CmisSync/Linux/StatusIcon.cs
@@ -141,7 +141,7 @@ namespace CmisSync {
                                     {
                                         Menu submenu = (Menu)((CmisSyncMenuItem)menuItem).Submenu;
                                         CmisSyncMenuItem pauseItem = (CmisSyncMenuItem)submenu.Children[1];
-                                        setSyncItemState(pauseItem, aRepo.Status);
+                                        setSyncItemState(pauseItem, aRepo.Enabled);
                                         break;
                                     }
                                 }
@@ -152,15 +152,15 @@ namespace CmisSync {
             };
         }
 
-        private void setSyncItemState(ImageMenuItem syncitem, SyncStatus status)
+        private void setSyncItemState(ImageMenuItem syncitem, bool status)
         {
             switch (status)
             {
-                case SyncStatus.Idle:
+                case true:
                     (syncitem.Child as Label).Text = CmisSync.Properties_Resources.PauseSync;
                     syncitem.Image = new Image (UIHelpers.GetIcon ("media_playback_pause", 12));
                     break;
-                case SyncStatus.Suspend:
+                case false:
                     (syncitem.Child as Label).Text = CmisSync.Properties_Resources.ResumeSync;
                     syncitem.Image = new Image (UIHelpers.GetIcon ("media_playback_start", 12));
                     break;
@@ -220,7 +220,7 @@ namespace CmisSync {
                     {
                         if (aRepo.Name.Equals(folder_name))
                         {
-                            setSyncItemState(suspend_folder_item, aRepo.Status);
+                            setSyncItemState(suspend_folder_item, aRepo.Enabled);
                             break;
                         }
                     }
diff --git a/CmisSync/Mac/StatusIcon.cs b/CmisSync/Mac/StatusIcon.cs
index 69e629f..aacfd0d 100644
--- a/CmisSync/Mac/StatusIcon.cs
+++ b/CmisSync/Mac/StatusIcon.cs
@@ -173,25 +173,25 @@ namespace CmisSync {
             return folderitem;
         }
 
-        private SyncStatus getSyncStatus(string reponame) {
+        private bool getSyncStatus(string reponame) {
             foreach (RepoBase repo in Program.Controller.Repositories)
             {
                 if(repo.Name.Equals(reponame)){
-                    return repo.Status;
+                    return repo.Enabled;
                 }
             }
-            return SyncStatus.Idle;
+            return true;
         }
 
-        private void setSyncItemState(NSMenuItem item, SyncStatus status) {
+        private void setSyncItemState(NSMenuItem item, bool status) {
             Logger.Debug("setSyncItemState " + status);
             switch (status)
             {
-                case SyncStatus.Idle:
+                case true:
                     item.Title = Properties_Resources.PauseSync;
                     item.Image = this.pause_image;
                     break;
-                case SyncStatus.Suspend:
+                case false:
                     item.Title = Properties_Resources.ResumeSync;
                     item.Image = this.resume_image;
                     break;

It then compiles. Adding a repository works. However, after it has successfully finished syncing the first time, it keeps one subprocess at 100% cpu load and strace -p shows lots continuous lstat calls for all files in the local file tree. It seems like it's looking for changes. After running a couple of seconds I had > 50MB of such lstat entries. Most files were in there >15 times. This is independent of the polling time setting. I've tried many different values between a couple of seconds, minutes and hours up to 24hours.

The log shows that the sync was completed. Even on DEBUG level, it doesn't show any activity while the 100% cpu activity happens. I let it run for 10 minutes or so and it didn't stop. It also starts right up again when I start the program again.

@nicolas-raoul I'm assuming the above patch, because it only concerns the Status Icon, couldn't have anything to do with this. Could you please have a look at the parts that govern this behavior? Because I really don't know enough about how this all works to fix this bug.

Thank you in advance for your help !

@nicolas-raoul
Copy link
Contributor

@apus2016 Thanks for the patch! It will be useful to other people trying to make CmisSync work on Linux.
The problem you describe sounds like CmisSync is trying to watch the filesystem in a way that blocks all other processing... a way to solve that could be to disable filesystem watching, for the time being.

@ghost
Copy link

ghost commented Mar 5, 2018

@nicolas-raoul After some spelunking I found the problem. You are preventing any kind of per-platform choice of Watcher backend by setting the environment variable to a string. Remove it in every occurence and the auto-detected backend will be used instead of the DefaultWatcher, which is more than bad for Linux systems. Similarly this is bad for OSX systems.

You'll find my notes in the following and the patch at the end.

Do you think you could help me and create an option to make the synchronization one-way? I'd really like to test your program more, but the risk, that there are bugs in it, that could mess with my Alfresco repositories, makes me nervous. Perhaps that would help to get more people to test your software. In return I'd offer my working Dockerfile, on which I spent quite a lot of hours. It makes running the program on Linux easy.

Let's look at the implementation in Mono, FileSystemWatcher.cs.

The configuration, which backend is used, depends on the environment variable
MONO_MANAGED_WATCHER. It also seems to have per-platform backends now.

In the code of CmisSync there is an if/else block that adds an environment variable if the compiler is Mono.

#if __MonoCS__
// Code for Mono C# compiler.
#else
// Code for Microsoft C# compiler.
#endif

which handles the case of Mono compilation. So it sets MONO_MANAGED_WATCHER=enabled.

Going through the Mono implementation on lines 114-165 we see that if the environment
variable is set, skips the internal autodetect function and decision tree (InternalSupportsFSW)
and compares the string given by the environment variable to "disabled". If untrue,
it sets the DefaultWatcher, which is normally only chosen for Windows. If true,
it disables the Watcher functionality completely.

So in order to be sure that it chooses itself the best possible backend, we need to
remove the setting of the environment variable MONO_MANAGED_WATCHER.

Regarding the internal auto-detection of available backend we find it in filewatcher.c:

ves_icall_System_IO_FSW_SupportsFSW (void)
{
#if defined(__APPLE__)
	if (getenv ("MONO_DARWIN_USE_KQUEUE_FSW"))
		return 3; /* kqueue */
	else
		return 6; /* FSEvent */
#elif HAVE_KQUEUE
	return 3; /* kqueue */
#else
	MonoDl *fam_module;
	int lib_used = 4; /* gamin */
	int inotify_instance;
	char *err;

	inotify_instance = ves_icall_System_IO_InotifyWatcher_GetInotifyInstance ();
	if (inotify_instance != -1) {
		close (inotify_instance);
		return 5; /* inotify */
	}

	fam_module = mono_dl_open ("libgamin-1.so", MONO_DL_LAZY, NULL);
	if (fam_module == NULL) {
		lib_used = 2; /* FAM */
		fam_module = mono_dl_open ("libfam.so", MONO_DL_LAZY, NULL);
	}

	if (fam_module == NULL)
		return 0;

	err = mono_dl_symbol (fam_module, "FAMNextEvent", (gpointer *) &FAMNextEvent);
	g_free (err);
	if (FAMNextEvent == NULL)
		return 0;

	return lib_used;
#endif
}
  • We are not on Apple, so the first if branch is not chosen.
  • We also don't have kqueue, which is only present in BSD and Mac kernels.
  • It then tests if an inotify watcher instance is present and chooses it.
  • If no inotify instance is found, it tries for libgamin-1.so or libfam.so. Are
    neither of them found, it returns 0, which in turn leads to the DefaultWatcher
    backend. If one is found, it returns 2, the FAM backend.

You can test which file system watcher is chosen by running:

$ mono-test-install
Active Mono: /usr/bin/mono

Your have a working System.Drawing setup
Your file system watcher is: System.IO.InotifyWatcher

Patch:
(There are two changes listed, that must come from the text editor I used. They were not intended/don't really change anything.)

diff --git a/CmisSync.Lib/Watcher.cs b/CmisSync.Lib/Watcher.cs
index 382d11d..2def061 100644
--- a/CmisSync.Lib/Watcher.cs
+++ b/CmisSync.Lib/Watcher.cs
@@ -52,11 +52,6 @@ namespace CmisSync.Lib
         /// </summary>
         public Watcher(string folder)
         {
-#if __MonoCS__
-            // http://stackoverflow.com/questions/16859372/why-doesnt-the-servicestack-razor-filesystemwatcher-work-on-mono-mac-os-x
-            Environment.SetEnvironmentVariable("MONO_MANAGED_WATCHER", "enabled");
-#endif
-
             Path = System.IO.Path.GetFullPath(folder);
             IncludeSubdirectories = true;
             Filter = "*";
@@ -399,4 +394,4 @@ namespace CmisSync.Lib
             return grace;
         }
     }
-}
\ No newline at end of file
+}
diff --git a/CmisSync/Program.cs b/CmisSync/Program.cs
index 3c0b765..9868de9 100755
--- a/CmisSync/Program.cs
+++ b/CmisSync/Program.cs
@@ -61,7 +61,6 @@ namespace CmisSync
         public static void Main(string[] args)
         {
 #if __MonoCS__
-            Environment.SetEnvironmentVariable("MONO_MANAGED_WATCHER", "enabled");
             Environment.SetEnvironmentVariable("MONO_XMLSERIALIZER_THS", "no");
 #endif
 
diff --git a/CmisSync/TestLibrary/AbstractSyncTests.cs b/CmisSync/TestLibrary/AbstractSyncTests.cs
index ca36c2f..dc0a151 100644
--- a/CmisSync/TestLibrary/AbstractSyncTests.cs
+++ b/CmisSync/TestLibrary/AbstractSyncTests.cs
@@ -37,9 +37,6 @@ namespace TestLibrary
         [TestFixtureSetUp]
         public void ClassInit()
         {
-#if __MonoCS__
-            Environment.SetEnvironmentVariable("MONO_MANAGED_WATCHER", "enabled");
-#endif
             ServicePointManager.CertificatePolicy = new TrustAlways();
         }
 
diff --git a/CmisSync/TestLibrary/WatcherTest.cs b/CmisSync/TestLibrary/WatcherTest.cs
index 366e653..d4e6c0d 100644
--- a/CmisSync/TestLibrary/WatcherTest.cs
+++ b/CmisSync/TestLibrary/WatcherTest.cs
@@ -1,4 +1,4 @@
-using System;
+using System;
 using System.IO;
 using System.Collections.Generic;
 using System.Threading;
@@ -25,9 +25,6 @@ namespace TestLibrary
         [TestFixtureSetUp]
         public void ClassInit()
         {
-#if __MonoCS__
-            Environment.SetEnvironmentVariable("MONO_MANAGED_WATCHER", "enabled");
-#endif
             log4net.Config.XmlConfigurator.Configure(ConfigManager.CurrentConfig.GetLog4NetConfig());
         }

@nicolas-raoul
Copy link
Contributor

Thanks a lot for the investigation and patch!
Would you mind forking the repository and applying your patches there? It would be very helpful for people willing to run CmisSync on Linux.

One-way synchronization would be great. Unfortunately I am working on a different project currently :-/ Ideally one-way sync should be in a new class, rather than introducing many if/else switches in the already complex algorithm.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants