Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 23 Jun 2018 00:40:24 +0200
From:      Jan Beich <jbeich@FreeBSD.org>
To:        The Doctor <doctor@doctor.nl2k.ab.ca>
Cc:        freebsd-ports@freebsd.org
Subject:   Re: Python Socket module Issues
Message-ID:  <po0i-a1if-wny@FreeBSD.org>
In-Reply-To: <20180622184351.GC33073@doctor.nl2k.ab.ca> (The Doctor's message of "Fri, 22 Jun 2018 12:43:51 -0600")
References:  <20180622184351.GC33073@doctor.nl2k.ab.ca>

next in thread | previous in thread | raw e-mail | index | archive | help
The Doctor <doctor@doctor.nl2k.ab.ca> writes:

> Sometimes when copiling Python I run into
>
> /usr/ports/lang/python36/work/Python-3.6.5/Modules/socketmodule.c:1832:10: error:
> use of undeclared identifier 'AF_PACKET'
> case AF_PACKET:
>      ^

AF_PACKET code is guarded by HAVE_NETPACKET_PACKET_H which is defined by
AC_CHECK_HEADERS(netpacket/packet.h) in configure.ac. If you have the file
under /usr/include, /usr/local/include or somewhere else that CPPFLAGS
or CFLAGS points to then you may want to override the check via
CONFIGURE_ENV+=ac_cv_header_netpacket_packet_h=no in Makefile.local for
just lang/python* or in /etc/make.conf for all.

netpacket/packet.h appears to be provided by libc package only on Linux.
If you don't want to a assume pilot error then try bisecting the host
environment against a pristine jail until you get can narrow down the
steps to reproduce worth for a bug report.

> Here is a solution:
>
> Alias AF_PAKCET to AF_LINK and 
>  alias ifr.ifr_ifindex to ifr.ifr_ifru.ifru_index

Why not contact the maintainer instead of suggesting possibly incorrect fix?



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?po0i-a1if-wny>