[P4-dev] p4c compilation failed with

Andy Fingerhut andy.fingerhut at gmail.com
Wed Feb 5 13:01:04 EST 2020


Yes, as Hemant mentioned, probably a submodule issue, like you had for PI
builds recently.

My script that succeeds does this when cloning the p4c source code: `git
clone --recursive https://github.com/p4lang/p4c.git`

Probably whatever you did recently to change how the p4lang/PI repository
is cloned, to get its submodules recursively, would work for p4c as well.

Andy

On Wed, Feb 5, 2020 at 6:51 AM Frédéric LOUI <frederic.loui at renater.fr>
wrote:

> 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 --------------
An HTML attachment was scrubbed...
URL: <http://lists.p4.org/pipermail/p4-dev_lists.p4.org/attachments/20200205/4d3a68c7/attachment.html>


More information about the P4-dev mailing list