kazeburo / Gazelle

Preforked Plack Handler for performance freaks
https://metacpan.org/release/Gazelle
Other
74 stars 19 forks source link

Build fails on FreeBSD #19

Closed TLINDEN closed 8 years ago

TLINDEN commented 8 years ago

perlbrew with 5.22.0:

% perl Build.PL 
/tmp/d5xR_Z7xAH.c: In function 'main':
/tmp/d5xR_Z7xAH.c:8: warning: implicit declaration of function 'accept4'
/tmp/d5xR_Z7xAH.c:8: error: 'SOCK_CLOEXEC' undeclared (first use in this function)
/tmp/d5xR_Z7xAH.c:8: error: (Each undeclared identifier is reported only once
/tmp/d5xR_Z7xAH.c:8: error: for each function it appears in.)
/tmp/d5xR_Z7xAH.c:8: error: 'SOCK_NONBLOCK' undeclared (first use in this function)
Created MYMETA.yml and MYMETA.json
Creating new 'Build' script for 'Gazelle' version '0.40'
cp META.json MYMETA.json
There is no META.yml... You may install this module from the repository...

It created a Build script although there were errors. So:

% ./Build
Building Gazelle
cc -I/home/me/perl5/perlbrew/perls/perl-5.22.0/lib/5.22.0/amd64-freebsd/CORE -DVERSION="0.40" -DXS_VERSION="0.40" -DPIC -fPIC -c -DHAS_FPSETMASK -DHAS_FLOATINGPOINT_H -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -D_FORTIFY_SOURCE=2 -O -o lib/Plack/Handler/Gazelle.o lib/Plack/Handler/Gazelle.c
lib/Plack/Handler/Gazelle.xs:32:43: error: picohttpparser/picohttpparser.c: No such file or directory
lib/Plack/Handler/Gazelle.xs:173: warning: 'struct phr_header' declared inside parameter list
lib/Plack/Handler/Gazelle.xs:173: warning: its scope is only this definition or declaration, which is probably not what you want
lib/Plack/Handler/Gazelle.xs: In function 'header_is':
lib/Plack/Handler/Gazelle.xs:176: error: dereferencing pointer to incomplete type
lib/Plack/Handler/Gazelle.xs:178: error: dereferencing pointer to incomplete type
lib/Plack/Handler/Gazelle.xs: In function '_parse_http_request':
lib/Plack/Handler/Gazelle.xs:233: error: array type has incomplete element type
error building lib/Plack/Handler/Gazelle.o from 'lib/Plack/Handler/Gazelle.c' at /home/me/perl5/perlbrew/perls/perl-5.22.0/lib/5.22.0/ExtUtils/CBuilder/Base.pm line 173.

System:

% gcc -v
Using built-in specs.
Target: amd64-undermydesk-freebsd
Configured with: FreeBSD/amd64 system compiler
Thread model: posix
gcc version 4.2.1 20070719  [FreeBSD]

9.1-RELEASE-p4 FreeBSD 9.1-RELEASE-p4 #0 r252292:

best, Tom

syohex commented 8 years ago

You need git submodule setup if you install from source code.

% git clone https://github.com/kazeburo/Gazelle
% cd Gazelle
% git submodule init
% git submodule update

or

% git clone --recursive https://github.com/kazeburo/Gazelle
TLINDEN commented 8 years ago

Works like a charm, thanks a lot!