Solution to fcgi errors during compilation and installation of Ubuntu gcc

Source: Internet
Author: User

For fcgi, whether I use the conventional version 2.4.0 or the latest version 2.4.1 (released in March October), the following error occurs:

Root @ localhost :~ /Downloads/fcgi-2.4.1-SNAP-0910052249 #./configure -- prefix =/usr/local/fcgi-2.4.1

This step is correct.

Next

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 #

My gcc version is as follows:

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 ages = 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 = isung -- 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 #

I think this fcgi development is not active at all, and the latest gcc version keeps coming out, probably because of this reason, I adjusted the keyword again

Gcc compile fcgi (no direction for searching previously ). The cause is finally found in the first result:Http://bugs.gentoo.org/256654

--------------------------------------------------------------------

Build of dev-libs/fcgi-2.4.1_pre0311112127 fails with the following errors:

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

This is because # include <cstdio> is missing from one of the headers.
In view of this: After extracting the package include/fcgio. h and adding the header file # include <cstdio>, the compilation will be fine.
Compile fastcgi: gcc-lfcgi fcgi1.c-o fcgi1.fcgi
Reference: http://www.360fire.cn/Java/Tomcat/2010-08-31/5598.html

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.