最近在折腾vps,在上面步骤ROR应用,部署方案还是用我倾向的Lighttpd + fcgi的方式,发现在编译安装fcig时出错,在网上搜也没有发现有价值的信息。
对于fcgi,我不管是用常规的 2.4.0版本,还是用最新的2.4.1(09年10月份发布的),都是出现如下的错误:
root@localhost:~/downloads/fcgi-2.4.1-SNAP-0910052249# ./configure --prefix=/usr/local/fcgi-2.4.1
这一步没有问题。
接下来
root@localhost:~/downloads/fcgi-2.4.1-SNAP-0910052249# make
make all-recursive
make[1]: Entering directory `/root/downloads/fcgi-2.4.1-SNAP-0910052249'
Making all in libfcgi
make[2]: Entering directory `/root/downloads/fcgi-2.4.1-SNAP-0910052249/libfcgi'
if /bin/bash ../libtool --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H -I. -I. -I.. -I../include -g -O2 -MT fcgio.lo -MD -MP -MF ".deps/fcgio.Tpo" -c -o fcgio.lo fcgio.cpp; \
then mv -f ".deps/fcgio.Tpo" ".deps/fcgio.Plo"; else rm -f ".deps/fcgio.Tpo"; exit 1; fi
g++ -DHAVE_CONFIG_H -I. -I. -I.. -I../include -g -O2 -MT fcgio.lo -MD -MP -MF .deps/fcgio.Tpo -c fcgio.cpp -fPIC -DPIC -o .libs/fcgio.o
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] Error 1
make[2]: Leaving directory `/root/downloads/fcgi-2.4.1-SNAP-0910052249/libfcgi'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/root/downloads/fcgi-2.4.1-SNAP-0910052249'
make: *** [all] Error 2
root@localhost:~/downloads/fcgi-2.4.1-SNAP-0910052249#
我的gcc版本如下:
root@localhost:~/downloads/fcgi-2.4.1-SNAP-0910052249/include# gcc -v
Using built-in specs.
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 4.4.1-4ubuntu8' --with-bugurl=file:///usr/share/doc/gcc-4.4/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --enable-shared --enable-multiarch --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.4 --program-suffix=-4.4 --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-objc-gc --disable-werror --with-arch-32=i486 --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 4.4.1 (Ubuntu 4.4.1-4ubuntu8)
root@localhost:~/downloads/fcgi-2.4.1-SNAP-0910052249/include#
我想这个fcgi开发一点也不活跃,而gcc的最新版本不断出来,很有可能是由于这方面引的原因,我又调整了一下关键字
gcc compile fcgi,(之前都是没有方向的搜索)。终于在第一条结果中找到原因了:http://bugs.gentoo.org/256654
解决办法:
在/include/fcgio.h文件中加上 #include <cstdio>,然后再编译安装就通过了。
分享到:
相关推荐
gcc 编译 优化 选项 英文的编译器优化选项
GCC 源代码编译安装文档, 怎么用源代码安装GCC
GCC编译命令 Gcc命令行详解 Gcc命令行详解 Gcc命令行详解
GCC编译工具GCC编译工具GCC编译工具GCC编译工具GCC编译工具
windows平台arm-gcc编译环境搭建(资源包及搭建步骤,及测试demo) windows平台arm-gcc编译环境搭建(资源包及搭建步骤,及测试demo) windows平台arm-gcc编译环境搭建(资源包及搭建步骤,及测试demo) windows平台arm-...
avrgcc编译程序方法图解 avrgcc编译程序方法图解 avrgcc编译程序方法图解 avrgcc编译程序方法图解 avrgcc编译程序方法图解
linux中gcc4.8.5,下载解压即可直接使用,linux系统GCC编译,已经编译完成
提供了在干净的centos7下安装gcc和g++的编译环境,同时给出了相关的包路径和安装步骤。按着步骤安装就可以完成了特定的环境了
gcc编译原理代码demo,gcc/g++命令使用及编译原理二https://blog.csdn.net/yfldyxl/article/details/81450843
gcc编译时出现异常,发现pow函数找不到。 对该编译问题的解决办法总结
arm-linux-gcc编译选项,包括相关参数的详细说明等等。
gcc编译过程概述.pdfgcc编译过程概述.pdf
AVR-GCC 编译程序方法图解
详解Linux 下GCC 的编译过程及其编译选项、优化原理。。
通过学习,学会了GCC编译的基础知识,makefile制作等。非常适合Linux初级开发开发者学习。相信你看完资料,按资料把代码都编写了,您也就能使用基本的GCC(G++)功能了,个人认为其弥足珍贵。(在Linux环境下阅读...
GCC 编译流程简介 编译过程:预处理、编译、汇编、链接
gcc编译文件gcc编译文件gcc编译文件gcc编译文件gcc编译文件
gcc编译数据库
26个依赖包,收集不易!!! gcc完美离线安装包,以及包含的...CentOS6/7下gcc离线安装包,解决内网/内部云依赖gcc进行编译的问题。比如在没有互联网的情况下,进行nginx的编译和安装,其中就需要用gcc对其进行编译。
Linux 内核和许多其他自由软件以及开放源码应用程序都是用 C 语言编写并使用 GCC 编译的。