Package Details: p4lang-p4c 1.2.4.17-2

Git Clone URL: https://aur.archlinux.org/p4lang-p4c.git (read-only, click to copy)
Package Base: p4lang-p4c
Description: P4 reference compiler
Upstream URL: https://github.com/p4lang/p4c
Licenses: Apache
Submitter: jkhsjdhjs
Maintainer: jkhsjdhjs
Last Packager: jkhsjdhjs
Votes: 1
Popularity: 0.138967
First Submitted: 2023-06-05 10:13 (UTC)
Last Updated: 2024-11-11 11:57 (UTC)

Latest Comments

jkhsjdhjs commented on 2024-11-11 11:57 (UTC)

@rex0916 Thanks for reporting this! I was able to reproduce your issue, should be fixed with 1.2.4.17-2.

rex0916 commented on 2024-11-11 11:02 (UTC)

A building problem I came across When gcc, clang and lld are installed, cmake will choose g++ as compiler, and lld as linker. which will cause linking problem.

https://bugs.llvm.org/show_bug.cgi?id=42446

jkhsjdhjs commented on 2023-11-25 16:10 (UTC)

Nice to hear that it worked for you! :)

leonderooij commented on 2023-11-25 09:26 (UTC)

I chose to disable the graphs backend, want to firstly use bmv2.

diff --git a/PKGBUILD b/PKGBUILD
index 12a3aa5..ae7e488 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -50,6 +50,7 @@ build() {
         -DCMAKE_UNITY_BUILD=ON \
         -DP4C_USE_PREINSTALLED_PROTOBUF=ON \
         -DENABLE_PROTOBUF_STATIC=OFF \
+        -DENABLE_P4C_GRAPHS=OFF \
         -DFETCHCONTENT_FULLY_DISCONNECTED=ON \
         -DFETCHCONTENT_SOURCE_DIR_GTEST=googletest-$_googletest_ver \
         -DFETCHCONTENT_SOURCE_DIR_BPFREPO=libbpf-$_libbpf_ver \

Seems to have resolved it for now, thanks again!

leonderooij commented on 2023-11-25 08:41 (UTC)

Hi @jkhsjdhjs, thank you for the quick reply! I will look into those options

jkhsjdhjs commented on 2023-11-25 07:22 (UTC)

@leonderooij Yes, this turned out to be a bug in boost/multi_index, which will be fixed in boost 1.84. Until then, you can either disable building the graphs backend (in case you don’t need it anyway) or apply the fix to boost manually to your install.
https://github.com/p4lang/p4c/issues/4147
https://github.com/boostorg/multi_index/issues/70

leonderooij commented on 2023-11-24 21:08 (UTC)

Hi, this is breaking for me with:

[ 80%] Building CXX object backends/graphs/CMakeFiles/p4cgraphs.dir/Unity/unity_0_cxx.cxx.o In file included from /usr/include/boost/multi_index/hashed_index.hpp:32, from /usr/include/boost/graph/named_graph.hpp:18, from /usr/include/boost/graph/adjacency_list.hpp:36, from /home/ldr/.cache/yay/p4lang-p4c/src/p4c-1.2.4.3/backends/graphs/graphs.h:33, from /home/ldr/.cache/yay/p4lang-p4c/src/p4c-1.2.4.3/backends/graphs/graphs.cpp:17, from /home/ldr/.cache/yay/p4lang-p4c/src/p4c-1.2.4.3/build/backends/graphs/CMakeFiles/p4cgraphs.dir/Unity/unity_0_cxx.cxx:4: /usr/include/boost/multi_index/detail/bucket_array.hpp: In function ‘void boost::serialization::load_construct_data(Archive&, boost::multi_index::detail::bucket_array<Allocator>, unsigned int)’: /usr/include/boost/multi_index/detail/bucket_array.hpp:239:19: error: there are no arguments to ‘bad_archive_exception’ that depend on a template parameter, so a declaration of ‘bad_archive_exception’ must be available [-fpermissive] 239 | throw_exception(bad_archive_exception()); | ^~~~~~~~~~~~~~~~~~~~~ /usr/include/boost/multi_index/detail/bucket_array.hpp:239:19: note: (if you use ‘-fpermissive’, G++ will accept your code, but allowing the use of an undeclared name is deprecated) In file included from /usr/include/boost/multi_index/hashed_index.hpp:35: /usr/include/boost/multi_index/detail/index_node_base.hpp: In function ‘void boost::serialization::load_construct_data(Archive&, boost::multi_index::detail::index_node_base<Value, Allocator>, unsigned int)’: /usr/include/boost/multi_index/detail/index_node_base.hpp:120:19: error: there are no arguments to ‘bad_archive_exception’ that depend on a template parameter, so a declaration of ‘bad_archive_exception’ must be available [-fpermissive] 120 | throw_exception(bad_archive_exception()); | ^~~~~~~~~~~~~~~~~~~~~ make[2]: *** [backends/graphs/CMakeFiles/p4cgraphs.dir/build.make:76: backends/graphs/CMakeFiles/p4cgraphs.dir/Unity/unity_0_cxx.cxx.o] Error 1 make[1]: *** [CMakeFiles/Makefile2:2508: backends/graphs/CMakeFiles/p4cgraphs.dir/all] Error 2 make: *** [Makefile:166: all] Error 2 ==> ERROR: A failure occurred in build(). Aborting... -> error making: p4lang-p4c