[P4-dev] p4c compilation failed with

hemant at mnkcg.com hemant at mnkcg.com
Wed Feb 5 11:33:47 EST 2020


I updated my p4c repo and I see the problem what Frederic reported.

Andy,

Please update your p4c local repo to latest code and see if you can reproduce the issue - thanks.

Hemant 

-----Original Message-----
From: P4-dev <p4-dev-bounces at lists.p4.org> On Behalf Of Frédéric LOUI
Sent: Wednesday, February 05, 2020 9:50 AM
To: P4-dev <p4-dev at lists.p4.org>
Subject: [P4-dev] p4c compilation failed with

Hi expert,

Yesterday commit led to p4c package build failure.

The commit involved seems to be: 
https://github.com/p4lang/p4c/commit/e5b6c838d06e0075dd0d113600b01f5ae71498de

<p4c package build log extract>
…

n file included from /<<PKGBUILDDIR>>/obj-x86_64-linux-gnu/control-plane/unified_controlplane_sources_1.cpp:6:0:
/<<PKGBUILDDIR>>/control-plane/p4RuntimeSerializer.cpp: In function ‘boost::optional<p4::config::v1::MatchField_MatchType> P4::ControlPlaneAPI::getMatchType(cstring)’:
/<<PKGBUILDDIR>>/control-plane/p4RuntimeSerializer.cpp:629:40: error: ‘OPTIONAL’ is not a member of ‘P4::ControlPlaneAPI::MatchField::MatchTypes {aka p4::config::v1::MatchField}’
         return MatchField::MatchTypes::OPTIONAL;
                                        ^~~~~~~~
/<<PKGBUILDDIR>>/control-plane/p4RuntimeSerializer.cpp: In member function ‘void P4::ControlPlaneAPI::P4RuntimeEntriesConverter::addOptional(p4::v1::TableEntry*, int, const IR::Expression*, int, P4::TypeMap*) const’:
/<<PKGBUILDDIR>>/control-plane/p4RuntimeSerializer.cpp:1656:42: error: ‘class p4::v1::FieldMatch’ has no member named ‘mutable_optional’; did you mean ‘mutable_ternary’?
         auto protoOptional = protoMatch->mutable_optional();
                                          ^~~~~~~~~~~~~~~~
                                          mutable_ternary
control-plane/CMakeFiles/controlplane.dir/build.make:220: recipe for target 'control-plane/CMakeFiles/controlplane.dir/unified_controlplane_sources_1.cpp.o' failed
make[3]: *** [control-plane/CMakeFiles/controlplane.dir/unified_controlplane_sources_1.cpp.o] Error 1
make[3]: Leaving directory '/<<PKGBUILDDIR>>/obj-x86_64-linux-gnu'
CMakeFiles/Makefile2:1233: recipe for target 'control-plane/CMakeFiles/controlplane.dir/all' failed
make[2]: *** [control-plane/CMakeFiles/controlplane.dir/all] Error 2
make[2]: Leaving directory '/<<PKGBUILDDIR>>/obj-x86_64-linux-gnu'
Makefile:143: recipe for target 'all' failed
make[1]: *** [all] Error 2
make[1]: Leaving directory '/<<PKGBUILDDIR>>/obj-x86_64-linux-gnu'
dh_auto_build: cd obj-x86_64-linux-gnu && make -j1 returned exit code 2
debian/rules:6: recipe for target 'build' failed
make: *** [build] Error 2
dpkg-buildpackage: error: debian/rules build subprocess returned exit status 2
--------------------------------------------------------------------------------
Build finished at 20200205-1231
…
</p4c package build log extract>


More details here:
https://launchpad.net/~frederic-loui/+archive/ubuntu/p4lang-master-bionic-nightly/+build/18661464/+files/buildlog_ubuntu-bionic-amd64.p4c_1.1.0-rc1-202002051216-e5b6c83~ubuntu18.04.1_BUILDING.txt.gz

Any particular dependency or compilation options needs to be considered while building p4c ?
The link here below indicates how p4c is built:
https://github.com/frederic-loui/p4lang-packages/blob/master/bionic/p4c/debian/rules


Thanks for your help !

À bientôt,
--  Frederic





_______________________________________________
P4-dev mailing list
P4-dev at lists.p4.org
http://lists.p4.org/mailman/listinfo/p4-dev_lists.p4.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 1594 bytes
Desc: not available
URL: <http://lists.p4.org/pipermail/p4-dev_lists.p4.org/attachments/20200205/c981a425/attachment-0001.p7s>


More information about the P4-dev mailing list