Compilation of Nginx on Solris 10 as 64bit

wega3k nginx-forum at
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
< CFLAGS = -m32
> CFLAGS =  -fast -xipo  -errwarn=%all -g
<       -lsocket -lnsl -lsendfile -lmd -lz
>       -lsocket -lnsl -lsendfile -lmd -lz \
>       -fast -xipo
<               objs/ngx_modules.c
>               objs/ngx_modules.c src/os/unix/
<               src/core/nginx.c
>               src/core/nginx.c src/os/unix/
<               src/core/ngx_log.c
>               src/core/ngx_log.c src/os/unix/
<               src/core/ngx_palloc.c
>               src/core/ngx_palloc.c src/os/unix/
<               src/core/ngx_array.c
>               src/core/ngx_array.c src/os/unix/
<               src/core/ngx_list.c

etc... You see the problem :)

Posted at Nginx Forum:,11617,13902#msg-13902

More information about the nginx mailing list