# 0.9.3 on OpenBSD 4.8

**URL:** <https://www.ruby-forum.com/t/0-9-3-on-openbsd-4-8/201257>\
**Category:** NGINX\
**Created:** [January 3, 2011, 9:08pm UTC](https://www.ruby-forum.com/t/0-9-3-on-openbsd-4-8/201257 "2011-01-03T21:08:11Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![luislavena](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/0ea827/32.png) [@luislavena](https://www.ruby-forum.com/u/luislavena)\
**Post date:** [January 3, 2011, 9:08pm UTC](https://www.ruby-forum.com/t/0-9-3-on-openbsd-4-8/201257/1 "2011-01-03T21:08:11Z")

</div>

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!

> **[Golden Hammer](https://xkcd.com/801/)**
>
> Took me five tries to find the right one, but I managed to salvage our night out--if not the boat--in the end.

/etc

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [January 3, 2011, 9:17pm UTC](https://www.ruby-forum.com/t/0-9-3-on-openbsd-4-8/201257/2 "2011-01-03T21:17:38Z")

</div>

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 · GitHub](https://github.com/simpl/ngx_devel_kit)).

> 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. \< [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) \>

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [January 3, 2011, 11:19pm UTC](https://www.ruby-forum.com/t/0-9-3-on-openbsd-4-8/201257/3 "2011-01-03T23:19:28Z")

</div>

Hi!

2011/1/3 Nuno Magalhães [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid):

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

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [January 3, 2011, 10:29pm UTC](https://www.ruby-forum.com/t/0-9-3-on-openbsd-4-8/201257/4 "2011-01-03T22:29:55Z")

</div>

On Mon, Jan 3, 2011 at 20:16, Piotr S. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
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 · GitHub](https://github.com/simpl/ngx_devel_kit)).

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 🙂 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!

> **[Golden Hammer](https://xkcd.com/801/)**

/etc

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [January 4, 2011, 1:44am UTC](https://www.ruby-forum.com/t/0-9-3-on-openbsd-4-8/201257/5 "2011-01-04T01:44:34Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [January 4, 2011, 10:16am UTC](https://www.ruby-forum.com/t/0-9-3-on-openbsd-4-8/201257/6 "2011-01-04T10:16:06Z")

</div>

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. \< [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) \>

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [January 4, 2011, 12:39am UTC](https://www.ruby-forum.com/t/0-9-3-on-openbsd-4-8/201257/7 "2011-01-04T00:39:02Z")

</div>

2011/1/3 Nuno Magalhães [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid):  
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

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [January 4, 2011, 11:57am UTC](https://www.ruby-forum.com/t/0-9-3-on-openbsd-4-8/201257/8 "2011-01-04T11:57:22Z")

</div>

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. \< [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) \>

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [January 4, 2011, 11:49am UTC](https://www.ruby-forum.com/t/0-9-3-on-openbsd-4-8/201257/9 "2011-01-04T11:49:09Z")

</div>

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!

> **[Golden Hammer](https://xkcd.com/801/)**
>
> Took me five tries to find the right one, but I managed to salvage our night out--if not the boat--in the end.

/etc

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [January 4, 2011, 12:47pm UTC](https://www.ruby-forum.com/t/0-9-3-on-openbsd-4-8/201257/10 "2011-01-04T12:47:12Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [January 4, 2011, 12:43pm UTC](https://www.ruby-forum.com/t/0-9-3-on-openbsd-4-8/201257/11 "2011-01-04T12:43:26Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [January 4, 2011, 5:23pm UTC](https://www.ruby-forum.com/t/0-9-3-on-openbsd-4-8/201257/12 "2011-01-04T17:23:13Z")

</div>

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!

> **[Golden Hammer](https://xkcd.com/801/)**
>
> Took me five tries to find the right one, but I managed to salvage our night out--if not the boat--in the end.

/etc
