0.9.3 on OpenBSD 4.8

Hi,

I’m trying to compile from source but am running into a few
difficulties.

I first installed from the package manager, which gave me 0.7.3 (and
created user, group and what not).

0.1) Then somehow the .configure line confused the shell, so i used
one single line instead of the lines bellow:

./configure
–sbin-path=/usr/local/sbin/nginx
–conf-path=/etc/nginx/nginx.conf
–pid-path=/var/run/nginx.pid
–lock-path=/var/lock/nginx.lock
–error-log-path=/var/www/logs/nginxerror.log
–http-log-path=/var/www/logs/nginxaccess.log
–user=_nginx
–group=_nginx
–with-cpu-opt=amd64
–http-client-body-temp-path=/var/nginx/tmp/body
–http-proxy-temp-path=/var/nginx/tmp/proxy
–http-fastcgi-temp-path=/var/nginx/tmp/fastcgi
–with-debug
–without-http_empty_gif_module
–without-http_geo_module
–without-http_map_module
–without-http_memcached_module
–without-http_referer_module
–without-http_scgi_module
–without-http_split_clients_module
–without-http_ssi_module
–without-http_upstream_ip_hash_module
–without-http_userid_module
–without-http_uwsgi_module
–with-http_ssl_module \

…plus third-party modules:

Accept Language - 2010-12-29

Auto Lib - 2010-12-29

Chunkin - 0.21

Form Input - 0.06

Headers More - 0.13-12

Log Request Speed - 2010-12-29

Upload - 2.2.0

…with the appropriate --add-module=/path/to/module \ lines. The result
being:

Configuration summary

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

nginx path prefix: “/usr/local/nginx”
nginx binary file: “/usr/local/sbin/nginx”
nginx configuration prefix: “/etc/nginx”
nginx configuration file: “/etc/nginx/nginx.conf”
nginx pid file: “/var/run/nginx.pid”
nginx error log file: “/var/www/logs/nginxerror.log”
nginx http access log file: “/var/www/logs/nginxaccess.log”
nginx http client request body temporary files: “/var/nginx/tmp/body”
nginx http proxy temporary files: “/var/nginx/tmp/proxy”
nginx http fastcgi temporary files: “/var/nginx/tmp/fastcgi”

0.2) How come “PCRE library is not used”?

  1. When issuing make for the first time i got these errors with the
    Form Input module:

/path/to/ngx_http_form_input_module.c:4:17: error: ndk.h: No such file
or directory
/path/to/ngx_http_form_input_module.c: In function
‘ngx_http_set_form_input_conf_handler’:
/path/to/ngx_http_form_input_module.c:310: error: ‘ndk_set_var_t’
undeclared (first use in this function)
/path/to/ngx_http_form_input_module.c:310: error: (Each undeclared
identifier is reported only once
/path/to/ngx_http_form_input_module.c:310: error: for each function it
appears in.)
/path/to/ngx_http_form_input_module.c:310: error: expected ‘;’ before
‘filter’
/path/to/ngx_http_form_input_module.c:316: error: ‘filter’ undeclared
(first use in this function)
/path/to/ngx_http_form_input_module.c:316: error:
‘NDK_SET_VAR_MULTI_VALUE’ undeclared (first use in this function)
cc1: warnings being treated as errors
/path/to/ngx_http_form_input_module.c:342: warning: implicit
declaration of function ‘ndk_set_var_multi_value_core’
/path/to/ngx_http_form_input_module.c:342: warning: return makes
pointer from integer without a cast
*** Error code 1

Stop in /root/nginx/nginx-0.9.3 (line 1002 of objs/Makefile).
*** Error code 1

Am i missing some libraries?

  1. After removing the appropriate --add-module line, doing .configure
    and make again, i got another error:

cd /usr && make CFLAGS="-O2 -fomit-frame-pointer -pipe " CC=“gcc”
MD5_ASM_OBJ= clean libmd5.a
make: don’t know how to make clean. Stop in /usr.
*** Error code 2

This one lost me. Are there any technicalities with OpenBSD’s make or
am i borking it somewhere?


Mars 2 Stay!

/etc

Hi,

0.2) How come “PCRE library is not used”?

Do you have pcre installed? (pkg_info | grep ^pcre)

  1. When issuing make for the first time i got these errors with the
    Form Input module:
    (…)

You need NDK module (GitHub - vision5/ngx_devel_kit: Nginx Development Kit - an Nginx module that adds additional generic tools that module developers can use in their own modules).

  1. After removing the appropriate --add-module line, doing .configure
    and make again, i got another error:

cd /usr && make CFLAGS="-O2 -fomit-frame-pointer -pipe " CC=“gcc”
MD5_ASM_OBJ= clean libmd5.a
make: don’t know how to make clean. Stop in /usr.
*** Error code 2

This one lost me. Are there any technicalities with OpenBSD’s make or
am i borking it somewhere?

You’ve broken something, nginx works just fine on OpenBSD.

Best regards,
Piotr S. < [email protected] >

Hi!

2011/1/3 Nuno Magalhães [email protected]:

0.2) How come “PCRE library is not used”?
You have not selected any modules that require PCRE, so it will not be
built.

  1. After removing the appropriate --add-module line, doing .configure
    and make again, i got another error:

cd /usr && make CFLAGS="-O2 -fomit-frame-pointer -pipe " CC=“gcc”
MD5_ASM_OBJ= clean libmd5.a
make: don’t know how to make clean. Stop in /usr.
*** Error code 2
Did you try to pass --with-pcre=/usr to configure script? If so, don’t
do it.


Boris D…

On Mon, Jan 3, 2011 at 20:16, Piotr S. [email protected]
wrote:

Hi,

0.2) How come “PCRE library is not used”?

Do you have pcre installed? (pkg_info | grep ^pcre)

pkg_info |grep pcre

pcre-8.02p1 perl-compatible regular expression library

Also, the line “checking for PCRE library in /usr/local/include and
/usr/local/lib … found” shows up during .configure.

  1. When issuing make for the first time i got these errors with the
    Form Input module:
    (…)

You need NDK module (GitHub - vision5/ngx_devel_kit: Nginx Development Kit - an Nginx module that adds additional generic tools that module developers can use in their own modules).

Noted, thanks.

  1. After removing the appropriate --add-module line, doing .configure
    and make again, i got another error:

Issuing make clean at the shell works as expected. The full error is:

cd /usr && make CFLAGS="-O2 -fomit-frame-pointer -pipe " CC=“gcc”
MD5_ASM_OBJ= clean libmd5.a
make: don’t know how to make clean. Stop in /usr.
*** Error code 2

Stop in /root/nginx/nginx-0.9.3 (line 1041 of objs/Makefile).
*** Error code 1

Stop in /root/nginx/nginx-0.9.3 (line 8 of Makefile).

Line 1041 of objs/Makefile is: CC=“$(CC)” MD5_ASM_OBJ= clean libmd5.a
These show up during .configure:

checking for MD5 library in /usr/include and /usr/lib (from previously
found OpenSSL) … found

adding module in /path/to/upload-module

  • ngx_http_upload_module was configured
    grep: /usr/md5.h: No such file or directory
    creating objs/Makefile

Configuration summary

  • PCRE library is not used
  • using md5 library: /usr

You’ve broken something, nginx works just fine on OpenBSD.

I didn’t say otherwise :slight_smile: However, i’m not interested in 0.7.3; maybe
i’m missing packages? I have a very minimal isntall, but i assumed md5
and friends were default in OpenBSD (assuming that’s the problem).
There’s no md5.h in /usr, but in /usr/lib; creating a soft link has no
effect.


Mars 2 Stay!

/etc

Hello!

On Mon, Jan 03, 2011 at 09:28:00PM +0000, Nuno Magalhães wrote:

Also, the line "checking for PCRE library in /usr/local/include and

  1. After removing the appropriate --add-module line, doing .configure
    and make again, i got another error:

Issuing make clean at the shell works as expected. The full error is:

cd /usr && make CFLAGS="-O2 -fomit-frame-pointer -pipe " CC=“gcc”
MD5_ASM_OBJ= clean libmd5.a
make: don’t know how to make clean. Stop in /usr.
*** Error code 2

Looks like you did something like

./configure --with-md5=/usr

It’s just wrong and expected to fail.

$ ./configure --help | grep md5=
–with-md5=DIR set path to md5 library sources

Note the “sources”.

Maxim D.

Hi,

However, i’m not interested in 0.7.3;

OpenBSD-4.8 shipped with nginx-0.7.67, not nginx-0.7.3.

maybe
i’m missing packages? I have a very minimal isntall, but i assumed md5
and friends were default in OpenBSD (assuming that’s the problem).

This is not a problem, nginx compiles just fine with only pcre
installed.

You must have messed your ./configure options, try removing one-by-one
(don’t forget about 3rd party modules) and see which one is the problem.

Best regards,
Piotr S. < [email protected] >

2011/1/3 Nuno Magalhães [email protected]:
make clean at the shell works as expected. The full error is:

cd /usr && make CFLAGS="-O2 -fomit-frame-pointer -pipe " CC=“gcc”
MD5_ASM_OBJ= clean libmd5.a

Try gmake

Hi,

The culprit was the upload module (v2.2.0), which makes sense since
that’s when make fails (at the very end 'cos it was the last option).

No, it wasn’t. “./configure --add-module=…/nginx_upload_module-2.2.0”
compiles just fine.

The problem is probably the mix of different 3rd party modules.

I tried adding a “clean” entry in obj/Makefile, as well as using gmake

  • same results. I didn’t pass any pcre or md5 specific options in
    .configure.

Neither is needed.

Best regards,
Piotr S. < [email protected] >

Hi again,

The culprit was the upload module (v2.2.0), which makes sense since
that’s when make fails (at the very end 'cos it was the last option).

I tried adding a “clean” entry in obj/Makefile, as well as using gmake

  • same results. I didn’t pass any pcre or md5 specific options in
    .configure.

nginx 0.9.3 compiled without problems with these options:

./configure
–sbin-path=/usr/local/sbin/nginx
–conf-path=/etc/nginx/nginx.conf
–pid-path=/var/run/nginx.pid
–lock-path=/var/lock/nginx.lock
–error-log-path=/var/www/logs/nginxerror.log
–http-log-path=/var/www/logs/nginxaccess.log
–user=_nginx
–group=_nginx
–with-cpu-opt=amd64
–http-client-body-temp-path=/var/nginx/tmp/body
–http-proxy-temp-path=/var/nginx/tmp/proxy
–http-fastcgi-temp-path=/var/nginx/tmp/fastcgi
–with-debug --without-http_empty_gif_module
–without-http_geo_module
–without-http_map_module
–without-http_memcached_module
–without-http_referer_module
–without-http_scgi_module
–without-http_split_clients_module
–without-http_ssi_module
–without-http_upstream_ip_hash_module
–without-http_userid_module
–without-http_uwsgi_module
–with-http_ssl_module
–add-module=/path/to/auto_lib
–add-module=/path/to/chunkin
–add-module=/path/to/headers_more

Thanks for the help.
Cheers,
Nuno


Mars 2 Stay!

/etc

Hi again,

On 04/01/2011 12:47, Nuno Magalhes wrote:


–add-module=/path/to/auto_lib
–add-module=/path/to/chunkin
–add-module=/path/to/headers_more
By the way, auto_lib should always be the last additional module to be
listed. You may fix the issues here if you put it last.

Marcus.

Hi,

On 04/01/2011 12:47, Nuno Magalhes wrote:

Hi again,

The culprit was the upload module (v2.2.0), which makes sense since
that’s when make fails (at the very end 'cos it was the last option).
I’m pretty sure the culprit is probably the auto_lib module. It hasn’t
been thoroughly tested yet, and some (known) issues appeared in 0.9+
that have not been fixed yet (including ones related to MD5).

Marcus.

Hi,

So i had this config:

–add-module=/path/to/auto_lib
–add-module=/path/to/chunkin
–add-module=/path/to/headers_more

Worked. After a few suggestions i tried this:

–add-module=/path/to/chunkin
–add-module=/path/to/headers_more
–add-module=/path/to/upload
–add-module=/path/to/auto_lib

Worked too, only the form input module is still failing but i’m not
worrying about that for the moment.

Thanks,
Nuno


Mars 2 Stay!

/etc