Welcome! Log In Create A New Profile

Advanced

Re: nginx 1.0.6 perl module build failure

September 10, 2011 10:10AM
On Sat, Sep 10, 2011 at 05:24:04PM +0400, Maxim Dounin wrote:
> Hello!
>
> On Sat, Sep 10, 2011 at 03:46:26PM +0400, Igor Sysoev wrote:
>
> > On Sat, Sep 10, 2011 at 03:17:24PM +0400, Maxim Dounin wrote:
> > > Hello!
> > >
> > > On Fri, Sep 09, 2011 at 09:08:08PM -0400, frostbyte wrote:
> > >
> > > > Snow Leopard 10.6.7, Xcode 4.0.1:
> > > >
> > > > $ cd nginx-1.0.6
> > > > $ ./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
> > > >
> > > > $ 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 -arch x86_64 -arch
> > > > i386 -arch ppc -g -pipe -fno-common -DPERL_DARWIN -fno-strict-aliasing
> > > > -I/usr/local/include
> > > > -I/System/Library/Perl/5.10.0/darwin-thread-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:
> > > > /System/Library/Perl/5.10.0/darwin-thread-multi-2level/CORE/perl.h:3240:
> > > > error: expected specifier-qualifier-list before ‘bool’
> > > > ...
> > > >
> > > > Seems to be a know issue in other contexts.
> > >
> > > Looks like problem with perl in your environment.
> > >
> > > You may try building basic samples from perlembed manpage to see
> > > what goes wrong, most likely either ccopts as returned by "perl
> > > -MExtUtils::Embed -e ccopts" are incorrect, or they correspond to
> > > other C compiler (check "perl -V" output).
> >
> > No, this is known issue with MacOSX system perl.
> > This is conflict between "bool" definition included via
> > libkern/OSAtomic.h and perl's CORE/handy.h.
> > I do not personaly encounter this since I have perl from macports :)
>
> Error message suggests that "bool" is not defined. And looking
> though [1] I don't see bool defined via libkern/OSAtomic.h.
> OSTypes.h defines "Boolean", but not "bool".
>
> While I feel perl's handy.h is utterly wrong in it's aproach to
> "bool" (it's 2011 now, more than 10 years since C99 defined
> stdbool.h!), I still doesn't see what happens here. Additionally,
> I see Apple hacks handy.h on it's system perl to include
> stdbool.h[2], and this makes me wonder even more.
>
> Could you please confirm that perlembed sample does actually
> compiles fine with Mac OS X system perl without extra includes
> used?
>
> [1] http://www.opensource.apple.com/source/xnu/xnu-1699.22.81/libkern/libkern/OSAtomic.h
> [2] http://www.opensource.apple.com/source/perl/perl-73/5.10/fix/handy.h.ed

It seems last time when I tried to build nginx with MacOSX system perl
it was Leopard 10.5.x. On Snow Leopard 10.6.8 "#undef bool" in
src/os/unix/ngx_atomic is not required, but
perl -MExtUtils::Embed -e ldopts
issues settings which do not allow to link nginx:
-arch x86_64 -arch i386 -arch ppc -L/usr/local/lib -L/System/Library/Perl/5.10.0/darwin-thread-multi-2level/CORE -lperl -ldl -lm -lutil -lc

ld: warning: in objs.gcc/src/core/nginx.o, file was built for unsupported file format which is not the architecture being linked (i386)


--
Igor Sysoev

_______________________________________________
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: 308
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready