Python Socket module Issues

Jan Beich jbeich at FreeBSD.org
Fri Jun 22 22:40:29 UTC 2018


The Doctor <doctor at 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?


More information about the freebsd-ports mailing list