Nginx-0.7.46


#1

Changes with nginx 0.7.46 30 Mar
2009

*) Bugfix: the previous release tarball was incorrect.

#2

Hello!

On Mon, Mar 30, 2009 at 03:06:21PM +0400, Igor S. wrote:

Changes with nginx 0.7.46 30 Mar 2009

*) Bugfix: the previous release tarball was incorrect.

I’ve got the following under FreeBSD 6.2:

cd nginx
&& make
make -f objs/Makefile
gcc -c -O -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter
-Wno-unused-function -Wunused-variable -Wunused-value -Werror -g
-D NGX_DEBUG_MALLOC -I src/core -I src/event -I
src/event/modules -I src/os/unix -I /usr/local/include -I objs
-o objs/src/core/nginx.o src/core/nginx.c
In file included from /usr/include/sys/mount.h:36,
from src/os/unix/ngx_freebsd_config.h:25,
from src/core/ngx_config.h:21,
from src/core/nginx.c:7:
/usr/include/sys/ucred.h:71: error: `NGROUPS’ undeclared here (not
in a function)
*** Error code 1

Including sys/param.h before sys/mount.h as statfs() manpage
suggests fixes this issue, but then it dies with:

src/os/unix/ngx_files.c: In function ngx_fs_bsize': src/os/unix/ngx_files.c:444: error: storage size of 'fs' isn't known src/os/unix/ngx_files.c:446: warning: implicit declaration of functionstatvfs’
src/os/unix/ngx_files.c:444: warning: unused variable `fs’
*** Error code 1

Including sys/statvfs.h as statvfs() manpage suggests fixes this
issue too. With the following patch I was able to build it under
FreeBSD 6.2:

diff --git a/src/os/unix/ngx_freebsd_config.h
b/src/os/unix/ngx_freebsd_config.h
— a/src/os/unix/ngx_freebsd_config.h
+++ b/src/os/unix/ngx_freebsd_config.h
@@ -22,7 +22,9 @@
#include <grp.h>
#include <dirent.h>
#include <glob.h>
+#include <sys/param.h>
#include <sys/mount.h> /* statfs() */
+#include <sys/statvfs.h>

#include <sys/filio.h> /* FIONBIO */
#include <sys/uio.h>

Maxim D.


#3

Igor S. wrote:

On Mon, Mar 30, 2009 at 03:43:19PM +0400, Maxim D. wrote:

make -f objs/Makefile
in a function)

#include <glob.h>
+#include <sys/param.h>
#include <sys/mount.h> /* statfs() */
+#include <sys/statvfs.h>

#include <sys/filio.h> /* FIONBIO */
#include <sys/uio.h>

The patch attached. The <sys/statvfs.h> is not needed on FreeBSD.

After patching:

make -f objs/Makefile
gcc -c -O -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter
-Wno-unused-function -Wunused-variable -Wunused-value -Werror -g -I
src/core -I src/event -I src/event/modules -I src/os/unix -I …/pcre
-I objs -o objs/src/os/unix/ngx_files.o src/os/unix/ngx_files.c
src/os/unix/ngx_files.c: In function ngx_fs_bsize': src/os/unix/ngx_files.c:444: error: storage size of 'fs' isn't known src/os/unix/ngx_files.c:446: warning: implicit declaration of functionstatvfs’
src/os/unix/ngx_files.c:444: warning: unused variable `fs’
*** Error code 1


#4

On Mon, Mar 30, 2009 at 03:43:19PM +0400, Maxim D. wrote:

make -f objs/Makefile
in a function)

#include <glob.h>
+#include <sys/param.h>
#include <sys/mount.h> /* statfs() */
+#include <sys/statvfs.h>

#include <sys/filio.h> /* FIONBIO */
#include <sys/uio.h>

The patch attached. The <sys/statvfs.h> is not needed on FreeBSD.


#5

Sorry, all work.
Just need to re configure


#6

Hello

Do you have any roadmap / date when 0.7.x will be in stage “stable” for
“production use”, and start 0.8.x developer branch?

Good job, thank you very much!

Best regards.

Posted at Nginx Forum: http://forum.nginx.org/read.php?2,632,644#msg-644


#7

On Mon, Mar 30, 2009 at 01:11:38PM -0400, adi wrote:

Hello

Do you have any roadmap / date when 0.7.x will be in stage “stable” for “production use”, and start 0.8.x developer branch?

I plan to improve cache during April and May, and then start 0.8.


#8

I tried to install on Debian 5.0 server

But having an error shown bellow

In file included from src/http/ngx_http_file_cache.c:10:
src/core/ngx_md5.h:18:17: error: md5.h: No such file or directory
In file included from src/http/ngx_http_file_cache.c:10:
src/core/ngx_md5.h:22: error: expected â=â, â,â, â;â, âasmâ or
â__attribute__â before ângx_md5_tâ
src/http/ngx_http_file_cache.c: In function
ângx_http_file_cache_create_keyâ:src/http/ngx_http_file_cache.c:135: error: ângx_md5_tâ undeclared (first use
in this function)
src/http/ngx_http_file_cache.c:135: error: (Each undeclared identifier
is
reported only once
src/http/ngx_http_file_cache.c:135: error: for each function it appears
in.)
src/http/ngx_http_file_cache.c:135: error: expected â;â before âmd5â
cc1: warnings being treated as errors
src/http/ngx_http_file_cache.c:143: error: implicit declaration of
function
âMD5Initâ
src/http/ngx_http_file_cache.c:143: error: âmd5â undeclared (first use in
this function)
src/http/ngx_http_file_cache.c:153: error: implicit declaration of
function
âMD5Updateâ
src/http/ngx_http_file_cache.c:160: error: implicit declaration of
function
âMD5Finalâ
make[1]: *** [objs/src/http/ngx_http_file_cache.o] Error 1
make[1]: Leaving directory `/root/nginx-0.7.46’
make: *** [build] Error 2


#9

On Wed, Apr 01, 2009 at 09:49:52AM +0700, Glen L. wrote:

?ngx_http_file_cache_create_key?:
this function)
src/http/ngx_http_file_cache.c:153: error: implicit declaration of function
?MD5Update?
src/http/ngx_http_file_cache.c:160: error: implicit declaration of function
?MD5Final?
make[1]: *** [objs/src/http/ngx_http_file_cache.o] Error 1
make[1]: Leaving directory `/root/nginx-0.7.46’
make: *** [build] Error 2

What does configure show ?


#10

Configuration summary

  • using system PCRE library
  • OpenSSL library is not used
  • md5 library is not found
  • sha1 library is not used
  • using system zlib library

nginx path prefix: “/etc/nginx”
nginx binary file: “/etc/nginx/sbin/nginx”
nginx configuration prefix: “/etc/nginx/conf”
nginx configuration file: “/etc/nginx/conf/nginx.conf”
nginx pid file: “/etc/nginx/logs/nginx.pid”
nginx error log file: “/etc/nginx/logs/error.log”
nginx http access log file: “/etc/nginx/logs/access.log”
nginx http client request body temporary files:
“/etc/nginx/client_body_temp”
nginx http proxy temporary files: “/etc/nginx/proxy_temp”
nginx http fastcgi temporary files: “/etc/nginx/fastcgi_temp”


#11

When I compile on Ubuntu I see this:

Configuration summary

  • using system PCRE library
  • using OpenSSL library: /usr/lib
  • md5: using OpenSSL library
  • sha1 library is not used
  • using system zlib library

It appears you need the openssl libs. I don’t know what it is in
debian but apt-cache search libssl. For example this is what I have:

libssl-dev
libssl0.9.8

I believe those should fix the issue.


#12

checking for statfs() … found
checking for statvfs() … found
checking for PCRE library … found
checking for rsaref md5 library … not found
checking for rsaref md library … not found
checking for OpenSSL md5 crypto library … not found
checking for zlib library … found


#13

On Wed, Apr 01, 2009 at 12:29:56AM -0700, Michael S. wrote:

debian but apt-cache search libssl. For example this is what I have:

libssl-dev
libssl0.9.8

I believe those should fix the issue.

Yes.

BTW are there in Linux standalone md5/sha libraries as in FreeBSD and
Solaris ?


#14

On Wed, Apr 01, 2009 at 02:16:24PM +0700, Glen L. wrote:

Configuration summary

  • using system PCRE library
  • OpenSSL library is not used
  • md5 library is not found
  • sha1 library is not used
  • using system zlib library

I meant the lines near

checking for rsaref md5 library … not found
checking for rsaref md library … found
checking for zlib library … found


#15

2009/4/1 Igor S. removed_email_address@domain.invalid:

I believe those should fix the issue.

Yes.

BTW are there in Linux standalone md5/sha libraries as in FreeBSD and Solaris ?

No clue.

Doesn’t look like it. Looks like it comes paired with openssl, or
beecrypt, or teamed up with the package requiring it (at least from my
scans of the apt cache)


#16

On Wed, Apr 01, 2009 at 12:29:56AM -0700, Michael S. wrote:

When I compile on Ubuntu I see this:

Configuration summary

  • using system PCRE library
  • using OpenSSL library: /usr/lib

It should show
+ using system OpenSSL library

at least in my Debian test host.
How do you run configure ?


#17

2009/4/1 Igor S. removed_email_address@domain.invalid:

at least in my Debian test host.
How do you run configure ?

./configure --conf-path=/etc/nginx/nginx.conf --prefix=/usr
–user=www-data --group=www-data
–error-log-path=/var/log/nginx/error.log --pid-path=/var/run/nginx.pid

–lock-path=/var/lock/nginx.lock
–http-log-path=/var/log/nginx/access.log
–http-client-body-temp-path=/var/lib/nginx/body
–http-proxy-temp-path=/var/lib/nginx/proxy
–http-fastcgi-temp-path=/var/lib/nginx/fastcgi
–with-http_stub_status_module
–with-openssl=/usr/lib --with-md5=/usr/lib
–with-http_gzip_static_module
–without-mail_pop3_module --without-mail_smtp_module
–without-mail_imap_module
–with-http_flv_module --with-http_ssl_module --with-http_dav_module
–with-http_realip_module --with-http_xslt_module
–with-debug

i’m not sure the --with-openssl paths are needed anymore but it
continues to work great. i think even on (stupid) redhat with it’s
mixed i386 and x86_64 libs


#18

On Wed, Apr 01, 2009 at 01:07:50AM -0700, Michael S. wrote:

š š+ using system OpenSSL library
–http-fastcgi-temp-path=/var/lib/nginx/fastcgi --with-http_stub_status_module
–with-openssl=/usr/lib --with-md5=/usr/lib --with-http_gzip_static_module
–without-mail_pop3_module --without-mail_smtp_module
–without-mail_imap_module
–with-http_flv_module --with-http_ssl_module --with-http_dav_module
–with-http_realip_module --with-http_xslt_module
–with-debug

i’m not sure the --with-openssl paths are needed anymore but it
continues to work great. i think even on (stupid) redhat with it’s
mixed i386 and x86_64 libs

You do not need

–with-openssl=/usr/lib
–with-md5=/usr/lib

They are required only if you want to build OpenSSL or libmd5 from
sources,
but not if you want to use already built libraries. In the later case
nginx will find them by itself, or if they are in non-standard place,
you should help it by:

–with-cc-opt="-I /path/to/headers"
–with-ld-opt="-L /path/to/libraries"


#19

Thank’s. It fixed the problem :smiley:


#20

2009/4/1 Igor S. removed_email_address@domain.invalid:

–with-cc-opt="-I /path/to/headers"
–with-ld-opt="-L /path/to/libraries"

I used this script for so long there may have been a bug in detecting
it or something at the time.

just took it out and

Configuration summary

  • using system PCRE library
  • using system OpenSSL library
  • md5: using OpenSSL library
  • sha1 library is not used
  • using system zlib library

seems to be good still. cool, thanks :slight_smile:

Typically things do find libs properly on their own, I always try to
run it that way first. So for some reason along the way I wound up
having to force it.