twitter-archive / torch-ipc

A set of primitives for parallel computation in Torch
Apache License 2.0
95 stars 28 forks source link

Compile error ISO C99 doesn’t support unnamed structs/unions... #32

Closed FreemanX closed 7 years ago

FreemanX commented 7 years ago

Try to install with luarock install ipc and it can't compile automatically. Then I download the source code and change the following line to C11 https://github.com/twitter/torch-ipc/blob/master/CMakeLists.txt#L16

nicholas-leonard commented 7 years ago

@FreemanX What error do you get exactly?

FreemanX commented 7 years ago

Just a minor error for those who use cuda causing the failure of auto-install with luarocks : /usr/local/cuda-8.0/include/cuda.h:393:10: error: ISO C99 doesn’t support unnamed structs/unions [-Werror=pedantic] }; ^ /usr/local/cuda-8.0/include/cuda.h:403:10: error: ISO C99 doesn’t support unnamed structs/unions [-Werror=pedantic] }; ^ cc1: all warnings being treated as errors make[2]: * [CMakeFiles/ipc.dir/src/cliser.c.o] Error 1 make[1]: * [CMakeFiles/ipc.dir/all] Error 2 make: *\ [all] Error 2

Error: Build error: Failed building.