Skip to content

Frama-clang include problem with directory hierarchy

ID0001797: This issue was created automatically from Mantis Issue 1797. Further discussion may take place here.


Id Project Category View Due Date Updated
ID0001797 Frama-Clang Plug-in > clang public 2014-06-04 2014-06-11
Reporter jens Assigned To virgile Resolution fixed
Priority normal Severity major Reproducibility always
Platform - OS - OS Version -
Product Version Frama-C Neon-20140301 Target Version - Fixed in Version -

Description :

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

Attachments

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information