owncloud / client

🖥️ Desktop Syncing Client for ownCloud
GNU General Public License v2.0
1.39k stars 667 forks source link

Cross compile owncloud issue #1392

Closed technoabh closed 10 years ago

technoabh commented 10 years ago

i have build ocsync with following command

linux-5tpi:~/src/ocsync-build-win # mingw32-cmake -DCMAKE_BUILD_TYPE="Debug" ../ocsync
-- The C compiler identification is GNU 4.8.2
-- Check for working C compiler: /usr/bin/i686-w64-mingw32-gcc
-- Check for working C compiler: /usr/bin/i686-w64-mingw32-gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Performing Test WITH_FPIC
-- Performing Test WITH_FPIC - Success
-- Performing Test WITH_STACK_PROTECTOR
-- Performing Test WITH_STACK_PROTECTOR - Success
-- 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
-- Looking for __mingw_asprintf
-- Looking for __mingw_asprintf - found
-- Copy file from /root/src/ocsync/CTestCustom.cmake to /root/src/ocsync-build-win/CTestCustom.cmake
-- The CXX compiler identification is GNU 4.8.2
-- Check for working CXX compiler: /usr/bin/i686-w64-mingw32-g++
-- Check for working CXX compiler: /usr/bin/i686-w64-mingw32-g++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.28") 
-- checking for module 'neon'
--   found neon, version 0.30.0
-- Found Neon: /usr/i686-w64-mingw32/sys-root/mingw/lib/libneon.dll.a  
-- neon-config executable: /usr/i686-w64-mingw32/sys-root/mingw/bin/neon-config
-- libneon has been compiled with LFS support
-- Found SQLite3: /usr/i686-w64-mingw32/sys-root/mingw/lib/libsqlite3.dll.a (Required is at least version "3.3.9") 
-- Found Neon: /usr/i686-w64-mingw32/sys-root/mingw/lib/libneon.dll.a (Required is at least version "0.29.0") 
-- neon-config executable: /usr/i686-w64-mingw32/sys-root/mingw/bin/neon-config
-- libneon has been compiled with LFS support
-- Copy file from /root/src/ocsync/config/ocsync.conf to /root/src/ocsync-build-win/config/ocsync.conf
-- Copy file from /root/src/ocsync/config/ocsync_exclude.conf to /root/src/ocsync-build-win/config/ocsync_exclude.conf
-- Could NOT find Doxygen (missing:  DOXYGEN_EXECUTABLE) 
-- Configuring done
-- Generating done
CMake Warning:
  Manually-specified variables were not used by the project:

    SHARE_INSTALL_DIR

-- Build files have been written to: /root/src/ocsync-build-win
--------------------------------------------------------------------------------------------------------------

After That  execute 

linux-5tpi:~/src/ocsync-build-win # mingw32-make

[100%] Building C object src/CMakeFiles/ocsync.dir/csync_owncloud_util.c.obj
cd /root/src/ocsync-build-win/src && /usr/bin/i686-w64-mingw32-gcc  -D__USE_MINGW_ANSI_STDIO=1 -Docsync_EXPORTS -O2 -g -pipe -Wall -fexceptions --param=ssp-buffer-size=4 -mms-bitfields  -std=gnu99 -pedantic -pedantic-errors -Wall -Wextra -Wshadow -Wmissing-prototypes -Wdeclaration-after-statement -Wunused -Wfloat-equal -Wpointer-arith -Wwrite-strings -Wformat-security -Wmissing-format-attribute -Wmissing-format-attribute -D_GNU_SOURCE -D__STDC_FORMAT_MACROS=1 -D_FILE_OFFSET_BITS=64 -g @CMakeFiles/ocsync.dir/includes_C.rsp   -o CMakeFiles/ocsync.dir/csync_owncloud_util.c.obj   -c /root/src/ocsync/src/csync_owncloud_util.c
Linking CXX shared library libocsync.dll
cd /root/src/ocsync-build-win/src && /usr/bin/cmake -E cmake_link_script CMakeFiles/ocsync.dir/link.txt --verbose=1
/usr/bin/cmake -E remove -f CMakeFiles/ocsync.dir/objects.a
/usr/bin/i686-w64-mingw32-ar cr CMakeFiles/ocsync.dir/objects.a @CMakeFiles/ocsync.dir/objects1.rsp
/usr/bin/i686-w64-mingw32-g++    -Wl,--exclude-libs=libintl.a -Wl,--exclude-libs=libiconv.a -Wl,--no-keep-memory -shared -o libocsync.dll -Wl,--out-implib,libocsync.dll.a -Wl,--major-image-version,0,--minor-image-version,2 -Wl,--whole-archive CMakeFiles/ocsync.dir/objects.a -Wl,--no-whole-archive std/libcstdlib.a -lshlwapi -lpsapi -lkernel32 -lsqlite3 -lneon httpbf/libhttpbf.a -Wl,-Bstatic -lshlwapi -Wl,-Bdynamic -lneon -lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -luuid -lcomdlg32 -ladvapi32 
make[2]: Leaving directory `/root/src/ocsync-build-win'
/usr/bin/cmake -E cmake_progress_report /root/src/ocsync-build-win/CMakeFiles  10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
[100%] Built target ocsync
make[1]: Leaving directory `/root/src/ocsync-build-win'
/usr/bin/cmake -E cmake_progress_start /root/src/ocsync-build-win/CMakeFiles 0

--------------------------------------------------------------------------------------------------------------
Building mirall
-------------------------

linux-5tpi:~/src/mirall-build-win # mingw32-cmake -DCMAKE_BUILD_TYPE="Debug" ../mirall -DCSYNC_BUILD_PATH=/root/src/ocsync-build-win       -DCSYNC_INCLUDE_PATH=/root/src/ocsync/src -DCSYNC_LIBRARY_PATH=/root/src/ocsync-build-win       -DCMAKE_TOOLCHAIN_FILE=../mirall/admin/win/Toolchain-mingw32-openSUSE.cmake
-- The C compiler identification is GNU 4.8.2
-- The CXX compiler identification is GNU 4.8.2
-- Check for working C compiler: /usr/bin/i686-w64-mingw32-gcc
-- Check for working C compiler: /usr/bin/i686-w64-mingw32-gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/i686-w64-mingw32-g++
-- Check for working CXX compiler: /usr/bin/i686-w64-mingw32-g++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Could not find Qt5, searching for Qt4 instead...
-- Looking for Q_WS_X11
-- Looking for Q_WS_X11 - not found
-- Looking for Q_WS_WIN
-- Looking for Q_WS_WIN - found
-- Looking for Q_WS_QWS
-- Looking for Q_WS_QWS - not found
-- Looking for Q_WS_MAC
-- Looking for Q_WS_MAC - not found
-- Found OpenGL: opengl32  
-- Found ZLIB: /usr/i686-w64-mingw32/sys-root/mingw/lib/libz.dll.a (found version "1.2.8") 
-- Found PNG: /usr/i686-w64-mingw32/sys-root/mingw/lib/libpng.dll.a (found version "1.5.17") 
-- Could NOT find JPEG (missing:  JPEG_LIBRARY JPEG_INCLUDE_DIR) 
-- Could NOT find TIFF (missing:  TIFF_LIBRARY TIFF_INCLUDE_DIR) 
-- Found Qt4: i686-w64-mingw32-qmake (found suitable version "4.8.4", minimum required is "4.7.0") 
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.28") 
-- checking for module 'neon'
--   found neon, version 0.30.0
-- Found Neon: /usr/i686-w64-mingw32/sys-root/mingw/lib/libneon.dll.a  
-- neon-config executable: /usr/i686-w64-mingw32/sys-root/mingw/bin/neon-config
-- libneon has been compiled with LFS support
-- Found QtKeyChain: /usr/i686-w64-mingw32/sys-root/mingw/bin/libqtkeychain.dll  
-- Could NOT find Sparkle (missing:  SPARKLE_INCLUDE_DIR SPARKLE_LIBRARY) 
-- Could NOT find INOTIFY (missing:  INOTIFY_INCLUDE_DIR) 
-- Could NOT find Sphinx (missing:  SPHINX_EXECUTABLE) 
-- Could NOT find PdfLatex (missing:  PDFLATEX_EXECUTABLE) 
-- Performing Test WITH_FPIC
-- Performing Test WITH_FPIC - Success
-- Performing Test WITH_STACK_PROTECTOR
-- Performing Test WITH_STACK_PROTECTOR - Success
-- 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
-- Looking for __mingw_asprintf
-- Looking for __mingw_asprintf - found
-- Copy file from /root/src/mirall/csync/CTestCustom.cmake to /root/src/mirall-build-win/csync/CTestCustom.cmake
-- neon-config executable: /usr/i686-w64-mingw32/sys-root/mingw/bin/neon-config
-- libneon has been compiled with LFS support
-- Found SQLite3: /usr/i686-w64-mingw32/sys-root/mingw/lib/libsqlite3.dll.a (Required is at least version "3.3.9") 
-- Configuring done
-- Generating done
CMake Warning:
  Manually-specified variables were not used by the project:

    CSYNC_BUILD_PATH
    CSYNC_INCLUDE_PATH
    CSYNC_LIBRARY_PATH
    SHARE_INSTALL_DIR
    SHARE_INSTALL_PREFIX

-- Build files have been written to: /root/src/mirall-build-win

Now after that executed 

libupdater.a(ocupdater.cpp.obj): In function `ZN6Mirall9OCUpdaterC2ERK4QUrlP7QObject':
/root/src/mirall/src/updater/ocupdater.cpp:42: undefined reference to `Mirall::MirallAccessManager::MirallAccessManager(QObject*)'
libupdater.a(ocupdater.cpp.obj): In function `ZN6Mirall9OCUpdater18slotSetVersionSeenEv':
/root/src/mirall/src/updater/ocupdater.cpp:151: undefined reference to `Mirall::MirallConfigFile::setSeenVersion(QString const&)'
libupdater.a(ocupdater.cpp.obj): In function `ZNK6Mirall9OCUpdater15updateSucceededEv':
/root/src/mirall/src/updater/ocupdater.cpp:173: undefined reference to `Mirall::MirallConfigFile::configFile() const'
libupdater.a(ocupdater.cpp.obj): In function `ZNK6Mirall11NSISUpdater11updateStateEv':
/root/src/mirall/src/updater/ocupdater.cpp:332: undefined reference to `Mirall::MirallConfigFile::configFile() const'
libupdater.a(ocupdater.cpp.obj): In function `ZN6Mirall21PassiveUpdateNotifier18versionInfoArrivedERKNS_10UpdateInfoE':
/root/src/mirall/src/updater/ocupdater.cpp:378: undefined reference to `Mirall::MirallConfigFile::seenVersion() const'
libupdater.a(ocupdater.cpp.obj): In function `ZN6Mirall9OCUpdater18slotStartInstallerEv':
/root/src/mirall/src/updater/ocupdater.cpp:107: undefined reference to `Mirall::MirallConfigFile::configFile() const'
libupdater.a(ocupdater.cpp.obj): In function `ZN6Mirall9OCUpdater13performUpdateEv':
/root/src/mirall/src/updater/ocupdater.cpp:50: undefined reference to `Mirall::MirallConfigFile::configFile() const'
libupdater.a(ocupdater.cpp.obj): In function `ZN6Mirall9OCUpdater14checkForUpdateEv':
/root/src/mirall/src/updater/ocupdater.cpp:120: undefined reference to `Mirall::Utility::isLinux()'
/root/src/mirall/src/updater/ocupdater.cpp:124: undefined reference to `Mirall::Utility::isMac()'
libupdater.a(ocupdater.cpp.obj): In function `ZN6Mirall11NSISUpdater20slotDownloadFinishedEv':
/root/src/mirall/src/updater/ocupdater.cpp:238: undefined reference to `Mirall::MirallConfigFile::configFile() const'
libupdater.a(ocupdater.cpp.obj): In function `ZN6Mirall11NSISUpdater18versionInfoArrivedERKNS_10UpdateInfoE':
/root/src/mirall/src/updater/ocupdater.cpp:252: undefined reference to `Mirall::MirallConfigFile::seenVersion() const'
/root/src/mirall/src/updater/ocupdater.cpp:263: undefined reference to `Mirall::MirallConfigFile::configPath() const'
collect2: error: ld returned 1 exit status
make[2]: *** [bin/owncloud.exe] Error 1
make[2]: Leaving directory `/root/src/mirall-build-win'
make[1]: *** [src/CMakeFiles/owncloud.dir/all] Error 2
make[1]: Leaving directory `/root/src/mirall-build-win'
make: *** [all] Error 2
linux-5tpi:~/src/mirall-build-win # 

I have sucessfully compiled for linux arch & its working well, But i am not able to compile for windows platform, Kindly do the needful.

OS : Suse : 13.1 Arch : 32 bit

danimo commented 10 years ago

Master was broken, it should work again