Macro `__CONFIG_GENMC_INODE_DATA_SIZE` not defined
lstricevic opened this issue · 1 comments
lstricevic commented
When compiling C code to LLVM-IR using GenMC v0.8 include directory, compilation fails because __CONFIG_GENMC_INODE_DATA_SIZE
macro is not defined. This happens for every program that includes GenMC version of pthread.h
header file.
Example:
$ clang -I ~/src/genmc/include -Xclang -disable-O0-optnone -g -emit-llvm -S test.c
In file included from test.c:2:
In file included from /home/lucky/src/genmc/include/pthread.h:30:
/home/lucky/src/genmc/include/genmc_internal.h:33:3: error: "Internal error: inode size not defined!"
# error "Internal error: inode size not defined!"
^
/home/lucky/src/genmc/include/genmc_internal.h:50:12: error: use of undeclared identifier '__CONFIG_GENMC_INODE_DATA_SIZE'
char data[__CONFIG_GENMC_INODE_DATA_SIZE]; // <-- used as data block mapping
^
2 errors generated.
michaliskok commented
Using LLVM-IR directly as GenMC input is discouraged; please invoke GenMC on C code directly. (Providing some preprocessor value for the undeclared identifier will get you past the error, but it is better to let GenMC handle compilation.)