Frama-clang include problem with directory hierarchy
ID0001797: This issue was created automatically from Mantis Issue 1797. Further discussion may take place here.
|ID0001797||Frama-Clang||Plug-in > clang||public||2014-06-04||2014-06-11|
|Product Version||Frama-C Neon-20140301||Target Version||-||Fixed in Version||-|
The attached tar file contains a small directory hierarchy
problem206-dir ├── nonmutating │ └── equal │ ├── README │ └── equal.c └── typedefs.h
The file equal.c includes the file typedefs.h which is two layers up in the hierarchy. When I call
frama-c.byte -cxx-clang-command="framaCIRGen -I../.." equal.c
then I receive the following error message
[kernel] preprocessing with "gcc -C -E -I. equal.c" equal.c:2:20: fatal error: typedefs: No such file or directory #include "typedefs" ^ compilation terminated. [kernel] user error: failed to run: gcc -C -E -I. -o '/tmp/equal.c5f0bc4.i' 'equal.c' you may set the CPP environment variable to select the proper preprocessor command or use the option "-cpp-command". [kernel] user error: skipping file "equal.c" that has errors. [kernel] Frama-C aborted: invalid user input.
Additional Information :
I am particularly baffled by the kernels message to "use -cpp-command" because I thought this option is not to be used with frama-clang.
Also, the problem disappears when the header typedefs.h is only one level above equal.c. (Of course, the command line has to be changed accordingly.)
The example can also be found in acslplusplus/C++Examples/Problems/problem206-dir