linux下安装fcgi报错

今天安装fcgi,编译的时候报错:

cd . \
          && CONFIG_FILES= CONFIG_HEADERS=fcgi_config.h \
             /bin/sh ./config.status
config.status: creating fcgi_config.h
config.status: fcgi_config.h is unchanged
make  all-recursive
make[1]: Entering directory `/opt/install/fcgi-2.4.1-SNAP-0311112127'
Making all in libfcgi
make[2]: Entering directory `/opt/install/fcgi-2.4.1-SNAP-0311112127/libfcgi'
source='fcgiapp.c' object='libfcgi_la-fcgiapp.lo' libtool=yes \
        depfile='.deps/libfcgi_la-fcgiapp.Plo' tmpdepfile='.deps/libfcgi_la-fcgiapp.TPlo' \
        depmode=gcc3 /bin/sh ../depcomp \
        /bin/sh ../libtool --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I..   -I../include -pthread -g -O2 -Wall -c -o libfcgi_la-fcgiapp.lo `test -f fcgiapp.c || echo './'`fcgiapp.c
mkdir .libs
gcc -DHAVE_CONFIG_H -I. -I. -I.. -I../include -pthread -g -O2 -Wall -c fcgiapp.c -MT libfcgi_la-fcgiapp.lo -MD -MP -MF .deps/libfcgi_la-fcgiapp.TPlo  -fPIC -DPIC -o .libs/libfcgi_la-fcgiapp.lo
fcgiapp.c: In function 'ProcessManagementRecord':
fcgiapp.c:1490: warning: dereferencing type-punned pointer will break strict-aliasing rules
fcgiapp.c:1495: warning: dereferencing type-punned pointer will break strict-aliasing rules
fcgiapp.c:1498: warning: dereferencing type-punned pointer will break strict-aliasing rules
gcc -DHAVE_CONFIG_H -I. -I. -I.. -I../include -pthread -g -O2 -Wall -c fcgiapp.c -MT libfcgi_la-fcgiapp.lo -MD -MP -MF .deps/libfcgi_la-fcgiapp.TPlo -o libfcgi_la-fcgiapp.o >/dev/null 2>&1
mv -f .libs/libfcgi_la-fcgiapp.lo libfcgi_la-fcgiapp.lo
source='fcgi_stdio.c' object='libfcgi_la-fcgi_stdio.lo' libtool=yes \
        depfile='.deps/libfcgi_la-fcgi_stdio.Plo' tmpdepfile='.deps/libfcgi_la-fcgi_stdio.TPlo' \
        depmode=gcc3 /bin/sh ../depcomp \
        /bin/sh ../libtool --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I..   -I../include -pthread -g -O2 -Wall -c -o libfcgi_la-fcgi_stdio.lo `test -f fcgi_stdio.c || echo './'`fcgi_stdio.c
rm -f .libs/libfcgi_la-fcgi_stdio.lo
gcc -DHAVE_CONFIG_H -I. -I. -I.. -I../include -pthread -g -O2 -Wall -c fcgi_stdio.c -MT libfcgi_la-fcgi_stdio.lo -MD -MP -MF .deps/libfcgi_la-fcgi_stdio.TPlo  -fPIC -DPIC -o .libs/libfcgi_la-fcgi_stdio.lo
gcc -DHAVE_CONFIG_H -I. -I. -I.. -I../include -pthread -g -O2 -Wall -c fcgi_stdio.c -MT libfcgi_la-fcgi_stdio.lo -MD -MP -MF .deps/libfcgi_la-fcgi_stdio.TPlo -o libfcgi_la-fcgi_stdio.o >/dev/null 2>&1
mv -f .libs/libfcgi_la-fcgi_stdio.lo libfcgi_la-fcgi_stdio.lo
source='os_unix.c' object='libfcgi_la-os_unix.lo' libtool=yes \
        depfile='.deps/libfcgi_la-os_unix.Plo' tmpdepfile='.deps/libfcgi_la-os_unix.TPlo' \
        depmode=gcc3 /bin/sh ../depcomp \
        /bin/sh ../libtool --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I..   -I../include -pthread -g -O2 -Wall -c -o libfcgi_la-os_unix.lo `test -f os_unix.c || echo './'`os_unix.c
rm -f .libs/libfcgi_la-os_unix.lo
gcc -DHAVE_CONFIG_H -I. -I. -I.. -I../include -pthread -g -O2 -Wall -c os_unix.c -MT libfcgi_la-os_unix.lo -MD -MP -MF .deps/libfcgi_la-os_unix.TPlo  -fPIC -DPIC -o .libs/libfcgi_la-os_unix.lo
os_unix.c: In function 'OS_Accept':
os_unix.c:1169: warning: pointer targets in passing argument 3 of 'accept' differ in signedness
/usr/include/sys/socket.h:214: note: expected 'socklen_t * __restrict__' but argument is of type 'int *'
os_unix.c: In function 'OS_IsFcgi':
os_unix.c:1269: warning: pointer targets in passing argument 3 of 'getpeername' differ in signedness
/usr/include/sys/socket.h:133: note: expected 'socklen_t * __restrict__' but argument is of type 'int *'
gcc -DHAVE_CONFIG_H -I. -I. -I.. -I../include -pthread -g -O2 -Wall -c os_unix.c -MT libfcgi_la-os_unix.lo -MD -MP -MF .deps/libfcgi_la-os_unix.TPlo -o libfcgi_la-os_unix.o >/dev/null 2>&1
mv -f .libs/libfcgi_la-os_unix.lo libfcgi_la-os_unix.lo
/bin/sh ../libtool --mode=link gcc  -g -O2 -Wall   -o libfcgi.la -rpath /usr/local/fcgi/lib  libfcgi_la-fcgiapp.lo libfcgi_la-fcgi_stdio.lo libfcgi_la-os_unix.lo  -lnsl
rm -fr .libs/libfcgi.la .libs/libfcgi.* .libs/libfcgi.*
gcc -shared  libfcgi_la-fcgiapp.lo libfcgi_la-fcgi_stdio.lo libfcgi_la-os_unix.lo  -lnsl  -Wl,-soname -Wl,libfcgi.so.0 -o .libs/libfcgi.so.0.0.0
(cd .libs && rm -f libfcgi.so.0 && ln -s libfcgi.so.0.0.0 libfcgi.so.0)
(cd .libs && rm -f libfcgi.so && ln -s libfcgi.so.0.0.0 libfcgi.so)
ar cru .libs/libfcgi.a  libfcgi_la-fcgiapp.o libfcgi_la-fcgi_stdio.o libfcgi_la-os_unix.o
ranlib .libs/libfcgi.a
creating libfcgi.la
(cd .libs && rm -f libfcgi.la && ln -s ../libfcgi.la libfcgi.la)
source='fcgio.cpp' object='fcgio.lo' libtool=yes \
        depfile='.deps/fcgio.Plo' tmpdepfile='.deps/fcgio.TPlo' \
        depmode=gcc3 /bin/sh ../depcomp \
        /bin/sh ../libtool --mode=compile g++ -DHAVE_CONFIG_H -I. -I. -I..   -I../include  -g -O2 -c -o fcgio.lo `test -f fcgio.cpp || echo './'`fcgio.cpp
rm -f .libs/fcgio.lo
g++ -DHAVE_CONFIG_H -I. -I. -I.. -I../include -g -O2 -c fcgio.cpp -MT fcgio.lo -MD -MP -MF .deps/fcgio.TPlo  -fPIC -DPIC -o .libs/fcgio.lo
fcgio.cpp: In destructor 'virtual fcgi_streambuf::~fcgi_streambuf()':
fcgio.cpp:50: error: 'EOF' was not declared in this scope
fcgio.cpp: In member function 'virtual int fcgi_streambuf::overflow(int)':
fcgio.cpp:70: error: 'EOF' was not declared in this scope
fcgio.cpp:75: error: 'EOF' was not declared in this scope
fcgio.cpp: In member function 'virtual int fcgi_streambuf::sync()':
fcgio.cpp:86: error: 'EOF' was not declared in this scope
fcgio.cpp:87: error: 'EOF' was not declared in this scope
fcgio.cpp: In member function 'virtual int fcgi_streambuf::underflow()':
fcgio.cpp:113: error: 'EOF' was not declared in this scope
make[2]: *** [fcgio.lo] 错误 1
make[2]: Leaving directory `/opt/install/fcgi-2.4.1-SNAP-0311112127/libfcgi'
make[1]: *** [all-recursive] 错误 1
make[1]: Leaving directory `/opt/install/fcgi-2.4.1-SNAP-0311112127'
make: *** [all] 错误 2

gcc版本信息如下:

使用内建 specs。
目标:x86_64-redhat-linux
配置为:../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-languages=c,c++,objc,obj-c++,java,fortran,ada --enable-java-awt=gtk --disable-dssi --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-1.5.0.0/jre --enable-libgcj-multifile --enable-java-maintainer-mode --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --disable-libjava-multilib --with-ppl --with-cloog --with-tune=generic --with-arch_32=i686 --build=x86_64-redhat-linux
线程模型:posix
gcc 版本 4.4.4 20100726 (Red Hat 4.4.4-13) (GCC)

在/include/fcgio.h文件中加上#include <cstdio>,然后再编译安装就可以了。

猜你喜欢

转载自eric-gao.iteye.com/blog/1579487