Ticket #1151 (new defect)

Opened 1 year ago

Last modified 1 year ago

compile error (during compiling mod_fastcgi)

Reported by: anonymous Assigned to: jan
Priority: high Milestone: 1.5.0
Component: mod_fastcgi Version: 1.4.15
Severity: normal Keywords: compile fastcgi make
Cc: gcc version 2.95.4 20011002 (Debian prerelease) Blocking:
Need Feedback:

Description (Last modified by darix)

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

Attachments

Change History

(follow-up: ↓ 2 ) 04/26/2007 11:36:11 AM changed by darix

what os? what gcc version?

(in reply to: ↑ 1 ) 04/26/2007 11:40:06 AM changed by anonymous

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

04/26/2007 11:47:16 AM changed by darix

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

thanks in advance

04/26/2007 11:50:13 AM changed by darix

  • description changed.

04/26/2007 12:01:33 PM changed by lighttpd@nagash.org

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.

04/26/2007 12:06:40 PM changed by darix

please run "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"

and attach the mod_fastcgi.i

04/26/2007 12:10:38 PM changed by darix

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. :)

(follow-up: ↓ 10 ) 04/26/2007 12:18:00 PM changed by lighttpd@nagash.org

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

06/13/2007 10:03:29 PM changed by anonymous

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.

(in reply to: ↑ 8 ) 06/15/2007 09:59:11 PM changed by anonymous

Replying to lighttpd@nagash.org:

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


Add/Change #1151 (compile error (during compiling mod_fastcgi))




Change Properties