Package Details: p4lang-pi 0.1.0-4

Git Clone URL: https://aur.archlinux.org/p4lang-pi.git (read-only, click to copy)
Package Base: p4lang-pi
Description: An implementation framework for a P4Runtime server
Upstream URL: https://github.com/p4lang/PI
Licenses: Apache-2.0
Submitter: insmtr
Maintainer: insmtr
Last Packager: insmtr
Votes: 0
Popularity: 0.000000
First Submitted: 2026-03-05 11:23 (UTC)
Last Updated: 2026-05-06 17:40 (UTC)

Latest Comments

jkhsjdhjs commented on 2026-03-13 09:34 (UTC)

Yep, that works, thanks!

insmtr commented on 2026-03-13 05:56 (UTC)

@jkhsjdhjs

I added sed -i 's/with_proto_demo=yes/with_proto_demo=no/' proto/configure.ac, so it should be fine now. Thanks for pointing it out!

jkhsjdhjs commented on 2026-03-12 15:54 (UTC)

I just tried to build it in a clean chroot, and that also worked for me. So I dug deeper and noticed that the error is from the demo_grpc component. This is only built, if all dependencies, such as libmicrohttpd, are present:

https://github.com/p4lang/PI/blob/5689c91a8a7423781267b27d8b166c49a53904ff/proto/configure.ac#L73-L79

libmicrohttpd is installed on my system, but not in the chroot, so it tries to built the demo_grpc on my system, but not in the chroot. Unfortunately it doesn't seem to be possible to skip building this grpc demo, if libmicrohttpd is installed. Could you patch the configure.ac, that I linked above, and patch it such that this component is not built? E.g. by setting with_proto_demo=no

insmtr commented on 2026-03-12 13:51 (UTC)

@jkhsjdhjs

I tried building it on my own computer and it worked. I also attempted to build it using paru -U --chroot, which was also successful.

The protobuf version on my own computer and in the chroot environment is the same. Could you check if your version is consistent?

protobuf 33.1-4
boost-libs 1.89.0-4

Or does your gcc or makepkg.conf treat warnings as errors by default? I see you have -Werror=unused-result in your log.

In short, I cannot reproduce your issue, but you can try adding something like -Wno-error to PKGBUILD and try again. If it works, I will add it to the script.

jkhsjdhjs commented on 2026-03-12 12:39 (UTC)

Thanks for your suggestions for p4lang-bmv2! I just tried to apply your changes, but this package fails to build for me. Do you have an idea?

test_perf.cpp: In member function ‘int P4RuntimeClient::assign_device(int, const pi_p4info_t*)’:
test_perf.cpp:115:27: error: ignoring return value of ‘p4::config::v1::P4Info* p4::v1::ForwardingPipelineConfig::release_p4info()’, declared with attribute ‘nodiscard’ [-Werror=unused-result]
  115 |     config->release_p4info();
      |     ~~~~~~~~~~~~~~~~~~~~~~^~


In file included from ../grpc_out/p4/v1/p4runtime.grpc.pb.h:22,
                 from test_perf.cpp:20:
../cpp_out/p4/v1/p4runtime.pb.h:24327:52: note: declared here
24327 | inline ::p4::config::v1::P4Info* PROTOBUF_NULLABLE ForwardingPipelineConfig::release_p4info() {
      |                                                    ^~~~~~~~~~~~~~~~~~~~~~~~
In file included from simple_router_mgr.cpp:21:
simple_router_mgr.h:81:19: error: ‘boost::asio::io_service’ has not been declared; did you mean ‘boost::asio::use_service’?
   81 |                   boost::asio::io_service &io_service,
      |                   ^~~~~
In file included from web_server.cpp:22:
simple_router_mgr.h:81:19: error: ‘boost::asio::io_service’ has not been declared; did you mean ‘boost::asio::use_service’?
   81 |                   boost::asio::io_service &io_service,
      |                   ^~~~~
simple_router_mgr.h:165:16: error: ‘io_service’ in namespace ‘boost::asio’ does not name a type; did you mean ‘use_service’?
  165 |   boost::asio::io_service &io_service;
      |                ^~~~~~~~~~
      |                use_service
In file included from app.cpp:21:
simple_router_mgr.h:81:19: error: ‘boost::asio::io_service’ has not been declared; did you mean ‘boost::asio::use_service’?
   81 |                   boost::asio::io_service &io_service,
      |                   ^~~~~
simple_router_mgr.h:165:16: error: ‘io_service’ in namespace ‘boost::asio’ does not name a type; did you mean ‘use_service’?
  165 |   boost::asio::io_service &io_service;
      |                ^~~~~~~~~~
      |                use_service
simple_router_mgr.h: In member function ‘void SimpleRouterMgr::post_event(E&&)’:
simple_router_mgr.h:104:5: error: ‘io_service’ was not declared in this scope [-Wtemplate-body]
  104 |     io_service.post(std::move(event));
      |     ^~~~~~~~~~
simple_router_mgr.h:165:16: error: ‘io_service’ in namespace ‘boost::asio’ does not name a type; did you mean ‘use_service’?
  165 |   boost::asio::io_service &io_service;
      |                ^~~~~~~~~~
      |                use_service
simple_router_mgr.h: In member function ‘void SimpleRouterMgr::post_event(E&&)’:
simple_router_mgr.h:104:5: error: ‘io_service’ was not declared in this scope [-Wtemplate-body]
  104 |     io_service.post(std::move(event));
      |     ^~~~~~~~~~
web_server.cpp: In function ‘int {anonymous}::answer_to_connection(void*, MHD_Connection*, const char*, const char*, const char*, const char*, size_t*, void**)’:
web_server.cpp:199:39: error: invalid conversion from ‘int (*)(void*, MHD_ValueKind, const char*, const char*, const char*, const char*, const char*, uint64_t, size_t)’ {aka ‘int (*)(void*, MHD_ValueKind, const char*, const char*, const char*, const char*, const char*, long unsigned int, long unsigned int)’} to ‘MHD_PostDataIterator’ {aka ‘MHD_Result (*)(void*, MHD_ValueKind, const char*, const char*, const char*, const char*, const char*, long unsigned int, long unsigned int)’} [-fpermissive]
  199 |           connection, POSTBUFFERSIZE, iterate_post,
      |                                       ^~~~~~~~~~~~
      |                                       |
      |                                       int (*)(void*, MHD_ValueKind, const char*, const char*, const char*, const char*, const char*, uint64_t, size_t) {aka int (*)(void*, MHD_ValueKind, const char*, const char*, const char*, const char*, const char*, long unsigned int, long unsigned int)}
In file included from web_server.cpp:26:
/usr/include/microhttpd.h:4647:49: note: initializing argument 3 of ‘MHD_PostProcessor* MHD_create_post_processor(MHD_Connection*, size_t, MHD_PostDataIterator, void*)’
 4647 |                            MHD_PostDataIterator iter, void *iter_cls);
      |                            ~~~~~~~~~~~~~~~~~~~~~^~~~