Hi,

Klaas told me that it is now possible to compile csync natively for Windows.
Does anybody known how?

I tried and got an unknown type error:
winbase.h:1538:77: Fehler: unbekannter Typname: »va_list«

Woboq
had the same problem and pasted compilation results here:
http://pastebin.com/hNwaTWTm

Below you find a log of what I did so far.

Thanks,
Luke

PS: My goal is to implement change notifications instead of polling for Windows. Compiling natively seems the best choice.





    Install Cygwin with package wget

     

    wget http://apt-cyg.googlecode.com/svn/trunk/apt-cyg
    chmod +x apt-cyg
    mv apt-cyg /usr/local/bin/

     

    apt-cyg install git

    apt-cyg install ca-certificates

     

    git clone https://github.com/LukeOwncloud/mirall.git

    git clone git://git.csync.org/users/freitag/csync.git ocsync

     

    mkdir ocsync-build
    mkdir mirall-build

     

    cd ocsync
    git checkout dav

     

     

    Install Cmake and minGw.

    http://sourceforge.net/projects/mingw/files/Installer/mingw-get-inst/

    Add C++ compiler and MinGW developer kit

    Add c:\MinGW\bin\ to path

     

    http://www.cmake.org/files/v2.8/cmake-2.8.10.1-win32-x86.exe

     

    Open cmd change to ocsync-build

     

    cmake -G "Eclipse CDT4 - MinGW Makefiles" -DCMAKE_BUILD_TYPE="Debug" -DLOG_TO_CALLBACK=ON -DWITH_LOG4C=OFF ../ocsync

     

    Output:

    -- Could not determine Eclipse version, assuming at least 3.6 (Helios). Adjust CMAKE_ECLIPSE_VERSION if this is wrong.

    -- Could NOT find Log4C (missing:  LOG4C_LIBRARIES LOG4C_INCLUDE_DIRS)

    -- Could NOT find CMocka (missing:  CMOCKA_LIBRARIES CMOCKA_INCLUDE_DIR)

    -- Looking for argp.h

    -- Looking for argp.h - not found

    -- Looking for nanosleep in rt

    -- Looking for nanosleep in rt - not found

    -- Looking for clock_gettime in rt

    -- Looking for clock_gettime in rt - not found

    -- Looking for dlopen in dl

    -- Looking for dlopen in dl - not found

    -- Looking for asprintf

    -- Looking for asprintf - not found

    -- Looking for fnmatch

    -- Looking for fnmatch - not found

    -- Looking for timegm

    -- Looking for timegm - not found

    -- Looking for strerror_r

    -- Looking for strerror_r - not found

    -- Looking for utimes

    -- Looking for utimes - not found

    -- Looking for lstat

    -- Looking for lstat - not found

    -- Could NOT find PkgConfig (missing:  PKG_CONFIG_EXECUTABLE)

    CMake Error at cmake/Modules/FindSQLite3.cmake:82 (message):

      Could not find SQLite3

    Call Stack (most recent call first):

      src/CMakeLists.txt:13 (find_package)

     

     

    CMake Error: The following variables are used in this project, but they are set to NOTFOUND.

    Please set them or make sure they are set and tested correctly in the CMake files:

    SHLWAPI_LIBRARY

        linked by target "cstdlib" in directory C:/Eigene Dateien/Eigene Programme/C/ocsync/src/std

     

    -- Configuring incomplete, errors occurred!

     

    Download and extract next to ocsync and ocsync-build:

    http://www.sqlite.org/sqlite-shell-win32-x86-3071401.zip

    http://www.sqlite.org/sqlite-dll-win32-x86-3071401.zip

    http://www.sqlite.org/sqlite-amalgamation-3071401.zip

     

    Second try

    cmake -G "Eclipse CDT4 - MinGW Makefiles" -DCMAKE_BUILD_TYPE="Debug" -DLOG_TO_CALLBACK=ON -DWITH_LOG4C=OFF -DSQLITE3_LIBRARIES="..\sqlite3" ../ocsync

     

    Ouput:

    -- Could not determine Eclipse version, assuming at least 3.6 (Helios). Adjust CMAKE_ECLIPSE_VERSION if this is wrong.

    -- Could NOT find Log4C (missing:  LOG4C_LIBRARIES LOG4C_INCLUDE_DIRS)

    -- Could NOT find CMocka (missing:  CMOCKA_LIBRARIES CMOCKA_INCLUDE_DIR)

    -- Could NOT find PkgConfig (missing:  PKG_CONFIG_EXECUTABLE)

    -- Found SQLite3: c:\Bin\Daten\sqlite3

    CMake Error at C:/Program Files (x86)/CMake 2.8/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:97 (message):

      Could NOT find Iniparser (missing: INIPARSER_LIBRARIES

      INIPARSER_INCLUDE_DIRS)

    Call Stack (most recent call first):

      C:/Program Files (x86)/CMake 2.8/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:291 (_FPHSA_FAILURE_MESSAGE)

      cmake/Modules/FindIniparser.cmake:36 (find_package_handle_standard_args)

      src/CMakeLists.txt:14 (find_package)

     

     

    CMake Error: The following variables are used in this project, but they are set to NOTFOUND.

    Please set them or make sure they are set and tested correctly in the CMake files:

    SHLWAPI_LIBRARY

        linked by target "cstdlib" in directory C:/Eigene Dateien/Eigene Programme/C/ocsync/src/std

     

    -- Configuring incomplete, errors occurred!

     

    Download and extract next to ocsync and ocsync-build

    http://ndevilla.free.fr/iniparser/iniparser-3.1.tar.gz

     

    Third try:

    cmake -G "Eclipse CDT4 - MinGW Makefiles" -DCMAKE_BUILD_TYPE="Debug" -DLOG_TO_CALLBACK=ON -DWITH_LOG4C=OFF -DSQLITE3_LIBRARIES="..\sqlite3" -DINIPARSER_LIBRARIES="..\iniparser" -DINIPARSER_INCLUDE_DIRS="..\iniparser\src" ../ocsync

     

    Output:

    -- Could not determine Eclipse version, assuming at least 3.6 (Helios). Adjust CMAKE_ECLIPSE_VERSION if this is wrong.

    -- Could NOT find Log4C (missing:  LOG4C_LIBRARIES LOG4C_INCLUDE_DIRS)

    -- Could NOT find CMocka (missing:  CMOCKA_LIBRARIES CMOCKA_INCLUDE_DIR)

    -- Could NOT find PkgConfig (missing:  PKG_CONFIG_EXECUTABLE)

    -- Found SQLite3: c:\Bin\Daten\sqlite3

    -- Found Iniparser: C:/Eigene Dateien/Eigene Programme/C/iniparser

    -- Could NOT find PkgConfig (missing:  PKG_CONFIG_EXECUTABLE)

    -- Could NOT find Neon (missing:  NEON_LIBRARIES NEON_INCLUDE_DIRS)

    -- Could NOT find Doxygen (missing:  DOXYGEN_EXECUTABLE)

    CMake Error: The following variables are used in this project, but they are set to NOTFOUND.

    Please set them or make sure they are set and tested correctly in the CMake files:

    SHLWAPI_LIBRARY

        linked by target "cstdlib" in directory C:/Eigene Dateien/Eigene Programme/C/ocsync/src/std

     

    -- Configuring incomplete, errors occurred!

     

     

    Empty folder ocsync-build and retry. If still SHLWAPI_LIBRARY not found, try:

     

    Download

    Microsoft Windows SDK for Windows 7 and .NET Framework 4

    wget http://download.microsoft.com/download/F/1/0/F10113F5-B750-4969-A255-274341AC6BCE/GRMSDK_EN_DVD.iso

     

    Extract iso using uniextract.

    Run and install GRMSDK_EN_DVD\Setup\WinSDKBuild\WinSDKBuild_x86.msi (using uniextract does not work!)

    Files are available at:

    c:\Program Files (x86)\Microsoft SDKs\Windows\v7.1\Include\Shlwapi.h

    c:\Program Files (x86)\Microsoft SDKs\Windows\v7.1\Lib\ShLwApi.Lib

     

    If cmake succeeds:

    mingw32-make

     

    Scanning dependencies of target cstdlib

    [  3%] Building C object src/std/CMakeFiles/cstdlib.dir/c_alloc.c.obj

    [  7%] Building C object src/std/CMakeFiles/cstdlib.dir/c_dir.c.obj

    In file included from C:\Eigene Dateien\Eigene Programme\C\ocsync\src\std\/c_private.h:31:0,

                     from C:\Eigene Dateien\Eigene Programme\C\ocsync\src\std\c_dir.c:9:

    c:\mingw\bin\../lib/gcc/mingw32/4.6.2/../../../../include/winbase.h:1538:77: Fehler: unbekannter Typname: »va_list«

    c:\mingw\bin\../lib/gcc/mingw32/4.6.2/../../../../include/winbase.h:1539:78: Fehler: unbekannter Typname: »va_list«

    In file included from C:\Eigene Dateien\Eigene Programme\C\ocsync\src\std\c_dir.c:9:0:

    C:\Eigene Dateien\Eigene Programme\C\ocsync\src\std\/c_private.h:78:21: Fehler: In Konflikt stehende Typen für »_TCHAR«

    c:\mingw\bin\../lib/gcc/mingw32/4.6.2/../../../../include/winnt.h:121:14: Anmerkung: Vorherige Deklaration von »_TCHAR« war hier

    C:\Eigene Dateien\Eigene Programme\C\ocsync\src\std\c_dir.c: In Funktion »c_rmdirs«:

    C:\Eigene Dateien\Eigene Programme\C\ocsync\src\std\c_dir.c:106:11: Warnung: Übergabe des Arguments 1 von »closedir« von inkompatiblem Zeigertyp [standardmäßig aktiviert]

    c:\mingw\bin\../lib/gcc/mingw32/4.6.2/../../../../include/dirent.h:62:29: Anmerkung: »struct DIR *« erwartet, aber Argument hat Typ »struct _WDIR *«

    mingw32-make[2]: *** [src/std/CMakeFiles/cstdlib.dir/c_dir.c.obj] Error 1

    mingw32-make[1]: *** [src/std/CMakeFiles/cstdlib.dir/all] Error 2

    mingw32-make: *** [all] Error 2





_______________________________________________
Owncloud mailing list
[email protected]
https://mail.kde.org/mailman/listinfo/owncloud

Reply via email to