P4LLVM icon indicating copy to clipboard operation
P4LLVM copied to clipboard

P4C Compatibility

Open kimonk opened this issue 3 years ago • 5 comments

I'm trying to built P4LLVM with the latest version of P4C and there seems to be incompatibilities. Which was the latest version with which this was tested so I can try with that?

kimonk avatar Jun 14 '22 16:06 kimonk

Hi,

The current repo as such contains a working setup with a version of P4C forked about 4-5 years back. However it is outdated, and we did not get to test on the later versions of P4C.

svkeerthy avatar Jun 14 '22 16:06 svkeerthy

With a fresh copy, I get this error msg right off the bat:

"Error copying directory from "/home/kimonk/amd/P4LLVM/p4_14include" to "/home/kimonk/amd/P4LLVM/build/p4_14include". make[2]: *** [CMakeFiles/update_includes.dir/build.make:71: CMakeFiles/update_includes] Error 1 make[1]: *** [CMakeFiles/Makefile2:410: CMakeFiles/update_includes.dir/all] Error 2 make: *** [Makefile:146: all] Error 2"

If I just create this directory, it goes on but fails after a while by saying:

"In file included from /home/kimonk/amd/P4LLVM/frontends/parsers/parserDriver.cpp:12, from /home/kimonk/amd/P4LLVM/build/frontends/unified_frontend_sources_1.cpp:9: /home/kimonk/amd/P4LLVM/frontends/parsers/p4/p4lexer.hpp:12:10: fatal error: frontends/parsers/p4/p4parser.hpp: No such file or directory 12 | #include "frontends/parsers/p4/p4parser.hpp" | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ compilation terminated."

So files seems to be missing.

kimonk avatar Jun 14 '22 17:06 kimonk

@kimonk Hello! I met the same problem. Did you solve it?

RuSeKon avatar Dec 09 '22 09:12 RuSeKon

Hi @RuSeKon , Sadly, I did not. I couldn't figure it out and I dropped it. It would be interesting for us to re-evaluate this as a way forward though if this issue is resolved.

kimonk avatar Dec 09 '22 10:12 kimonk

I try to change CMakeLists.txt. On line 288 i simply changed "${P4C_SOURCE_DIR}/p4_14include" with existent dir "${P4C_SOURCE_DIR}/p4include". Build completed successfully, but I'm not sure if this is really the right way.

RuSeKon avatar Dec 12 '22 09:12 RuSeKon