[P4-dev] p4c compilation failed

Frédéric LOUI frederic.loui at renater.fr
Fri Feb 7 04:35:18 EST 2020


> you should use a method to get those sources that matches the latest submodule commit versions, each time

Yes, that would be the ideal solution.

For p4lang debian BUSTER packages built using from Open Build Service I don’t have this issue as "git submodules" is inherently supported transparently.

On Launchpad the solution would be to have a dynamic recipe. (For now Bazaar recipe is  manual)
The recipe for p4c is here for example: https://code.launchpad.net/~frederic-loui/+recipe/p4lang-pi-master-bionic-nightly-single-deb

If you look at the page the recipe is:

<p4c recipe>
# git-build-recipe format 0.4 deb-version {debupstream}-{time}-{git-commit}
lp:p4lang-pi-nightly master
nest-part debian-pi lp:p4lang-packages bionic/PI/debian-single-deb debian
nest p4runtime lp:p4lang-p4-runtime-nightly proto/p4runtime/tmp a48b45754b39756c226d00380f6e3d00c3087a21
nest oc-gnmi lp:openconfig-gnmi proto/openconfig/gnmi/tmp 9c8d9e965b3e854107ea02c12ab11b70717456f2
nest oc-public lp:openconfig-public proto/openconfig/public/tmp 1040d11c089c74084c64c234bee3691ec70e8a9f
nest gtest lp:google-googletest third_party/googletest/tmp f5edb4f542e155c75bc4b516f227911d99ec167c
</p4c recipe>

Or I should build the packages against a fork of p4lang repository that includes the submodules beforehand.

I’ll check if there is a way to work around this submodule issue with Launchpad.

Thanks !

À bientôt,
--  Frederic

> Le 7 févr. 2020 à 10:11, Andy Fingerhut <andy.fingerhut at gmail.com> a écrit :
> And in general any of the P4 tool source repositories could change the commit they use for submodules at arbitrary times during the future, too.  Preferably when building from source, you should use a method to get those sources that matches the latest submodule commit versions, each time.
> Andy
> On Fri, Feb 7, 2020 at 12:19 AM Frédéric LOUI <frederic.loui at renater.fr> wrote:
> Hi Andy, Hemant,
> Thanks for your hints.
> Indeed after a quick check, p4c switched:
> - from commit [ e7a10bbc4178aad56055ca9384bbdbf18d15341a ] 
> - to commit [ a48b45754b39756c226d00380f6e3d00c3087a21 ]
> After having changed this, p4c build is successful again. 
> Merci !
> À bientôt,
> --  Frederic
> > Le 5 févr. 2020 à 19:01, Andy Fingerhut <andy.fingerhut at gmail.com> a écrit :
> > 
> > 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
> > 

More information about the P4-dev mailing list