aegif / CmisSync

Synchronize content between a CMIS repository and your desktop. Like Dropbox for Enterprise Content Management!
http://CmisSync.com
164 stars 123 forks source link

Problems trying to compile on Mac OSX (Snow Leopard) #116

Closed antton closed 10 years ago

antton commented 11 years ago

Trying to move forward the project OSX support I decided to start from the beginning. (Even if I didn't have a good end)

First I started following the wiki and at the end I change a few things.

1.- I install Xcode, Mono Framework (both MRE and MDK) and MonoDevelop 2.- I made the export step 3.- I skip the (sudo port install git-core automake intltool libtool) insted of using MacPorts I had a better result with Brew. http://mxcl.github.com/homebrew/ 3.1.- Installation: ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go)" 3.2.- brew install git automake intltool libtool pkg-config (add the last one 'couse you will need it then) (I think that brew controls better the dependencies, but it's my opinion 'i'm not an exprert') 4.- Trying to compile on the terminal with next steps. 4.1.- ./autogen.sh 4.2.- ./configure --prefix=/usr 4.4.- make

I had a lot of problems that i try to solve as follow.

1.- -------------------- ./autogen.sh Running glibtoolize --force --copy --automake ... Running aclocal -I build/m4/sparkleshare -I build/m4/shamrock -I build/m4/shave ... Running autoconf ... Running automake --gnu --add-missing --force --copy -Wno-portability -Wno-portability ... configure.ac:6: require Automake 1.11, but have 1.10 Error: Could not run automake, which is required to configure sparkleshare

After this changes it start working, but in snow leopard I change more files like:

configure.ac (change the value AM_INIT_AUTOMAKE([1.11 to AM_INIT_AUTOMAKE([1.10)

2.- -------------------- ./autogen.sh Running glibtoolize --force --copy --automake ... Running aclocal -I build/m4/sparkleshare -I build/m4/shamrock -I build/m4/shave ... Running autoconf ... Running automake --gnu --add-missing --force --copy -Wno-portability -Wno-portability ... WARNING: I am going to run configure without any arguments. Running ./configure --enable-maintainer-mode ... checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for a thread-safe mkdir -p... ./install-sh -c -d checking for gawk... no checking for mawk... no checking for nawk... no checking for awk... awk checking whether make sets $(MAKE)... yes checking how to create a pax tar archive... gnutar checking whether to enable maintainer-specific portions of Makefiles... yes checking for pkg-config... /usr/bin/pkg-config checking for a BSD-compatible install... /usr/bin/install -c ./configure: line 2476: syntax error near unexpected token MONO_MODULE,' ./configure: line 2476: PKG_CHECK_MODULES(MONO_MODULE, mono >= 2.8)' Error: Could not run ./configure, which is required to configure sparkleshare

To fix this autogen.sh (I change a few lines) (I copied from Cmissync Google Groups)

So, the line in autogen.sh

run aclocal -I build/m4/sparkleshare -I build/m4/shamrock -I build/m4/shave $ACLOCAL_FLAGS

should be changed to

run aclocal -I build/m4/sparkleshare -I build/m4/shamrock -I build/m4/shave -I /usr/local/Cellar/pkg-config/0.27.1/share/aclocal $ACLOCAL_FLAGS

3.- It Works! (but it looks like its trying to compile for Linux and not for Mac) I'm stuck here!

Running glibtoolize --force --copy --automake ... Running aclocal -I build/m4/sparkleshare -I build/m4/shamrock -I build/m4/shave -I /usr/local/Cellar/pkg-config/0.27.1/share/aclocal ... Running autoconf ... Running automake --gnu --add-missing --force --copy -Wno-portability -Wno-portability ... WARNING: I am going to run configure without any arguments. Running ./configure --enable-maintainer-mode ... checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for a thread-safe mkdir -p... ./install-sh -c -d checking for gawk... no checking for mawk... no checking for nawk... no checking for awk... awk checking whether make sets $(MAKE)... yes checking how to create a pax tar archive... gnutar checking whether to enable maintainer-specific portions of Makefiles... yes checking for pkg-config... /usr/bin/pkg-config checking for a BSD-compatible install... /usr/bin/install -c checking pkg-config is at least version 0.9.0... yes checking for MONO_MODULE... yes checking for mono... /usr/bin/mono checking for dmcs... /usr/bin/dmcs checking for Mono 4.0 GAC for System.dll... found checking for Mono 4.0 GAC for System.Security.dll... found checking for Mono 4.0 GAC for Mono.Posix.dll... found checking for NOTIFY_SHARP... no no checking for GTKSHARP... yes checking for GLIBSHARP... yes checking for GLIBSHARP_2_12_7... yes checking for GTKSHARP_A11Y... yes checking for NAUTILUS_PYTHON... no checking for NAUTILUS3_PYTHON... no checking for sed... sed configure: creating ./config.status config.status: creating build/Makefile config.status: creating build/m4/Makefile config.status: creating build/m4/shave/shave config.status: creating build/m4/shave/shave-libtool config.status: creating SparkleLib/Defines.cs config.status: creating SparkleLib/Makefile config.status: creating SparkleLib/Cmis/Makefile config.status: creating SparkleShare/Common/Makefile config.status: creating SparkleShare/Common/HTML/Makefile config.status: creating SparkleShare/Common/Plugins/Makefile config.status: creating SparkleShare/Common/Pixmaps/Makefile config.status: creating SparkleShare/Linux/Makefile config.status: creating SparkleShare/Linux/Pixmaps/Makefile config.status: creating SparkleShare/Linux/Pixmaps/icons/Makefile config.status: creating SparkleShare/Linux/Pixmaps/icons/ubuntu-mono-dark/Makefile config.status: creating SparkleShare/Linux/Pixmaps/icons/ubuntu-mono-light/Makefile config.status: creating SparkleShare/Linux/sparkleshare config.status: creating SparkleShare/Linux/Nautilus/Makefile config.status: creating SparkleShare/Linux/Nautilus/sparkleshare-nautilus-extension.py config.status: creating SparkleShare/Linux/Nautilus/sparkleshare-nautilus3-extension.py config.status: creating SparkleShare/Makefile config.status: creating Makefile

SparkleShare 0.9.1

Configuration: Prefix : /usr/local Build Gtk+ UI : Nautilus 2.x plugin : no Nautilus 3.x plugin : no

4.- ------------------------ make Making all in build Making all in m4 Making all in SparkleLib MCS ../bin/SparkleLib.dll warning CS2002: Source file ./Defines.cs' specified multiple times ./SparkleLogger.cs(43,20): warning CS0219: The variablehome_path' is assigned but its value is never used Compilation succeeded - 2 warning(s) Making all in SparkleLib/Cmis MCS ../../bin/SparkleLib.Cmis.dll error CS0006: Metadata file `lib/DotCMIS.dll' could not be found Compilation failed: 1 error(s), 0 warnings make[1]: * [../../bin/SparkleLib.Cmis.dll] Error 1 make: * [all-recursive] Error 1

I just download the DotCMIS.dll binary from: http://www.apache.org/dyn/closer.cgi/chemistry/dotcmis/0.4/chemistry-dotcmis-0.5-bin.zip

They have a bug in their URL when you try to download the binary soo look on the previous link and just change 0.4 for 0.5.

http://apache.rediris.es/chemistry/dotcmis/0.5/chemistry-dotcmis-0.5-bin.zip

now unzip and cp /download folder/chemistry-dotcmis-0.5-bin/DotCMIS.dll CmisSync/SparkleLib/Cmis/lib/

5.- ------------------------------- make Making all in build Making all in m4 Making all in SparkleLib Making all in SparkleLib/Cmis MCS ../../bin/SparkleLib.Cmis.dll ./CmisDirectory.cs(333,32): warning CS0219: The variable localFolderPath' is assigned but its value is never used ./CmisDirectory.cs(845,23): warning CS0219: The variableid' is assigned but its value is never used ./CmisDatabase.cs(51,83): error CS0234: The type or namespace name ConnectionState' does not exist in the namespaceSystem.Data'. Are you missing an assembly reference? ./CmisUtils.cs(93,43): error CS0234: The type or namespace name CmisPermissionDeniedException' does not exist in the namespaceSparkleLib.Cmis'. Are you missing an assembly reference? Compilation failed: 2 error(s), 2 warnings make[1]: * [../../bin/SparkleLib.Cmis.dll] Error 1 make: * [all-recursive] Error 1

Soo cp /Library/Frameworks/Mono.framework/Versions/Current/lib/mono/gac/System.Data/4.0.0.0__b77a5c561934e089/System.Data.dll SparkleLib/Cmis/lib/

edit SparkleLib/Cmis/Makefile.am (and change the following lines )

from this: LINK = -r:$(DIR_BIN)/SparkleLib.dll -r:lib/DotCMIS.dll -r:lib/Newtonsoft.Json.dll -r:lib/System.Data.SQLite.dll

to this: LINK = -r:$(DIR_BIN)/SparkleLib.dll -r:lib/DotCMIS.dll -r:lib/Newtonsoft.Json.dll -r:lib/System.Data.SQLite.dll -r:lib/System.Data.dll

so let's start again. ./autogen.sh ./configure --prefix=/usr make (and one of the previous errors is gone! :D )

make Making all in build Making all in m4 Making all in SparkleLib MCS ../bin/SparkleLib.dll warning CS2002: Source file ./Defines.cs' specified multiple times ./SparkleLogger.cs(43,20): warning CS0219: The variablehome_path' is assigned but its value is never used Compilation succeeded - 2 warning(s) Making all in SparkleLib/Cmis MCS ../../bin/SparkleLib.Cmis.dll ./CmisDirectory.cs(333,32): warning CS0219: The variable localFolderPath' is assigned but its value is never used ./CmisDirectory.cs(845,23): warning CS0219: The variableid' is assigned but its value is never used ./CmisDatabase.cs(165,24): warning CS0219: The variable checksum' is assigned but its value is never used ./CmisDatabase.cs(167,32): warning CS0219: The variablee' is assigned but its value is never used ./CmisDatabase.cs(379,31): warning CS0219: The variable e' is assigned but its value is never used ./CmisUtils.cs(93,43): error CS0234: The type or namespace nameCmisPermissionDeniedException' does not exist in the namespace `SparkleLib.Cmis'. Are you missing an assembly reference? Compilation failed: 1 error(s), 5 warnings make[1]: * [../../bin/SparkleLib.Cmis.dll] Error 1 make: * [all-recursive] Error 1

open again SparkleLib/Cmis/Makefile.am (and add)

CmisPermissionDeniedException.cs \ in the SOURCES before than CmisDirectory.cs \

Let's try again!

./autogen.sh ./configure --prefix=/usr make

And that's all, a few thing more when you try to open the project on MonoDevelop, add a few references like DotCMIS.dll, Sparklelib.dll and a few system .dll's like... when you have references as:

using System.Linq;

That could be fixed with System.Core.dll library:

/Library/Frameworks/Mono.framework/Versions/Current/lib/mono/gac/System.Core/4.0.0.0__b77a5c561934e089/System.Core.dll

I hope to not disturb to much with this issue post :dancer:

Bye

antton commented 11 years ago

Now I understand what I did wrong. I don't know how to use ModoDevelop :( that's why my previous post is wrong for OSX compilation. Sorry again!

nicolas-raoul commented 11 years ago

Thanks a lot for the investigation! Ideally conmpilation should work on both Monodevelop and command line... I have not been working on it recently, so if you could find out how to make CmisSync work on Mac that would be great! Don't hesitate to modify the README and development wiki :-) Keep up the great work! Nicolas Raoul

On Sun, Feb 17, 2013 at 8:09 AM, antton notifications@github.com wrote:

Now I understand what I did wrong. I don't know how to use ModoDevelop :( that's why my previous post is wrong for OSX compilation. Sorry again!

— Reply to this email directly or view it on GitHubhttps://github.com/nicolas-raoul/CmisSync/issues/116#issuecomment-13676879.

openplus commented 11 years ago

Would be nice to have an actual dmg of cmissync? Any movement on this.

nicolas-raoul commented 11 years ago

Hello Robin, We are concentrating our efforts on the algorithm, so nobody is working on porting to Mac I am afraid... any volunteer?

antton commented 11 years ago

I'd like to continue on the investigation but I'm afraid of me porting to Mac, any other volunteer? @openplus what about you? do you have any knowledge on that? Could be fantastic!

openplus commented 11 years ago

I've been using the alfresco desktop sync (which has installs for most platforms)... But was looking at this for a secondary option, and also because the Alfresco one is still beta... But this this will still be our best option

Thanks

On Mar 4, 2013, at 6:31 AM, antton notifications@github.com wrote:

I'd like to continue on the investigation but I'm afraid of me porting to Mac, any other volunteer? @openplus what about you? do you have any knowledge on that? Could be fantastic!

— Reply to this email directly or view it on GitHub.

nicolas-raoul commented 10 years ago

We ported CmisSync to Mac, and solved all bugs we could find. Please download below it and let us know about any bug, thanks a lot :-) https://bitbucket.org/aegif/cmissync/downloads Cheers! Nicolas