Compile with icc compiler howto
Igor Sysoev
is at rambler-co.ru
Tue Feb 22 14:52:01 MSK 2005
On Tue, 22 Feb 2005, Denis O.Philippov wrote:
> Подскажите, пожалуйста что я делаю не так. Я пытаюсь собрать nginx
> компилятором icc
>
> #make clean
> #CC="icc" CXX="icpc" ./configure --with-pcre=../pcre-5.0 \
> --with-zlib=../zlib-1.2.1
> #make
>
> .......
> icc -c -O -Ob2 -ipo -ipo_obj -w1 -wd181 -wd269 -Werror -g -I src/core -I
> src/event -I src/event/modules -I src/os/unix -I ../pcre-5.0 -I ../zlib-1.2.1
> -I objs \
> -o objs/src/os/unix/ngx_setproctitle.o \
> src/os/unix/ngx_setproctitle.c
> src/os/unix/ngx_setproctitle.c(63): error #167: argument of type "char *" is
> incompatible with parameter of type "u_char={__u_char={unsigned char}} *"
> ngx_cpystrn(p, environ[i], size);
> ^
>
> src/os/unix/ngx_setproctitle.c(63): error #167: argument of type "char *" is
> incompatible with parameter of type "u_char={__u_char={unsigned char}} *"
> ngx_cpystrn(p, environ[i], size);
> ^
>
> compilation aborted for src/os/unix/ngx_setproctitle.c (code 2)
> make[1]: *** [objs/src/os/unix/ngx_setproctitle.o] Ошибка 2
> make[1]: Leaving directory `/root/nginx/nginx-0.1.20'
> make: *** [build] Ошибка 2
> #
Прилагаемый патч должен помочь.
Игорь Сысоев
http://sysoev.ru
-------------- next part --------------
--- src/os/unix/ngx_setproctitle.c Thu Feb 17 22:07:00 2005
+++ src/os/unix/ngx_setproctitle.c Tue Feb 22 13:42:18 2005
@@ -33,7 +33,7 @@
ngx_int_t
ngx_init_setproctitle(ngx_log_t *log)
{
- char *p;
+ u_char *p;
size_t size;
ngx_uint_t i;
@@ -61,8 +61,8 @@
size = ngx_strlen(environ[i]) + 1;
ngx_os_argv_last = environ[i] + size;
- ngx_cpystrn(p, environ[i], size);
- environ[i] = p;
+ ngx_cpystrn(p, (u_char *) environ[i], size);
+ environ[i] = (char *) p;
p += size;
}
}
More information about the nginx-ru
mailing list