This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author neologix
Recipients amaury.forgeotdarc, giampaolo.rodola, mluis, neologix, ogait87, orsenthil, pitrou, python-dev, rosslagerwall, slanden, vinay.sajip, vstinner
Date 2011-10-07.11:48:41
SpamBayes Score 1.3395096e-07
Marked as misclassified No
Message-id <1317988122.52.0.734155159497.issue10141@psf.upfronthosting.co.za>
In-reply-to
Content
From python-dev:
"""
I work on Ubuntu Jaunty for my cpython development work - an old version, I
know, but still quite serviceable and has worked well for me over many months.
With the latest default cpython repository, however, I can't run the regression
suite because the socket module now fails to build:

gcc -pthread -fPIC -g -O0 -Wall -Wstrict-prototypes -IInclude -I.
  -I./Include -I/usr/local/include -I/home/vinay/projects/python/default -c
  /home/vinay/projects/python/default/Modules/socketmodule.c
  -o build/temp.linux-i686-3.3-pydebug/home/vinay/projects/python/default
  /Modules/socketmodule.o
.../Modules/socketmodule.c: In function
‘makesockaddr’:
.../Modules/socketmodule.c:1224: error: ‘AF_CAN’ undeclared (first use in
this function)
.../Modules/socketmodule.c:1224: error: (Each undeclared identifier is
reported only once
.../Modules/socketmodule.c:1224: error: for each function it appears in.)
.../Modules/socketmodule.c: In function
‘getsockaddrarg’:
.../Modules/socketmodule.c:1610: error: ‘AF_CAN’ undeclared (first use in
this function)
.../Modules/socketmodule.c: In function ‘getsockaddrlen’:
.../Modules/socketmodule.c:1750: error: ‘AF_CAN’ undeclared (first use in
this function)

On this system, AF_CAN *is* defined, but in linux/socket.h, not in sys/socket.h.
From what I can see, sys/socket.h includes bits/socket.h which includes
asm/socket.h, but apparently linux/socket.h isn't included.
"""

Vinay, what happens if you replace in Modules/socketmodule.h:
"""
#ifdef HAVE_LINUX_CAN_H
#include <linux/can.h>
#endif
"""

with

"""
#ifdef HAVE_LINUX_CAN_H
#include <linux/socket.h>
#include <linux/can.h>
#endif
"""
History
Date User Action Args
2011-10-07 11:48:42neologixsetrecipients: + neologix, vinay.sajip, amaury.forgeotdarc, orsenthil, pitrou, vstinner, giampaolo.rodola, slanden, rosslagerwall, python-dev, ogait87, mluis
2011-10-07 11:48:42neologixsetmessageid: <1317988122.52.0.734155159497.issue10141@psf.upfronthosting.co.za>
2011-10-07 11:48:41neologixlinkissue10141 messages
2011-10-07 11:48:41neologixcreate