25

I am attempting to build fastcgi on a Linux Ubuntu 10.x machine.

I run the following commands:

./configure make

and I get the following error:

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:107: error: 'EOF' was not declared in this scope
make[2]: *** [fcgio.lo] Error 1
make[2]: Leaving directory `/somepath/fcgi-2.4.0/libfcgi'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/somepath/fcgi-2.4.0'
make: *** [all] Error 2

I notice that others have had the same problem and have asked this question in various fora etc - however, I have not as yet, seen an answer to this question/problem.

Has anyone ever managed to build fastcgi on Linux? How do I fix this problem?

2 Answers 2

43

EOF is a C macro and seems that you do not have it defined in fcgio.cpp or that something has undefined it. I would first try to add #include <stdio.h> to start of fcgio.cpp.

3
  • 5
    Shouldn't this be reported as a bug? It seems hard to get more basic than forgetting to include stdio...
    – labyrinth
    Dec 20, 2011 at 0:55
  • Check the licenses on the headers. Some of the files we are not even allowed to use because they are "secret to OpenMarket or Copyright 2001 the Tux Linux Pengiun".
    – unixman83
    Mar 25, 2012 at 19:10
  • 1
    How bout sending them an email on this? : The problem was, i could not find one (i may be wrong) Apr 11, 2012 at 5:41
14

I had the same problem on Ubuntu 11.10 Linux 64bit. Following most of @paercebal's advice I created the following patch which resolved the problem:

--- include/fcgio.h 2012-01-23 15:23:51.136063795 +0000
+++ include/fcgio.h 2012-01-23 15:22:19.057221383 +0000
@@ -31,6 +31,7 @@
 #define FCGIO_H

 #include <iostream>
+#include <stdio.h>

 #include "fcgiapp.h"
0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.