Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Collected build fixes #541

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion Makefile.am
Original file line number Diff line number Diff line change
@@ -24,7 +24,8 @@ AM_DISTCHECK_CONFIGURE_FLAGS = --with-bmv2 --with-fe-cpp
# ensure the distribution of the doxygen configuration file
EXTRA_DIST = $(top_srcdir)/docs/doxygen.cfg \
$(top_srcdir)/docs/bfn_latex.sty \
$(top_srcdir)/docs/*.md
$(top_srcdir)/docs/*.md \
autogen.sh

mostlyclean-local:
-$(RM) -r $(DX_CLEANFILES)
9 changes: 5 additions & 4 deletions configure.ac
Original file line number Diff line number Diff line change
@@ -2,9 +2,9 @@
# Process this file with autoconf to produce a configure script.

AC_PREREQ([2.68])
AC_INIT([PI], [0.1], [[email protected]])
AC_INIT([p4lang-pi], [0.1], [[email protected]])
AC_CONFIG_AUX_DIR([.])
AM_INIT_AUTOMAKE([foreign subdir-objects])
AM_INIT_AUTOMAKE([1.9 tar-pax foreign subdir-objects])
AC_CONFIG_HEADERS([config.h])

AC_PROG_CC
@@ -182,13 +182,14 @@ AC_MSG_RESULT([$CLANG])
# Enable all warnings. -Wno-tautological-constant-out-of-range-compare is
# necessary because clang is excessively aggressive with this warning and
# complains about some reasonable assertions.
EXTRA_CFLAGS="-Wall -Wextra"
EXTRA_CFLAGS="-Wall -Wextra -Wno-deprecated-declarations"
EXTRA_CPPFLAGS="-Wno-deprecated-declarations"
AS_IF([test "$enable_Werror" = "yes"], [EXTRA_CFLAGS="$EXTRA_CFLAGS -Werror"])
AS_IF([test "x$CLANG" = "xyes"],
[EXTRA_CFLAGS="$EXTRA_CFLAGS -Wno-tautological-constant-out-of-range-compare"])
AC_SUBST([AM_CFLAGS], ["$PTHREAD_CFLAGS $EXTRA_CFLAGS"])

AC_SUBST([AM_CPPFLAGS], ["-DPI_LOG_ON -isystem$INCLUDE_DIR"])
AC_SUBST([AM_CPPFLAGS], ["$EXTRA_CPPFLAGS -DPI_LOG_ON -isystem$INCLUDE_DIR"])
AC_SUBST([AM_LDFLAGS], ["-L$LIB_DIR"])

# Generate makefiles
2 changes: 1 addition & 1 deletion proto/frontend/src/device_mgr.cpp
Original file line number Diff line number Diff line change
@@ -2169,7 +2169,7 @@ class DeviceMgrImp {
case p4v1::StreamMessageRequest::kArbitration:
// must be handled by server code
RETURN_ERROR_STATUS(
Code::INTERNAL, "Arbitration mesages must be handled by server");
Code::INTERNAL, "Arbitration messages must be handled by server");
case p4v1::StreamMessageRequest::kPacket:
return packet_io.packet_out_send(request.packet(), stream_error);
case p4v1::StreamMessageRequest::kDigestAck:
2 changes: 1 addition & 1 deletion proto/server/Makefile.am
Original file line number Diff line number Diff line change
@@ -9,7 +9,7 @@ if WITH_SYSREPO
AM_CPPFLAGS += -DWITH_SYSREPO
endif

AM_CXXFLAGS = -Wall -Werror
AM_CXXFLAGS = -Wall -Werror -Wno-deprecated-declarations

lib_LTLIBRARIES = libpigrpcserver.la

1 change: 1 addition & 0 deletions proto/server/PI/proto/pi_server.h
Original file line number Diff line number Diff line change
@@ -20,6 +20,7 @@

#pragma once

#include "stddef.h"
#include "stdint.h"

#ifdef __cplusplus
2 changes: 1 addition & 1 deletion targets/bmv2/configure.ac
Original file line number Diff line number Diff line change
@@ -55,7 +55,7 @@ AC_TYPE_SIZE_T
EXTRA_CXXFLAGS="-Wall -Wextra"
AS_IF([test "$enable_Werror" = "yes"], [EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -Werror"])

AC_SUBST([AM_CPPFLAGS], ["-isystem$INCLUDE_DIR"])
AC_SUBST([AM_CPPFLAGS], ["-I$INCLUDE_DIR"])
AC_SUBST([AM_LDFLAGS], ["-L$LIB_DIR"])
AC_SUBST([AM_CXXFLAGS], ["$PTHREAD_CFLAGS $EXTRA_CXXFLAGS"])
AC_SUBST([AM_CFLAGS], ["$PTHREAD_CFLAGS"])
12 changes: 6 additions & 6 deletions targets/bmv2/conn_mgr.cpp
Original file line number Diff line number Diff line change
@@ -45,7 +45,7 @@ using namespace ::apache::thrift::transport; // NOLINT(build/namespaces)
namespace pibmv2 {

struct ClientImp {
::stdcxx::shared_ptr<TTransport> transport{nullptr};
std::shared_ptr<TTransport> transport{nullptr};
std::unique_ptr<StandardClient> client{nullptr};
std::unique_ptr<SimplePreLAGClient> mc_client{nullptr};
std::mutex mutex{};
@@ -70,14 +70,14 @@ int conn_mgr_client_init(conn_mgr_t *conn_mgr_state, dev_id_t dev_id,
assert(conn_mgr_state->clients.find(dev_id) == conn_mgr_state->clients.end());
auto &client = conn_mgr_state->clients[dev_id]; // construct

::stdcxx::shared_ptr<TTransport> socket(
std::shared_ptr<TTransport> socket(
new TSocket("localhost", thrift_port_num));
::stdcxx::shared_ptr<TTransport> transport(new TBufferedTransport(socket));
::stdcxx::shared_ptr<TProtocol> protocol(new TBinaryProtocol(transport));
std::shared_ptr<TTransport> transport(new TBufferedTransport(socket));
std::shared_ptr<TProtocol> protocol(new TBinaryProtocol(transport));

::stdcxx::shared_ptr<TMultiplexedProtocol> standard_protocol(
std::shared_ptr<TMultiplexedProtocol> standard_protocol(
new TMultiplexedProtocol(protocol, "standard"));
::stdcxx::shared_ptr<TMultiplexedProtocol> mc_protocol(
std::shared_ptr<TMultiplexedProtocol> mc_protocol(
new TMultiplexedProtocol(protocol, "simple_pre_lag"));

try {