Project

General

Profile

Actions

Bug #1151

closed

compile error (during compiling mod_fastcgi)

Added by Anonymous over 17 years ago. Updated over 16 years ago.

Status:
Fixed
Priority:
High
Category:
mod_fastcgi
Target version:
ASK QUESTIONS IN Forums:

Description

I try to compile lighthttpd and unable to do it becouse of the following errors
the steps I do to compile:
./configure --prefix=/home/vgordeenkov/serv_lighthttpd
make

and during making it fails.
or plz explain how I can disable fastcgi module.
I tries to use almost all for ./configure - like: --disable-mod_fastcgi --without-mod_fastcgi --disable-fastcgi --without-fastcgi - and nothing helped me =(

error stack:


 gcc -DHAVE_CONFIG_H -DLIBRARY_DIR=\"/home/vgordeenkov/serv_lighthttpd/lib\" -I. -I.. -D_REENTRANT -D__EXTENSIONS__ -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGE_FILES -g -O2 -Wall -W -Wshadow -pedantic -c mod_fastcgi.c -Wp,-MD,.deps/mod_fastcgi.TPlo  -fPIC -DPIC -o .libs/mod_fastcgi.o
In file included from server.h:4,
                 from mod_fastcgi.c:12:
base.h:487: warning: comma at end of enumerator list
mod_fastcgi.c: In function `fcgi_create_env':
mod_fastcgi.c:1896: parse error before `char'
mod_fastcgi.c:1899: `ds' undeclared (first use in this function)
mod_fastcgi.c:1899: (Each undeclared identifier is reported only once
mod_fastcgi.c:1899: for each function it appears in.)
mod_fastcgi.c:1900: `http_authorization' undeclared (first use in this function)
mod_fastcgi.c:2068: warning: ANSI C does not support the `ll' length modifier
mod_fastcgi.c:2068: warning: ANSI C does not support the `ll' length modifier
mod_fastcgi.c:2073: warning: ANSI C does not support the `ll' length modifier
mod_fastcgi.c:2073: warning: ANSI C does not support the `ll' length modifier
mod_fastcgi.c:2088: warning: ANSI C does not support the `ll' length modifier
mod_fastcgi.c:2088: warning: ANSI C does not support the `ll' length modifier
mod_fastcgi.c:2088: warning: ANSI C does not support the `ll' length modifier
mod_fastcgi.c: In function `mod_fastcgi_handle_subrequest':
mod_fastcgi.c:3033: warning: comparison between signed and unsigned
make[2]: *** [mod_fastcgi.lo] Error 1
make[2]: Leaving directory `/opt/home/vgordeenkov/src/lighttpd-1.4.15/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/opt/home/vgordeenkov/src/lighttpd-1.4.15'
make: *** [all] Error 2
Actions #1

Updated by darix over 17 years ago

what os? what gcc version?

Actions #2

Updated by Anonymous over 17 years ago

Replying to darix:

what os? what gcc version?

gcc -v
Reading specs from /usr/lib/gcc-lib/i386-linux/2.95.4/specs
gcc version 2.95.4 20011002 (Debian prerelease)

if it's imposible with this gcc version - plz explain how I can switch this module off.
I am trying to create new module for lighthttpd and I just need to compile my own module. not the whole lighthttpd.
and I didn't find any ways to compile my module alone - without recompiling the whole lighthttpd

Actions #3

Updated by darix over 17 years ago

first of all ... why writing your own module?
can you join #lighttpd on irc.freenode.net?

thanks in advance

Actions #4

Updated by Anonymous over 17 years ago

unfortunetly I am unable to connect to IRC right now.
the reason to write our own module: we have File Storage with specific folder architecture. (it's image tiles for maps). so we develop modules for different httpd serevers, such as Apache, lighthttpd, nginx - to find the most productive aplication of all.
the module is quite simple - it receive "x" \ "y" \ "zoom" - from request uri, after that it create our object using this variables... something like this: Coords2Tile(long x, long y, int zoom). and after that we can get Coords2Tile->path(). and using linux sendfile send file to user. so your lighthttpd support sendfile kernel feature and also support the full http protocol. so we develop module for lighthttpd too.
the main for us is that the server should work proper under havy load.

-- lighttpd

Actions #5

Updated by darix over 17 years ago

please run
"gcc -DHAVE_CONFIG_H -DLIBRARY_DIR=\"/home/vgordeenkov/serv_lighthttpd/lib\" -I. -I.. -D_REENTRANT -D+EXTENSIONS_+ -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGE_FILES -g -O2 -Wall -W -Wshadow -pedantic -c mod_fastcgi.c -Wp,-MD,.deps/mod_fastcgi.TPlo -fPIC -DPIC -o .libs/mod_fastcgi.o -savetemps"

and attach the mod_fastcgi.i

Actions #6

Updated by darix over 17 years ago

you can do that easily in a FastCGI application and use X-LIGHTTPD-send-file to tell lighttpd the path it should send via sendfile.

a nice starting point is http://trac.lighttpd.net/trac/browser/trunk/src/fcgi-stat-accel.c . all you need to add is your resolving logic. of course any script language will work aswell. :)

Actions #7

Updated by Anonymous over 17 years ago

the same truble. and no mod_fastcgi.i anywhere


vgordeenkov@fireball:~/src/lighttpd-1.4.15/src$ gcc -DHAVE_CONFIG_H -DLIBRARY_DIR="/home/vgordeenkov/serv_lighthttpd/lib" -I. -I.. -D_REENTRANT -DEXTENSIONS -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGE_FILES -g -O2 -Wall -W -Wshadow -pedantic -c mod_fastcgi.c -Wp,-MD,.deps/mod_fastcgi.TPlo -fPIC -DPIC -o .libs/mod_fastcgi.o -savetemps
gcc: unrecognized option `-savetemps'
In file included from server.h:4,
                 from mod_fastcgi.c:12:
base.h:487: warning: comma at end of enumerator list
mod_fastcgi.c: In function `fcgi_create_env':
mod_fastcgi.c:1896: parse error before `char'
mod_fastcgi.c:1899: `ds' undeclared (first use in this function)
mod_fastcgi.c:1899: (Each undeclared identifier is reported only once
mod_fastcgi.c:1899: for each function it appears in.)
mod_fastcgi.c:1900: `http_authorization' undeclared (first use in this function)
mod_fastcgi.c:2068: warning: ANSI C does not support the `ll' length modifier
mod_fastcgi.c:2068: warning: ANSI C does not support the `ll' length modifier
mod_fastcgi.c:2073: warning: ANSI C does not support the `ll' length modifier
mod_fastcgi.c:2073: warning: ANSI C does not support the `ll' length modifier
mod_fastcgi.c:2088: warning: ANSI C does not support the `ll' length modifier
mod_fastcgi.c:2088: warning: ANSI C does not support the `ll' length modifier
mod_fastcgi.c:2088: warning: ANSI C does not support the `ll' length modifier
mod_fastcgi.c: In function `mod_fastcgi_handle_subrequest':
mod_fastcgi.c:3033: warning: comparison between signed and unsigned

-- lighttpd

Actions #8

Updated by Anonymous over 17 years ago

i'm having same compile error with mod_fastcgi on my RH system. Using gcc 3.2 the error is evident, but goes away with gcc 3.4.

Actions #9

Updated by Anonymous over 17 years ago

Replying to :

the same truble. and no mod_fastcgi.i anywhere {{{
vgordeenkov@fireball:~/src/lighttpd-1.4.15/src$ gcc -DHAVE_CONFIG_H -DLIBRARY_DIR="/home/vgordeenkov/serv_lighthttpd/lib" -I. -I.. -D_REENTRANT -DEXTENSIONS -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGE_FILES -g -O2 -Wall -W -Wshadow -pedantic -c mod_fastcgi.c -Wp,-MD,.deps/mod_fastcgi.TPlo -fPIC -DPIC -o .libs/mod_fastcgi.o -savetemps
gcc: unrecognized option `-savetemps'
In file included from server.h:4,
from mod_fastcgi.c:12:
base.h:487: warning: comma at end of enumerator list
mod_fastcgi.c: In function `fcgi_create_env':
mod_fastcgi.c:1896: parse error before `char'
mod_fastcgi.c:1899: `ds' undeclared (first use in this function)
mod_fastcgi.c:1899: (Each undeclared identifier is reported only once
mod_fastcgi.c:1899: for each function it appears in.)
mod_fastcgi.c:1900: `http_authorization' undeclared (first use in this function)
mod_fastcgi.c:2068: warning: ANSI C does not support the `ll' length modifier
mod_fastcgi.c:2068: warning: ANSI C does not support the `ll' length modifier
mod_fastcgi.c:2073: warning: ANSI C does not support the `ll' length modifier
mod_fastcgi.c:2073: warning: ANSI C does not support the `ll' length modifier
mod_fastcgi.c:2088: warning: ANSI C does not support the `ll' length modifier
mod_fastcgi.c:2088: warning: ANSI C does not support the `ll' length modifier
mod_fastcgi.c:2088: warning: ANSI C does not support the `ll' length modifier
mod_fastcgi.c: In function `mod_fastcgi_handle_subrequest':
mod_fastcgi.c:3033: warning: comparison between signed and unsigned

}}}

here is the solution:

put these 2 lines:

data_string *ds;
char *http_authorization = NULL;

at the beginning of the function.

after that it should like this
------
static int fcgi_create_env(server *srv, handler_ctx *hctx, size_t request_id) {
FCGI_BeginRequestRecord beginRecord;
FCGI_Header header;
buffer *b;
data_string *ds;
char *http_authorization = NULL;
---------

thanks for they guys on irc #lighttpd

Actions #10

Updated by stbuehler over 16 years ago

  • Status changed from New to Fixed
  • Resolution set to fixed

Fixed in r1787

Actions

Also available in: Atom