Welcome! Log In Create A New Profile

Advanced

Re: nginx 1.0.6 perl module build failure

Maxim Dounin
September 12, 2011 04:40AM
Hello!

On Sun, Sep 11, 2011 at 08:30:15PM -0400, frostbyte wrote:

> Same error using perl 5.12 from MacPorts:
>
> $ ./configure --prefix=/usr/local --with-cc-opt="-I/usr/local/include
> -O2 -Wno-deprecated-declarations" --with-ld-opt="-L/usr/local/lib"
> --conf-path=/etc/nginx/nginx.conf
> --error-log-path=/var/log/nginx/error.log
> --http-log-path=/var/log/nginx/access.log
> --pid-path=/var/run/nginx/nginx.pid
> --lock-path=/var/run/nginx/nginx.lock
> --http-client-body-temp-path=/var/run/nginx/client_body_temp
> --http-proxy-temp-path=/var/run/nginx/proxy_temp
> --http-fastcgi-temp-path=/var/run/nginx/fastcgi_temp
> --http-uwsgi-temp-path=/var/run/nginx/uwsgi_temp --with-http_dav_module
> --with-http_flv_module --with-mail --with-http_ssl_module
> --with-mail_ssl_module --with-http_stub_status_module --with-ipv6
> --with-http_perl_module --with-perl=/usr/bin/perl
> --with-http_realip_module --with-http_addition_module
> --with-http_sub_module --with-http_gzip_static_module
> --with-perl=/opt/local/bin/perl
> . . .
> checking for perl
> + perl version: This is perl 5, version 12, subversion 3 (v5.12.3)
> built for darwin-multi-2level
> + perl interpreter multiplicity found
> . . .
>
> $ make
> . . .
> gcc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter
> -Wunused-function -Wunused-variable -Wno-unused-value -Werror -g
> -I/usr/local/include -O2 -Wno-deprecated-declarations -pipe -O2 -arch
> x86_64 -fno-common -DPERL_DARWIN -I/opt/local/include -no-cpp-precomp
> -fno-strict-aliasing -fstack-protector -I/opt/local/include
> -I/opt/local/lib/perl5/5.12.3/darwin-multi-2level/CORE -I src/core -I
> src/event -I src/event/modules -I src/os/unix -I /opt/local/include -I
> objs -I src/http -I src/http/modules -I src/http/modules/perl \
> -o objs/src/http/modules/perl/ngx_http_perl_module.o \
> src/http/modules/perl/ngx_http_perl_module.c
> In file included from src/http/modules/perl/ngx_http_perl_module.h:17,
> from src/http/modules/perl/ngx_http_perl_module.c:10:
> /opt/local/lib/perl5/5.12.3/darwin-multi-2level/CORE/perl.h:3336: error:
> expected specifier-qualifier-list before ‘bool’
> . . .
>
> Actually I started with the MacPorts nginx 1.0.6 install and then tried
> the tarball (getting the same result).

It looks like macports also patch handy.h in perl 5.12 and perl
5.14 to use stdbool.h [1][2] since about 3 months. (The perl 5.8
from macports still uses perl's native handy.h.)

Please try the following patch:

diff --git a/src/os/unix/ngx_atomic.h b/src/os/unix/ngx_atomic.h
--- a/src/os/unix/ngx_atomic.h
+++ b/src/os/unix/ngx_atomic.h
@@ -46,9 +46,6 @@ typedef volatile ngx_atomic_uint_t ngx_

#include <libkern/OSAtomic.h>

-/* "bool" conflicts with perl's CORE/handy.h */
-#undef bool
-

#define NGX_HAVE_ATOMIC_OPS 1


[1] https://trac.macports.org/browser/trunk/dports/lang/perl5.12/files/patch-handy.h.stdbool.diff
[2] https://trac.macports.org/browser/trunk/dports/lang/perl5.14/files/patch-handy.h.stdbool.diff

Maxim Dounin

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

nginx 1.0.6 perl module build failure

frostbyte September 09, 2011 09:08PM

Re: nginx 1.0.6 perl module build failure

Maxim Dounin September 10, 2011 07:18AM

Re: nginx 1.0.6 perl module build failure

Igor Sysoev September 10, 2011 07:48AM

Re: nginx 1.0.6 perl module build failure

Maxim Dounin September 10, 2011 09:26AM

Re: nginx 1.0.6 perl module build failure

Igor Sysoev September 10, 2011 10:10AM

Re: nginx 1.0.6 perl module build failure

frostbyte September 11, 2011 08:30PM

Re: nginx 1.0.6 perl module build failure

frostbyte September 11, 2011 08:32PM

Re: nginx 1.0.6 perl module build failure

frostbyte September 12, 2011 07:16AM

Re: nginx 1.0.6 perl module build failure

SergeyQw September 18, 2011 09:50AM

Re: nginx 1.0.6 perl module build failure

Maxim Dounin September 12, 2011 04:40AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 104
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready