Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 155623 - Nginx www-servers/nginx-0.4.13 doesn't build on gentoo/fbsd
Summary: Nginx www-servers/nginx-0.4.13 doesn't build on gentoo/fbsd
Status: RESOLVED FIXED
Alias: None
Product: Gentoo/Alt
Classification: Unclassified
Component: FreeBSD (show other bugs)
Hardware: All FreeBSD
: High normal (vote)
Assignee: Gentoo/BSD Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-11-18 15:32 UTC by Robert Sebastian Gerus
Modified: 2009-07-08 23:54 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Patch for www-servers/nginx-0.6.30.ebuild (nginx-0.6.30.ebuild.patch,299 bytes, patch)
2008-05-09 02:24 UTC, Jesus Rivero (RETIRED)
Details | Diff
Patch for www-servers/nginx-0.6.30 source. (nginx-0.6.30-make_var.patch,471 bytes, patch)
2008-05-09 02:27 UTC, Jesus Rivero (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Robert Sebastian Gerus 2006-11-18 15:32:26 UTC
When i tried to merge lighttpd, i encountered the following error:

gcc -c -Os -march=pentium2 -pipe  -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs \
                -o objs/ngx_modules.o \
                objs/ngx_modules.c
cp -p src/http/modules/perl/nginx.* objs/src/http/modules/perl/
cp -p src/http/modules/perl/typemap objs/src/http/modules/perl/
cp -p src/http/modules/perl/Makefile.PL objs/src/http/modules/perl/
cd objs/src/http/modules/perl                                           && NGX_PM_CFLAGS="-DHAS_FPSETMASK -DHAS_FLOATINGPOINT_H -fno-strict-aliasing -pipe -Wdeclaration-after-statement -I/usr/lib/perl5/5.8.8/i686-freebsd/CORE -g "                            NGX_PCRE=YES                                NGX_OBJS=objs                                            perl Makefile.PL                            LIB=
Writing Makefile for nginx
cp -p src/http/modules/perl/nginx.* objs/src/http/modules/perl/
cd objs/src/http/modules/perl && make
make: don't know how to make w. Stop
gmake[1]: *** [objs/src/http/modules/perl/blib/arch/auto/nginx/nginx.so] Error 2
gmake[1]: Leaving directory `/var/tmp/portage/www-servers/nginx-0.4.13/work/nginx-0.4.13'
gmake: *** [build] Error 2

!!! ERROR: www-servers/nginx-0.4.13 failed.
Call stack:
  ebuild.sh, line 1568:   Called dyn_compile
  ebuild.sh, line 937:   Called src_compile
  nginx-0.4.13.ebuild, line 56:   Called die

!!! failed to compile
!!! If you need support, post the topmost build error, and the call stack if relevant.
Comment 1 Jesus Rivero (RETIRED) gentoo-dev 2008-05-08 15:54:31 UTC
perl USE flag is the problem... when building without perl USE it compiles fine. 

Now, to build nginx perl module a perl Makefile.PL must be executed, that generates a Makefile which is gmake compatible but not with BSD make. If you change line 14 in auto/lib/perl/make in nginx sources from:

  cd $NGX_OBJS/src/http/modules/perl && make

to:

  cd $NGX_OBJS/src/http/modules/perl && gmake

it compiles OK!

I think it has to do with the fact that Makefile.PL does not produce standard makefiles? 

Best regards, 
Comment 2 Jesus Rivero (RETIRED) gentoo-dev 2008-05-09 02:20:32 UTC
Attaching ebuild patch and source patch to make nginx-0.6.30 compile in gfbsd. 

The patch substitutes a hard-coded make for $(MAKE) in auto/libs/perl/make (thanks to ndansmith) for gfbsd. The ebuild applies no patch for other systems. This is because in the case of nginx for Gentoo Linux,  $(MAKE) is not expanded into 'make' thus emerge fails... 

Best regards, 

PD: Although this is a patch for nginx-0.6.30, the same principle should apply to all versions. 

Comment 3 Jesus Rivero (RETIRED) gentoo-dev 2008-05-09 02:24:36 UTC
Created attachment 152561 [details, diff]
Patch for www-servers/nginx-0.6.30.ebuild

Patch for www-servers/nginx-0.6.30 to make it compile on gfbsd
Comment 4 Jesus Rivero (RETIRED) gentoo-dev 2008-05-09 02:27:16 UTC
Created attachment 152563 [details, diff]
Patch for www-servers/nginx-0.6.30 source. 

Patch to substitute 'make' for $(MAKE) in www-servers/nginx-0.6.30 sources (auto/libs/perl/make) to make it compile in gfbsd.. 

Goes into 'files' dir.

Best regards
Comment 5 Timothy Redaelli (RETIRED) gentoo-dev 2009-02-24 22:17:18 UTC
voxus, can you apply the patch to latest nginx (0.7.34), so we can finally keyword it?
Comment 6 Robert Buchholz (RETIRED) gentoo-dev 2009-07-08 23:54:54 UTC
  17 Mar 2009; Timothy Redaelli <drizzt@gentoo.org> nginx-0.7.39.ebuild:
  QA: Don't abuse ROOT wrt #232969, #258118. Add ~x86-fbsd keyword (with
  small patch) wrt #155623, #236429. (Maintainer is in devaway status)