Zekeriya Akgül
Zekeriya Akgül

Reputation: 318

Building Seafile-Client on windows with using cygwin

I try to building seafile-client on windows with using cygwin. When i call ./configure command it detect build system as Linux

...
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking for special C compiler options needed for large files... no
checking for _FILE_OFFSET_BITS value needed for large files... no
checking for WIN32... no
checking for Mac... no
checking for Linux... compile in linux
checking for uuid_generate in -luuid... yes
found library uuid
...

it configure successfuly but when i call the make command it occur a lot of error. I guess it's because of it detect the build system as linux, but i think it must be windows. How can i do for solve this?

make error output:

Making all in daemon
make[2]: Entering directory '/cygdrive/c/msys/1.0/home/seafile-6.2.4/daemon'
gcc -DHAVE_CONFIG_H -I. -I..    -DPKGDATADIR=\"/usr/local/share/seafile\" -DPACKAGE_DATA_DIR=\""/usr/local/share/seafile"\" -DSEAFILE_CLIENT -I../include -I../lib -I../lib -I../common -D_REENTRANT -I/usr/local/include -I/usr/local/include/searpc -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -Wall -g -O2 -MT http-tx-mgr.o -MD -MP -MF .deps/http-tx-mgr.Tpo -c -o http-tx-mgr.o http-tx-mgr.c
http-tx-mgr.c: 'http_get' işlevinde:
http-tx-mgr.c:741:91: hata: expected ')' before 'USER_AGENT_OS'
     headers = curl_slist_append (headers, "User-Agent: Seafile/"SEAFILE_CLIENT_VERSION" ("USER_AGENT_OS")");
                                                                                           ^~~~~~~~~~~~~
http-tx-mgr.c: 'http_put' işlevinde:
http-tx-mgr.c:865:91: hata: expected ')' before 'USER_AGENT_OS'
     headers = curl_slist_append (headers, "User-Agent: Seafile/"SEAFILE_CLIENT_VERSION" ("USER_AGENT_OS")");
                                                                                           ^~~~~~~~~~~~~
http-tx-mgr.c: 'http_post' işlevinde:
http-tx-mgr.c:982:91: hata: expected ')' before 'USER_AGENT_OS'
     headers = curl_slist_append (headers, "User-Agent: Seafile/"SEAFILE_CLIENT_VERSION" ("USER_AGENT_OS")");
                                                                                           ^~~~~~~~~~~~~
Üst düzeyde:
http-tx-mgr.c:507:1: UYARI: 'load_ca_bundle' defined but not used [-Wunused-function]
 load_ca_bundle (CURL *curl)
 ^~~~~~~~~~~~~~
make[2]: *** [Makefile:581: http-tx-mgr.o] Error 1
make[2]: Leaving directory '/cygdrive/c/msys/1.0/home/seafile-6.2.4/daemon'
make[1]: *** [Makefile:444: all-recursive] Error 1
make[1]: Leaving directory '/cygdrive/c/msys/1.0/home/seafile-6.2.4'
make: *** [Makefile:376: all] Error 2

this code written for cross-compile and contains many definition like below:

...
#ifdef WIN32
#include <windows.h>
#include <wincrypt.h>
#endif
...
#ifndef SEAFILE_CLIENT_VERSION
#define SEAFILE_CLIENT_VERSION PACKAGE_VERSION
#endif

#ifdef WIN32
#define USER_AGENT_OS "Windows NT"
#endif

#ifdef __APPLE__
#define USER_AGENT_OS "Apple OS X"
#endif

#ifdef __linux__
#define USER_AGENT_OS "Linux"
#endif

#if defined __FreeBSD__ || defined __NetBSD__ || defined __OpenBSD__ || defined __DragonFly__
#define USER_AGENT_OS "BSD"
#endif
...

Upvotes: 0

Views: 190

Answers (0)

Related Questions