ImportError: No module named __main__
Running switch in bmv2 without p4factory
./autogen.sh
./configure --with-bmv2 --with-switchsai
make
make 的时候报错:
ImportError: No module named __main__
make[4]: *** [pd_files.ts] Error 1
make[4]: Leaving directory
/home/**/p4factory/submodules/switch/p4-build/bmv2'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory
/home//p4factory/submodules/switch/p4-build'make[2]: *** [all] Error 2
make[2]: Leaving directory
/home/**/p4factory/submodules/switch/p4-build'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory
/home//p4factory/submodules/switch'make: *** [all] Error 2
请问这个是什么问题呢?
1 个回复
wisdom - 天下武功唯快不破
赞同来自: SDNLAB 、KKKKK
你好,问下你是在p4factory/submodules/switch/这个路径下编译的?p4factory已经不维护了,可以用这个https://github.com/p4lang/switch吧,我编译了下基本成功了,没遇到你这个报错,可以确认下依赖bmv2是否安装,p4c-bm是否更新到最新了,如果之前编译过最好把环境也clean下