Fails to compile with prefix on Mac?

I tried both the stable (0.7.63.) and development (0.8.24) version, but
both fail to even start compiling on Mac OS X 10.6 with a prefix.

setenv MACOSX_DEPLOYMENT_TARGET 10.6
setenv CPPFLAGS -I$HOME/unix/local/include
setenv LDFLAGS -L$HOME/unix/local/lib
./configure --prefix=$HOME/unix/local --with-pcre=$HOME/unix/local
make

Crashes out trying to do a configure in the prefix directory.

See below. Any ideas?

Thanks.

zany:~/unix/install/nginx-0.8.24% setenv MACOSX_DEPLOYMENT_TARGET 10.6
zany:~/unix/install/nginx-0.8.24% setenv CPPFLAGS
-I$HOME/unix/local/include
zany:~/unix/install/nginx-0.8.24% setenv LDFLAGS -L$HOME/unix/local/lib
zany:~/unix/install/nginx-0.8.24% ./configure --prefix=$HOME/unix/local
–with-pcre=$HOME/unix/local
checking for OS

  • Darwin 10.0.0 i386
    checking for C compiler … found
  • using GNU C compiler
  • gcc version: 4.2.1 (Apple Inc. build 5646) (dot 1)
    checking for gcc -pipe switch … found
    checking for gcc variadic macros … found
    checking for C99 variadic macros … found
    checking for unistd.h … found
    checking for inttypes.h … found
    checking for limits.h … found
    checking for sys/filio.h … found
    checking for sys/param.h … found
    checking for sys/mount.h … found
    checking for sys/statvfs.h … found
    checking for crypt.h … not found
    checking for Darwin specific features
  • kqueue found
    checking for kqueue’s EVFILT_TIMER … found
    checking for Darwin 64-bit kqueue millisecond timeout bug … not found
    checking for sendfile() … found
    checking for atomic(3) … found
    checking for nobody group … found
    checking for poll() … found
    checking for /dev/poll … not found
    checking for crypt() … found
    checking for F_READAHEAD … not found
    checking for posix_fadvise() … not found
    checking for O_DIRECT … not found
    checking for F_NOCACHE … found
    checking for directio() … not found
    checking for statfs() … found
    checking for statvfs() … found
    checking for dlopen() … found
    checking for sched_yield() … found
    checking for system md library … not found
    checking for system md5 library … not found
    checking for OpenSSL md5 crypto library … found
    checking for zlib library … found
    creating objs/Makefile
    checking for int size … 4 bytes
    checking for long size … 8 bytes
    checking for long long size … 8 bytes
    checking for void * size … 8 bytes
    checking for uint64_t … found
    checking for sig_atomic_t … found
    checking for sig_atomic_t size … 4 bytes
    checking for socklen_t … found
    checking for in_addr_t … found
    checking for in_port_t … found
    checking for rlim_t … found
    checking for uintptr_t … uintptr_t found
    checking for system endianess … little endianess
    checking for size_t size … 8 bytes
    checking for off_t size … 8 bytes
    checking for time_t size … 8 bytes
    checking for setproctitle() … not found
    checking for pread() … found
    checking for pwrite() … found
    checking for strerror_r() … found
    checking for gnu style strerror_r() … found but is not working
    checking for localtime_r() … found
    checking for posix_memalign() … found
    checking for memalign() … not found
    checking for mmap(MAP_ANON|MAP_SHARED) … found
    checking for mmap(“/dev/zero”, MAP_SHARED) … found but is not working
    checking for System V shared memory … found
    checking for struct msghdr.msg_control … found
    checking for ioctl(FIONBIO) … found
    checking for struct tm.tm_gmtoff … found
    checking for struct dirent.d_namlen … found
    checking for struct dirent.d_type … found

Configuration summary

  • using PCRE library: /Users/peter/unix/local
  • OpenSSL library is not used
  • md5: using system crypto library
  • sha1 library is not used
  • using system zlib library

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

zany:~/unix/install/nginx-0.8.24% make
make -f objs/Makefile
cd /Users/peter/unix/local
&& if [ -f Makefile ]; then make distclean; fi
&& CC=“gcc” CFLAGS="-O2 -fomit-frame-pointer -pipe "
./configure --disable-shared
/bin/sh: ./configure: No such file or directory
make[1]: *** Error 127
make: *** Error 2
zany:~/unix/install/nginx-0.8.24%

Posted at Nginx Forum:

Hello!

On Wed, Nov 11, 2009 at 10:33:10PM -0500, peterneillewis wrote:

I tried both the stable (0.7.63.) and development (0.8.24) version, but both fail to even start compiling on Mac OS X 10.6 with a prefix.

setenv MACOSX_DEPLOYMENT_TARGET 10.6
setenv CPPFLAGS -I$HOME/unix/local/include
setenv LDFLAGS -L$HOME/unix/local/lib
./configure --prefix=$HOME/unix/local --with-pcre=$HOME/unix/local
make

Crashes out trying to do a configure in the prefix directory.

[…]

Remove --with-pcre=$HOME/unix/local.

Maxim D.

Then it fails with:

./configure: error: the HTTP rewrite module requires the PCRE library.
You can either disable the module by using --without-http_rewrite_module
option, or install the PCRE library into the system, or build the PCRE
library
statically from the source with nginx by using --with-pcre= option.

Reading more carefully, I tried using

./configure --prefix=$HOME/unix/local --with-pcre==…/pcre-8.00/

but that fails to, with

zany:~/unix/install/nginx-0.8.24% make
make -f objs/Makefile
objs/Makefile:998: *** empty variable name. Stop.
make: *** Error 2

Posted at Nginx Forum:

Well duh! Double ==, now that was a rookie mistake!

./configure --prefix=$HOME/unix/local --with-pcre=…/pcre-8.00/

works. Now off to play and see whether I can get it to replace apache
in my usage.

Thanks!

Posted at Nginx Forum:

On Thu, Nov 12, 2009 at 05:39:09AM -0500, peterneillewis wrote:

Then it fails with:

./configure: error: the HTTP rewrite module requires the PCRE library.
You can either disable the module by using --without-http_rewrite_module
option, or install the PCRE library into the system, or build the PCRE library
statically from the source with nginx by using --with-pcre= option.

Reading more carefully, I tried using

./configure --prefix=$HOME/unix/local --with-pcre==…/pcre-8.00/

  • ./configure --prefix=$HOME/unix/local --with-pcre==…/pcre-8.00/
  • ./configure --prefix=$HOME/unix/local --with-pcre=…/pcre-8.00/