ipdk-io / ipdk

Infrastructure Programmer Development Kit (IPDK) is an open source, vendor agnostic framework of drivers and APIs for infrastructure offload and management that runs on a CPU, IPU, DPU or switch.
Apache License 2.0
184 stars 68 forks source link

build/networking/scripts/build_p4c.sh is not building properly #145

Closed abdulawal1 closed 2 years ago

abdulawal1 commented 2 years ago

Trying to build p4c using the script and seeing error that the patch cannot be applied. Is it a valid issue?

The log is as below.

./scripts/build_p4c.sh /root/ipdk_upstream_build_temp Removing P4C directory if it already exits Cloning P4C repo Num cores on a system: 72 Number of Parallel threads used: -j18 ...

Cloning into 'P4C'... remote: Enumerating objects: 78962, done. remote: Counting objects: 100% (83/83), done. remote: Compressing objects: 100% (63/63), done. remote: Total 78962 (delta 27), reused 62 (delta 20), pack-reused 78879 Receiving objects: 100% (78962/78962), 94.82 MiB | 4.68 MiB/s, done. Resolving deltas: 100% (65030/65030), done. Submodule 'backends/ebpf/runtime/contrib/libbpf' (https://github.com/libbpf/libbpf) registered for path 'backends/ebpf/runtime/contrib/libbpf' Submodule 'control-plane/p4runtime' (https://github.com/p4lang/p4runtime.git) registered for path 'control-plane/p4runtime' Submodule 'test/frameworks/gtest' (https://github.com/google/googletest.git) registered for path 'test/frameworks/gtest' Cloning into '/root/ipdk_upstream_build_temp/P4C/backends/ebpf/runtime/contrib/libbpf'... remote: Enumerating objects: 8224, done. remote: Counting objects: 100% (10/10), done. remote: Compressing objects: 100% (10/10), done. remote: Total 8224 (delta 3), reused 2 (delta 0), pack-reused 8214 Receiving objects: 100% (8224/8224), 4.95 MiB | 3.07 MiB/s, done. Resolving deltas: 100% (5451/5451), done. Cloning into '/root/ipdk_upstream_build_temp/P4C/control-plane/p4runtime'... remote: Enumerating objects: 1725, done. remote: Counting objects: 100% (371/371), done. remote: Compressing objects: 100% (238/238), done. remote: Total 1725 (delta 175), reused 274 (delta 114), pack-reused 1354 Receiving objects: 100% (1725/1725), 7.80 MiB | 3.85 MiB/s, done. Resolving deltas: 100% (956/956), done. Cloning into '/root/ipdk_upstream_build_temp/P4C/test/frameworks/gtest'... remote: Enumerating objects: 24389, done. remote: Counting objects: 100% (54/54), done. remote: Compressing objects: 100% (31/31), done. remote: Total 24389 (delta 22), reused 35 (delta 17), pack-reused 24335 Receiving objects: 100% (24389/24389), 10.32 MiB | 4.80 MiB/s, done. Resolving deltas: 100% (18039/18039), done. Submodule path 'backends/ebpf/runtime/contrib/libbpf': checked out '3b239425426e4fa1c204ea3c708d36ec3f509702' Submodule path 'control-plane/p4runtime': checked out '7a322f35f0c80bf20bc7fcc96f9d1ab77e5fd07a' Submodule path 'test/frameworks/gtest': checked out 'aa148eb2b7f70ede0eb10de34b6254826bfb34f4' Note: switching to '4837beadf3fc390dd3a39434fec4fa6658e993be'.

You are in 'detached HEAD' state. You can look around, make experimental changes and commit them, and you can discard any commits you make in this state without impacting any branches by switching back to a branch.

If you want to create a new branch to retain commits you create, you may do so (now or later) by using -c with the switch command. Example:

git switch -c

Or undo this operation with:

git switch -

Turn off this advice by setting config variable advice.detachedHead to false

HEAD is now at 4837beadf Handle struct expression in ebfp backend (#3173) error: patch failed: control-plane/p4RuntimeSerializer.cpp:148 error: control-plane/p4RuntimeSerializer.cpp: patch does not apply

stolsma commented 2 years ago

Probably copy of #140 and subsequently solved by #139

Maybe your local git repo needs to be updated to incorporate the solving commit of #139 ?

abdulawal1 commented 2 years ago

Thanks for the tip @stolsma . Duplicate of #140. Closing it now.