Using nginx 1.1 with the intel compiler

Ryan Brown mp3geek at gmail.com
Sat Feb 25 01:22:36 UTC 2012


Though it actually compiles to a point then errors... (ignoring the
-Wunused-value warnings)

[root at bob:~/trunk]# export | grep cc
CC='icc  -I/usr/include/i386-linux-gnu/'
LD_LIBRARY_PATH=/opt/intel/composer_xe_2011_sp1.9.293/compiler/lib/ia32:/opt/intel/composer_xe_2011_sp1.9.293/ipp/../compiler/lib/ia32:/opt/intel/composer_xe_2011_sp1.9.293/ipp/lib/ia32:/opt/intel/composer_xe_2011_sp1.9.293/compiler/lib/ia32:/opt/intel/composer_xe_2011_sp1.9.293/mkl/lib/ia32:/opt/intel/composer_xe_2011_sp1.9.293/tbb/lib/ia32//cc4.1.0_libc2.4_kernel2.6.16.21:/opt/intel/composer_xe_2011_sp1.9.293/debugger/lib/ia32:/opt/intel/composer_xe_2011_sp1.9.293/mpirt/lib/ia32
LIBRARY_PATH=/opt/intel/composer_xe_2011_sp1.9.293/compiler/lib/ia32:/opt/intel/composer_xe_2011_sp1.9.293/ipp/../compiler/lib/ia32:/opt/intel/composer_xe_2011_sp1.9.293/ipp/lib/ia32:/opt/intel/composer_xe_2011_sp1.9.293/compiler/lib/ia32:/opt/intel/composer_xe_2011_sp1.9.293/mkl/lib/ia32:/opt/intel/composer_xe_2011_sp1.9.293/tbb/lib/ia32//cc4.1.0_libc2.4_kernel2.6.16.21
cc=icc
[root at bob:~/trunk]# icc --version
icc (ICC) 12.1.3 20120212
Copyright (C) 1985-2012 Intel Corporation.  All rights reserved.


cc: command line warning #10006: ignoring unknown option '-Wunused-value'
icc  -I/usr/include/i386-linux-gnu/ -c -pipe  -O -W -Wall
-Wpointer-arith -Wno-unused-parameter -Wunused-function
-Wunused-variable -Wunused-value -Werror -g  -I src/core -I src/event
-I src/event/modules -I src/os/unix -I objs \
                -o objs/src/core/ngx_hash.o \
                src/core/ngx_hash.c
icc: command line warning #10006: ignoring unknown option '-Wunused-value'
icc  -I/usr/include/i386-linux-gnu/ -c -pipe  -O -W -Wall
-Wpointer-arith -Wno-unused-parameter -Wunused-function
-Wunused-variable -Wunused-value -Werror -g  -I src/core -I src/event
-I src/event/modules -I src/os/unix -I objs \
                -o objs/src/core/ngx_buf.o \
                src/core/ngx_buf.c
icc: command line warning #10006: ignoring unknown option '-Wunused-value'
icc  -I/usr/include/i386-linux-gnu/ -c -pipe  -O -W -Wall
-Wpointer-arith -Wno-unused-parameter -Wunused-function
-Wunused-variable -Wunused-value -Werror -g  -I src/core -I src/event
-I src/event/modules -I src/os/unix -I objs \
                -o objs/src/core/ngx_queue.o \
                src/core/ngx_queue.c
icc: command line warning #10006: ignoring unknown option '-Wunused-value'
icc  -I/usr/include/i386-linux-gnu/ -c -pipe  -O -W -Wall
-Wpointer-arith -Wno-unused-parameter -Wunused-function
-Wunused-variable -Wunused-value -Werror -g  -I src/core -I src/event
-I src/event/modules -I src/os/unix -I objs \
                -o objs/src/core/ngx_output_chain.o \
                src/core/ngx_output_chain.c
icc: command line warning #10006: ignoring unknown option '-Wunused-value'
icc  -I/usr/include/i386-linux-gnu/ -c -pipe  -O -W -Wall
-Wpointer-arith -Wno-unused-parameter -Wunused-function
-Wunused-variable -Wunused-value -Werror -g  -I src/core -I src/event
-I src/event/modules -I src/os/unix -I objs \
                -o objs/src/core/ngx_string.o \
                src/core/ngx_string.c
icc: command line warning #10006: ignoring unknown option '-Wunused-value'
src/core/ngx_string.c(1519): error: identifier "bool" is undefined
      (bool) state = 0;
       ^

src/core/ngx_string.c(1519): error: expected a ";"
      (bool) state = 0;
             ^

compilation aborted for src/core/ngx_string.c (code 2)
make[1]: *** [objs/src/core/ngx_string.o] Error 2
make[1]: Leaving directory `/root/trunk'
make: *** [build] Error 2

from a ./configure

[root at bob:~/trunk]# ./configure
checking for OS
 + Linux 3.2.5-ck1 i686
checking for C compiler ... found
 + using GNU C compiler
 + gcc version: 4.6.0 compatibility)
checking for gcc -pipe switch ... found
checking for gcc builtin atomic operations ... found
checking for C99 variadic macros ... found
checking for gcc variadic macros ... found
checking for unistd.h ... found
checking for inttypes.h ... found
checking for limits.h ... found
checking for sys/filio.h ... not found
checking for sys/param.h ... found
checking for sys/mount.h ... found
checking for sys/statvfs.h ... found
checking for crypt.h ... found
checking for Linux specific features
checking for epoll ... found

But when it comes to compiling it uses icc (as above), the machine
does have gcc-4.6 installed also

I didn't see any error messages in auto/cc/icc, I did noticed it
reference icc up to 11.x but not 12?


2012/2/25 Maxim Dounin <mdounin at mdounin.ru>:
> Hello!
>
> On Sat, Feb 25, 2012 at 12:48:34PM +1300, Ryan Brown wrote:
>
>> Any clues on this?
>
> It looks like you somehow persuaded nginx that your compiler is
> gcc, and it uses command line arguments appropiate for gcc instead
> of ones for icc.  See auto/cc/icc for a long list of warnings which
> should be ignored with icc.
>
> Maxim Dounin
>
>>
>> On Thu, Feb 23, 2012 at 10:36 AM, Ryan Brown <mp3geek at gmail.com> wrote:
>> > Okay, manage to get it to compile,
>> >
>> > make[1]: Entering directory `/root/trunk'
>> > /opt/intel/bin/icc -c -pipe  -O -W -Wall -Wpointer-arith
>> > -Wno-unused-parameter -Wunused-function -Wunused-variable
>> > -Wunused-value -Werror -g  -I src/core -I src/event -I
>> > src/event/modules -I src/os/unix -I objs \
>> >                -o objs/src/core/ngx_string.o \
>> >                src/core/ngx_string.c
>> > icc: command line warning #10006: ignoring unknown option '-Wunused-value'
>> > src/core/ngx_string.c(1519): error #188: enumerated type mixed with another type
>> >      state = 0;
>> >            ^
>> >
>> > compilation aborted for src/core/ngx_string.c (code 2)
>> > make[1]: *** [objs/src/core/ngx_string.o] Error 2
>>
>> _______________________________________________
>> nginx mailing list
>> nginx at nginx.org
>> http://mailman.nginx.org/mailman/listinfo/nginx
>
> _______________________________________________
> nginx mailing list
> nginx at nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx



More information about the nginx mailing list