akwei / memcached

Automatically exported from code.google.com/p/memcached
0 stars 0 forks source link

memcached-1.4.15 build fails with Intel compiler icc due to missing -std=gnu99 option #343

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.
./configure  --with-libevent=/export/users/libevent/libevent-2.0.21-stable/
   or
./configure  CC=icc CXX=icpc  
--with-libevent=/export/users/libevent/libevent-2.0.21-stable/

2.
make CC=icc CXX=icpc

What is the expected output? What do you see instead?
icc -DHAVE_CONFIG_H -I.  -DNDEBUG 
-I/export/users/libevent/libevent-2.0.21-stable//include   -g -O2 -pthread 
-diag-disable 187 -Wall -Werror -MT memcached-memcached.o -MD -MP -MF 
.deps/memcached-memcached.Tpo -c -o memcached-memcached.o `test -f 
'memcached.c' || echo './'`memcached.c
memcached.c(4283): error: expected an expression
          for (char *p = strtok_r(list, ";,", &b);
               ^

memcached.c(4284): error: identifier "p" is undefined
               p != NULL;
               ^

compilation aborted for memcached.c (code 2)
make[2]: *** [memcached-memcached.o] Error 2

What version of the product are you using? On what operating system?
memcached-1.4.15 
Intel Linux icc version 12.1.6, 13.1.3, 14.0.1
gcc4.4.7, 4.8.1
RHEL6.4  

Please provide any additional information below.

It appears to be a problem with the configure for icc. 
memcached.c requires -std=gnu99 to succeed, which is used in the gcc 
compilation, but missing in the icc compilation. 
gcc also errors without it.

I’ve checked that memcached is built  successfully with icc 12.1.6, 13.1.3, 
14.0.1 releases with -std=gnu99 option:
export __INTEL_PRE_CFLAGS=”-std=gnu99”
or
make CC=icc CXX=icpc CFLAGS="-std=gnu99"

Original issue reported on code.google.com by semenova...@gmail.com on 26 Sep 2013 at 4:30

GoogleCodeExporter commented 9 years ago
I don't have any icc buildbot hosts right now... can't verify a fix myself.

Original comment by dorma...@rydia.net on 20 Dec 2013 at 8:55