NetBSD Problem Report #52969
From www@NetBSD.org Tue Jan 30 23:13:00 2018
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
by mollari.NetBSD.org (Postfix) with ESMTPS id CD8407A16F
for <gnats-bugs@gnats.NetBSD.org>; Tue, 30 Jan 2018 23:12:59 +0000 (UTC)
Message-Id: <20180130231258.A6DCE7A220@mollari.NetBSD.org>
Date: Tue, 30 Jan 2018 23:12:58 +0000 (UTC)
From: dtyson@anduin.org.uk
Reply-To: dtyson@anduin.org.uk
To: gnats-bugs@NetBSD.org
Subject: /usr/pkgsrc/ham/uhd fails to build due to fallout from updated boost
X-Send-Pr-Version: www-1.0
>Number: 52969
>Category: pkg
>Synopsis: /usr/pkgsrc/ham/uhd fails to build due to fallout from updated boost
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: pkg-manager
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Tue Jan 30 23:15:00 +0000 2018
>Closed-Date: Sun Mar 11 00:25:38 +0000 2018
>Last-Modified: Sun Mar 11 00:25:38 +0000 2018
>Originator: Dave Tyson
>Release: current pkgsrc
>Organization:
Anduin
>Environment:
NetBSD dell.anduin.org.uk 8.0_BETA NetBSD 8.0_BETA (GENERIC.201801221730Z) amd64
>Description:
with the boost libs updated to 2.6 there are changes so that socket->native() is no longer supported. use socket->native_handle() instead
>How-To-Repeat:
cd /usr/pkgsrc/ham/uhd
make install
>Fix:
Apply the four patches:
patch-host_examples_network_relay.cpp
--- examples/network_relay.cpp.orig
+++ examples/network_relay.cpp
@@ -127,7 +127,7 @@
wait_for_thread.notify_one(); // notify constructor that this thread has started
std::vector<char> buff(insane_mtu);
while (not boost::this_thread::interruption_requested()){
- if (wait_for_recv_ready(_server_socket->native())){
+ if (wait_for_recv_ready(_server_socket->native_handle())){
boost::mutex::scoped_lock lock(_endpoint_mutex);
const size_t len = _server_socket->receive_from(asio::buffer(&buff.front(), buff.size()), _endpoint);
lock.unlock();
@@ -153,7 +153,7 @@
wait_for_thread.notify_one(); // notify constructor that this thread has started
std::vector<char> buff(insane_mtu);
while (not boost::this_thread::interruption_requested()){
- if (wait_for_recv_ready(_client_socket->native())){
+ if (wait_for_recv_ready(_client_socket->native_handle())){
const size_t len = _client_socket->receive(asio::buffer(&buff.front(), buff.size()));
boost::mutex::scoped_lock lock(_endpoint_mutex);
_server_socket->send_to(asio::buffer(&buff.front(), len), _endpoint);
patch-host_lib_transport_tcp_zero_copy.cpp
--- lib/transport/tcp_zero_copy.cpp
+++ lib/transport/tcp_zero_copy.cpp.orig
@@ -154,7 +154,7 @@
//create, open, and connect the socket
_socket.reset(new asio::ip::tcp::socket(_io_service));
_socket->connect(receiver_endpoint);
- _sock_fd = _socket->native();
+ _sock_fd = _socket->native_handle();
//packets go out ASAP
asio::ip::tcp::no_delay option(true);
patch-host_lib_transport_udp_simple.cpp
--- lib/transport/udp_simple.cpp.orig
+++ lib/transport/udp_simple.cpp
@@ -56,7 +56,7 @@
}
size_t recv(const asio::mutable_buffer &buff, double timeout){
- if (not wait_for_recv_ready(_socket->native(), timeout)) return 0;
+ if (not wait_for_recv_ready(_socket->native_handle(), timeout)) return 0;
return _socket->receive_from(asio::buffer(buff), _recv_endpoint);
}
patch-host_lib_transport_udp_zero_copy.cpp
--- lib/transport/udp_zero_copy.cpp.orig
+++ lib/transport/udp_zero_copy.cpp
@@ -190,7 +190,7 @@
_socket = socket_sptr(new asio::ip::udp::socket(_io_service));
_socket->open(asio::ip::udp::v4());
_socket->connect(receiver_endpoint);
- _sock_fd = _socket->native();
+ _sock_fd = _socket->native_handle();
//allocate re-usable managed receive buffers
for (size_t i = 0; i < get_num_recv_frames(); i++){
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->feedback
State-Changed-By: mef@NetBSD.org
State-Changed-When: Fri, 09 Mar 2018 11:43:19 +0000
State-Changed-Why:
Patch committed, thank you. Please report if really fixed.
From: "Makoto Fujiwara" <mef@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/52969 CVS commit: pkgsrc/ham/uhd
Date: Fri, 9 Mar 2018 11:36:40 +0000
Module Name: pkgsrc
Committed By: mef
Date: Fri Mar 9 11:36:40 UTC 2018
Modified Files:
pkgsrc/ham/uhd: distinfo
Added Files:
pkgsrc/ham/uhd/patches: patch-host_examples_network_relay.cpp
patch-host_lib_transport_tcp_zero_copy.cpp
patch-host_lib_transport_udp_simple.cpp
patch-host_lib_transport_udp_zero_copy.cpp
Log Message:
Fix recent fallout by boost lib update, as is proposed by Dave Tyson with
PR pkg/52969:
With the boost libs updated to 2.6 there are changes so that socket->native()
is no longer supported. use socket->native_handle() instead
To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 pkgsrc/ham/uhd/distinfo
cvs rdiff -u -r0 -r1.1 \
pkgsrc/ham/uhd/patches/patch-host_examples_network_relay.cpp \
pkgsrc/ham/uhd/patches/patch-host_lib_transport_tcp_zero_copy.cpp \
pkgsrc/ham/uhd/patches/patch-host_lib_transport_udp_simple.cpp \
pkgsrc/ham/uhd/patches/patch-host_lib_transport_udp_zero_copy.cpp
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
From: Dave Tyson <dtyson@anduin.org.uk>
To: gnats-bugs@netbsd.org
Cc: pkg-manager@netbsd.org, pkgsrc-bugs@netbsd.org, gnats-admin@netbsd.org, mef@netbsd.org
Subject: Re: pkg/52969 (/usr/pkgsrc/ham/uhd fails to build due to fallout from updated boost)
Date: Sat, 10 Mar 2018 21:36:45 +0000
On Friday 09 March 2018 11:43:19 mef@NetBSD.org wrote:
> Synopsis: /usr/pkgsrc/ham/uhd fails to build due to fallout from
> updated boost
>
> State-Changed-From-To: open->feedback
> State-Changed-By: mef@NetBSD.org
> State-Changed-When: Fri, 09 Mar 2018 11:43:19 +0000
> State-Changed-Why:
> Patch committed, thank you. Please report if really fixed.
Yes, I can confirm this is OK. Compiled the updated version on adm64
under a recent version of NetBSD current.
Dave
--
============================================
Phone: 07805784357
Open Source O/S: www.netbsd.org
Caving: http://www.wirralcavinggroup.org.uk
============================================
State-Changed-From-To: feedback->closed
State-Changed-By: mef@NetBSD.org
State-Changed-When: Sun, 11 Mar 2018 00:25:38 +0000
State-Changed-Why:
Submitter confirmed the problem has been fixed. Thank you.
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.43 2018/01/16 07:36:43 maya Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2017
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.