Compilation of Nginx on Solris 10 as 64bit

wega3k nginx-forum at nginx.us
Thu Oct 15 14:42:56 MSD 2009


I have also had this problem on Solaris 10 and SunCC.

The problem is that nginx's configure creates a broken objbs/Makefile when your own CFLAGS defined in your environment.

If you look at objs/Makefile after you've run configure without CFLAGS set, you will see in there
CFLAGS =  -fast -xipo  -errwarn=%all -g. Until the configure is fixed, I guess you could just edit that CFLAGS to what you want in the Makefile after running configure and before running your gmake.

Igor - The problem that the environment CFLAGS causes to the objs/MakeFile is illustrated in the following diff (Makefile generated with environment CFLAGS set is on the left, Makefile generated without environment CFLAGS is on the right)...

diff CFLAGSsetMakefile CFLAGSnotsetMakefile
3c3
< CFLAGS = -m32
---
> CFLAGS =  -fast -xipo  -errwarn=%all -g
293c293,294
<       -lsocket -lnsl -lsendfile -lmd -lz
---
>       -lsocket -lnsl -lsendfile -lmd -lz \
>       -fast -xipo
301c302
<               objs/ngx_modules.c
---
>               objs/ngx_modules.c src/os/unix/ngx_sunpro_x86.il
308c309
<               src/core/nginx.c
---
>               src/core/nginx.c src/os/unix/ngx_sunpro_x86.il
315c316
<               src/core/ngx_log.c
---
>               src/core/ngx_log.c src/os/unix/ngx_sunpro_x86.il
322c323
<               src/core/ngx_palloc.c
---
>               src/core/ngx_palloc.c src/os/unix/ngx_sunpro_x86.il
329c330
<               src/core/ngx_array.c
---
>               src/core/ngx_array.c src/os/unix/ngx_sunpro_x86.il
336c337
<               src/core/ngx_list.c

etc... You see the problem :)

Posted at Nginx Forum: http://forum.nginx.org/read.php?2,11617,13902#msg-13902






More information about the nginx mailing list