lpereira / lwan

Experimental, scalable, high performance HTTP server
https://lwan.ws
GNU General Public License v2.0
5.92k stars 549 forks source link

Fail to build with gcc 4.8.2 #111

Closed guoxiao closed 9 years ago

guoxiao commented 9 years ago
[  2%] Built target generate_mime_types_table
[  5%] Building C object common/CMakeFiles/lwan-common.dir/lwan-coro.c.o
In file included from /tmp/lwan/common/lwan-coro.c:28:0:
/tmp/lwan/common/lwan.h:38:29: error: expected declaration specifiers or ‘...’ before numeric constant
 #define DEFAULT_BUFFER_SIZE 4096
                             ^
/tmp/lwan/common/lwan-coro.c:37:15: note: in expansion of macro ‘DEFAULT_BUFFER_SIZE’
 static_assert(DEFAULT_BUFFER_SIZE < (CORO_STACK_MIN + PTHREAD_STACK_MIN),
               ^
/tmp/lwan/common/lwan-coro.c:38:5: error: expected declaration specifiers or ‘...’ before string constant
     "Request buffer fits inside coroutine stack");
     ^
make[2]: *** [common/CMakeFiles/lwan-common.dir/lwan-coro.c.o] Error 1
make[1]: *** [common/CMakeFiles/lwan-common.dir/all] Error 2
make: *** [all] Error 2
gcc --version                                                                                             
gcc (GCC) 4.8.2 20140120 (Red Hat 4.8.2-15)
lpereira commented 9 years ago

What distribution are you running? It should be easier for me to try it out and fix if I can install the same distribution.

guoxiao commented 9 years ago

I'm using a CentOS 6.1 with a GCC 4.8.2 from RedHat Dev Toolset 2. I was just now success building lwan in Fedora 22. So I think it may be a platform specific problem.

fiorix commented 9 years ago

Definitely, CentOS 6.1 is quite old.

lpereira commented 9 years ago

I'm closing this issue as CentOS 6.1 is from 2011 -- definitely quite old. I unfortunately don't have much resources (or even desire) to support old compilers.

Feel free to reopen the issue (or open a new one) should you find problems building Lwan with a newer distribution.