我在Windows Server 2008 R2上完成了cygwin的全部安裝,並且我下載了Squid3.4.4源碼。我運行了./configure [options]命令,然後下一步是製作和安裝squid。Cygwin - 魷魚出錯
當我運行make時,我得到了很多錯誤。這裏是我看到的一個樣本:
$ make Making all in compat make[1]: Entering directory '/home/Administrator/squid-3.4.4/compat' /bin/sh ../libtool --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H -I.. -I../include -I../lib -I../src -I../include -I/usr/include -I/usr/include -I/usr/include -I/usr/include -I/usr/include -I/usr/include -I/usr/include -I/usr/include -Wall -Wpointer-arith -Wwrite-strings -Wcomments -Wshadow -Werror -pipe -D_REENTRANT -g -O2 -march=native -std=c++0x -MT assert.lo -MD -MP -MF .deps/assert.Tpo -c -o assert.lo assert.cc libtool: compile: g++ -DHAVE_CONFIG_H -I.. -I../include -I../lib -I../src -I../include -I/usr/include -I/usr/include -I/usr/include -I/usr/include -I/usr/include -I/usr/include -I/usr/include -I/usr/include -Wall -Wpointer-arith -Wwrite-strings -Wcomments -Wshadow -Werror -pipe -D_REENTRANT -g -O2 -march=native -std=c++0x -MT assert.lo -MD -MP -MF .deps/assert.Tpo -c assert.cc -DDLL_EXPORT -DPIC -o .libs/assert.o In file included from ../compat/compat.h:64:0, from ../include/squid.h:66, from assert.cc:32: ../compat/os/mswindows.h:152:0: error: "O_RDONLY" redefined [-Werror] #define O_RDONLY
_O_RDONLY^In file included from /usr/include/sys/fcntl.h:3:0, from /usr/include/fcntl.h:14, from ../compat/os/mswindows.h:48, from ../compat/compat.h:64, from ../include/squid.h:66, from assert.cc:32: /usr/include/sys/_default_fcntl.h:34:0: note: this is the location of the previous definition #define O_RDONLY 0 /* +1 == FREAD */^In file included from ../compat/compat.h:64:0, from ../include/squid.h:66, from assert.cc:32: ../compat/os/mswindows.h:153:0: error: "O_WRONLY" redefined [-Werror] #define O_WRONLY
_O_WRONLY^In file included from /usr/include/sys/fcntl.h:3:0, from /usr/include/fcntl.h:14, from ../compat/os/mswindows.h:48, from ../compat/compat.h:64, from ../include/squid.h:66, from assert.cc:32: /usr/include/sys/_default_fcntl.h:35:0: note: this is the location of the previous definition #define O_WRONLY 1 /* +1 == FWRITE */^In file included from ../compat/compat.h:64:0, from ../include/squid.h:66, from assert.cc:32: ../compat/os/mswindows.h:154:0: error: "O_RDWR" redefined [-Werror] #define O_RDWR _O_RDWR ^In file included from /usr/include/sys/fcntl.h:3:0, from /usr/include/fcntl.h:14, from ../compat/os/mswindows.h:48, from ../compat/compat.h:64, from ../include/squid.h:66, from assert.cc:32: /usr/include/sys/_default_fcntl.h:36:0: note: this is the location of the previous definition #define O_RDWR 2 /* +1 == FREAD|FWRITE */ ^In file included from ../compat/compat.h:64:0, from ../include/squid.h:66, from assert.cc:32: ../compat/os/mswindows.h:155:0: error: "O_APPEND" redefined [-Werror] #define O_APPEND
_O_APPEND^In file included from /usr/include/sys/fcntl.h:3:0, from /usr/include/fcntl.h:14, from ../compat/os/mswindows.h:48, from ../compat/compat.h:64, from ../include/squid.h:66, from assert.cc:32: /usr/include/sys/_default_fcntl.h:37:0: note: this is the location of the previous definition #define O_APPEND _FAPPEND^In file included from ../compat/compat.h:64:0, from ../include/squid.h:66, from assert.cc:32: ../compat/os/mswindows.h:157:0: error: "O_CREAT" redefined [-Werror] #define O_CREAT _O_CREAT ^In file included from /usr/include/sys/fcntl.h:3:0, from /usr/include/fcntl.h:14, from ../compat/os/mswindows.h:48, from ../compat/compat.h:64, from ../include/squid.h:66, from assert.cc:32: /usr/include/sys/_default_fcntl.h:38:0: note: this is the location of the previous definition #define O_CREAT _FCREAT^In file included from ../compat/compat.h:64:0, from ../include/squid.h:66, from assert.cc:32: ../compat/os/mswindows.h:158:0: error: "O_TRUNC" redefined [-Werror] #define O_TRUNC _O_TRUNC ^In file included from /usr/include/sys/fcntl.h:3:0, from /usr/include/fcntl.h:14, from ../compat/os/mswindows.h:48, from ../compat/compat.h:64, from ../include/squid.h:66, from assert.cc:32: /usr/include/sys/_default_fcntl.h:39:0: note: this is the location of the previous definition #define O_TRUNC _FTRUNC^In file included from ../compat/compat.h:64:0, from ../include/squid.h:66, from assert.cc:32: ../compat/os/mswindows.h:159:0: error: "O_EXCL" redefined [-Werror] #define O_EXCL _O_EXCL ^In file included from /usr/include/sys/fcntl.h:3:0, from /usr/include/fcntl.h:14, from ../compat/os/mswindows.h:48, from ../compat/compat.h:64, from ../include/squid.h:66, from assert.cc:32: /usr/include/sys/_default_fcntl.h:40:0: note: this is the location of the previous definition #define O_EXCL _FEXCL^In file included from ../compat/compat.h:64:0, from ../include/squid.h:66, from assert.cc:32: ../compat/os/mswindows.h:161:0: error: "O_TEXT" redefined [-Werror] #define O_TEXT _O_TEXT ^In file included from /usr/include/sys/fcntl.h:3:0, from /usr/include/fcntl.h:14, from ../compat/os/mswindows.h:48, from ../compat/compat.h:64, from ../include/squid.h:66, from assert.cc:32: /usr/include/sys/_default_fcntl.h:53:0: note: this is the location of the previous definition #define O_TEXT _FTEXT
我不熟悉C++。任何想法可能會造成這種情況?