Hello all,
I tried to compile zabbix-server under Cygwin a few times and it always brings me to the following points below.
Before you think I didn't search this forum/google already ... I did search the forum & Google, but it all ended up with nothing in the end. And it appears that there hasn't been much effort into it. Correct me if I'm wrong, I'd be happy to follow up on it.
The build efforts:
- ./Configure goes fine:
- make fails because of winsock.h issues:
Now, seeing that many other (similar) services compile fine under Cygwin with some minor modifications ... it can't be that hard to adapt the code to make it compile under Cygwin too?
Problem is that I have no clue what the cause of this error is. I think it complains that some functions/types have already been declared before. Probably because the winsock w32api is different than the one for which zabbix was made. Correct? Can someone give me directions? Does someone have experience with porting?
PS. Please share any useful information. And keep in mind I want to make a port, not run zabbix-server on a virtual machine.
I tried to compile zabbix-server under Cygwin a few times and it always brings me to the following points below.
Before you think I didn't search this forum/google already ... I did search the forum & Google, but it all ended up with nothing in the end. And it appears that there hasn't been much effort into it. Correct me if I'm wrong, I'd be happy to follow up on it.
The build efforts:
- ./Configure goes fine:
Detected OS: cygwin
Install path: /usr/local
Compilation arch: unknown
Compiler: gcc
Compiler flags: -g -O2 -I/usr/local/include/mysql
Enable server: yes
With database: MySQL
WEB Monitoring via: no
Native Jabber: no
SNMP: no
IPMI: no
Linker flags: -L/usr/local/lib/mysql
Libraries: -lm -lmysqlclient
Enable proxy: no
Enable agent: no
LDAP support: no
IPv6 support: no
************************************************** *********
* Now run 'make install' *
* *
* Thank you for using ZABBIX! *
* <http://www.zabbix.com> *
************************************************** *********
See full output
Install path: /usr/local
Compilation arch: unknown
Compiler: gcc
Compiler flags: -g -O2 -I/usr/local/include/mysql
Enable server: yes
With database: MySQL
WEB Monitoring via: no
Native Jabber: no
SNMP: no
IPMI: no
Linker flags: -L/usr/local/lib/mysql
Libraries: -lm -lmysqlclient
Enable proxy: no
Enable agent: no
LDAP support: no
IPv6 support: no
************************************************** *********
* Now run 'make install' *
* *
* Thank you for using ZABBIX! *
* <http://www.zabbix.com> *
************************************************** *********
See full output
- make fails because of winsock.h issues:
/usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../include/w32api/winsock2.h:103:2: warning: #warning "fd_set and associated macros have been defined in sys/types. This may cause runtime problems with W32 sockets"
In file included from ../../../include/sysinc.h:152,
from ../../../include/common.h:23,
from md5.c:54:
/usr/include/netdb.h:73: error: redefinition of `struct hostent'
/usr/include/netdb.h:87: error: redefinition of `struct netent'
/usr/include/netdb.h:94: error: redefinition of `struct servent'
/usr/include/netdb.h:102: error: redefinition of `struct protoent'
/usr/include/netdb.h:122: error: conflicting types for 'WSAGetLastError'
/usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../include/w32api/winsock2.h:594: error: previous declaration of 'WSAGetLastError' was here
/usr/include/netdb.h:122: error: conflicting types for 'WSAGetLastError'
...
See full output
In file included from ../../../include/sysinc.h:152,
from ../../../include/common.h:23,
from md5.c:54:
/usr/include/netdb.h:73: error: redefinition of `struct hostent'
/usr/include/netdb.h:87: error: redefinition of `struct netent'
/usr/include/netdb.h:94: error: redefinition of `struct servent'
/usr/include/netdb.h:102: error: redefinition of `struct protoent'
/usr/include/netdb.h:122: error: conflicting types for 'WSAGetLastError'
/usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../include/w32api/winsock2.h:594: error: previous declaration of 'WSAGetLastError' was here
/usr/include/netdb.h:122: error: conflicting types for 'WSAGetLastError'
...
See full output
Now, seeing that many other (similar) services compile fine under Cygwin with some minor modifications ... it can't be that hard to adapt the code to make it compile under Cygwin too?
Problem is that I have no clue what the cause of this error is. I think it complains that some functions/types have already been declared before. Probably because the winsock w32api is different than the one for which zabbix was made. Correct? Can someone give me directions? Does someone have experience with porting?
PS. Please share any useful information. And keep in mind I want to make a port, not run zabbix-server on a virtual machine.

Comment