Version 11 (modified by jazz, 12 years ago) (diff) |
---|
Compile ocsync from source on Ubuntu 12.04
Setup Develop Environment
- [Reference] http://gremu.net/blog/2010/building-csync-ubuntu-910/
- resolving dependencies :
- CMake
- check
- log4c
- sqlite3
- libiniparser
- libsmbclient
- libssh
-
jazz@precise:~$ sudo apt-get install build-essential cmake check liblog4c3 liblog4c-dev libsqlite3-0 libsqlite3-dev libsmbclient-dev doxygen libneon27-dev
- installing libiniparser
- [Reference] http://ndevilla.free.fr/iniparser/ - check the official website for newest release
jazz@precise:~$ wget http://ndevilla.free.fr/iniparser/iniparser-3.1.tar.gz jazz@precise:~$ tar zxvf iniparser-3.1.tar.gz jazz@precise:~$ (cd iniparser/; make; sudo cp libiniparser.* /usr/lib)
- resolving dependencies :
- We want to build Windows Client , so we will have to isntall 32/64 bits mingw-w64
jazz@precise:~$ sudo apt-get install mingw-w64 mingw-w64-dev g++-mingw-w64 gcc-mingw-w64
- We will need a cmake toolchain file
- [Reference] http://www.cmake.org/Wiki/CmakeMingw
jazz@precise:~$ wget http://www.cmake.org/Wiki/images/c/c2/Toolchain-cross-mingw32-linux.cmake
Download ocsync source tarball
- [Source] http://owncloud.org/sync-clients/
jazz@precise:~$ wget http://download.owncloud.com/download/ocsync-0.60.1.tar.bz2 jazz@precise:~$ tar jxvf ocsync-0.60.1.tar.bz2 jazz@precise:~$ cd ~/ocsync-0.60.1/build jazz@precise:~/ocsync-0.60.1/build$ cmake -DCMAKE_TOOLCHAIN_FILE=~/Toolchain-cross-mingw32-linux.cmake -DSQLITE3_INCLUDE_DIR=/usr/include -DSQLITE3_LIBRARY=/usr/lib/i386-linux-gnu/libsqlite3.so -DINIPARSER_INCLUDE_DIRS=~/iniparser/src/ -DINIPARSER_LIBRARIES=/usr/lib/libiniparser.so.0 .. jazz@precise:~/ocsync-0.60.1/build$ make
- [結論] 實際上,要用 mingw64 編譯 windows 程式,需要把所有相依的 library 都裝到 mingw64 底下才行。
- 解法一:OpenSUSE 有一系列的編譯,當然因為 OBS (Open Build Service) 的關係,也可以移植到 Ubuntu 上
- 解法二:另外有個人整理了一系列的 Toolchain for Linux - http://mxe.cc/