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.

classification
Title: Python-3.3.3/Modules/socketmodule.c:1660:14: error: 'CAN_RAW' undeclared (first use in this function)
Type: compile error Stage: resolved
Components: Build Versions: Python 3.3
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: neologix Nosy List: Arfrever, lanthruster, neologix, pitrou, python-dev, vstinner
Priority: normal Keywords: 3.3regression, patch

Created on 2013-12-25 08:46 by lanthruster, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
build.log lanthruster, 2013-12-25 08:46 build log
af_can_define.diff neologix, 2014-01-23 18:56 review
Messages (7)
msg206919 - (view) Author: Igor Franchuk (lanthruster) Date: 2013-12-25 08:46
Missing CAN_RAW check in Python 3.3.3

Python 3.3.3 assumes that if AF_CAN is defined then CAN_RAW is defined as well.

It won't assemble with old kernels. 

Either an additional check for CAN_RAW should be applied in the configuration script or Python 3.3.3 dependence on the newest kernels should be made mandatory
(configure check). It could be back to normal if a CAN_RAW check is applied and the problematic part of code is excluded. 

Python 3.3.3 can work with sockets without full CAN support but it won't.

Environment:

System uname: Linux-2.6.33-gentoo-i686-Intel-R-_Pentium-R-_D_CPU_3.00GHz-with-gentoo-1.12.1
Timestamp of tree: Sun, 22 Dec 2013 09:30:01 +0000
ld GNU ld (GNU Binutils) 2.21
app-shells/bash:          4.2_p37
dev-lang/python:          2.4.3-r1::<unknown repository>, 2.6.8, 2.7.3-r3, 3.1.1-r1, 3.2.3-r2
dev-util/pkgconfig:       0.27.1
sys-apps/baselayout:      1.12.1::<unknown repository>
sys-apps/sandbox:         2.6-r1
sys-devel/autoconf:       2.13::<unknown repository>, 2.69
sys-devel/automake:       1.4_p6::<unknown repository>, 1.5::<unknown repository>, 1.6.3::<unknown repository>, 1.7.9-r1::<unknown repository>, 1.8.5-r3::<unknown repository>, 1.9.6-r2::<unknown repository>, 1.10::<unknown repository>, 1.11.1, 1.13.1
sys-devel/binutils:       2.21
sys-devel/gcc:            4.1.1::<unknown repository>, 4.2.4-r1, 4.4.2
sys-devel/gcc-config:     1.4.1
sys-devel/libtool:        1.5.23b::<unknown repository>, 2.4-r1
sys-devel/make:           3.82-r4
sys-kernel/linux-headers: 2.6.21::<unknown repository> (virtual/os-headers)
sys-libs/glibc:           2.10.1-r1
Repositories: gentoo
ACCEPT_KEYWORDS="x86"
ACCEPT_LICENSE="* -@EULA"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-march=pentium4 -O2 -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /var/bind"
CONFIG_PROTECT_MASK="/etc/env.d /etc/gconf /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-march=pentium4 -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FCFLAGS="-O2 -march=i686 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"
FFLAGS="-O2 -march=i686 -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY=""
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="acl alsa arts avi berkdb bitmap-fonts bzip2 cairo cdr cli cracklib crypt cups cxx dbus dlloader dri dvd dvdr eds emboss encode esd fam fortran gdbm gif gnutls gpm gstreamer gtk hal iconv isdnlog jpeg kde ldap libg++ mad mikmod modules mp3 mpeg mudflap ncurses nls nptl nptlonly ogg opengl openmp oss pam pcre pdflib perl png ppds pppd python qt3 qt4 quicktime readline reflection sdl session spell spl ssl svg symlink tcpd truetype truetype-fonts type1-fonts udev unicode vorbis win32codecs x86 xml xorg xv zlib" ABI_X86="32" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_3" RUBY_TARGETS="ruby19 ruby18" USERLAND="GNU" VIDEO_CARDS="fbdev glint intel mach64 mga nouveau nv r128 radeon savage sis tdfx trident vesa via vmware dummy v4l" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON
msg207126 - (view) Author: Arfrever Frehtes Taifersar Arahesis (Arfrever) * (Python triager) Date: 2013-12-31 22:19
Revision e767318baccd introduced usage of CAN_RAW.
msg208978 - (view) Author: Charles-François Natali (neologix) * (Python committer) Date: 2014-01-23 18:56
Sorry for the delay, I had completely forgotten this issue.

Igor, could you try the patch attached?
msg210687 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2014-02-08 21:55
New changeset b1ff233d3ab1 by Charles-François Natali in branch '3.3':
Issue #20065: socketmodule: Fix build error when AF_CAN is defined without the
http://hg.python.org/cpython/rev/b1ff233d3ab1

New changeset 39a60d62d2a6 by Charles-François Natali in branch 'default':
Issue #20065: socketmodule: Fix build error when AF_CAN is defined without the
http://hg.python.org/cpython/rev/39a60d62d2a6
msg210728 - (view) Author: Charles-François Natali (neologix) * (Python committer) Date: 2014-02-09 08:22
Should be fixed now.
msg214350 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2014-03-21 11:45
New changeset 9dc199b921eb by Vinay Sajip in branch '3.4':
Issue #10141, Issue 20065: Changed #if to take CAN_RAW into account.
http://hg.python.org/cpython/rev/9dc199b921eb

New changeset 20cced06acdd by Vinay Sajip in branch 'default':
Issue #10141, Issue 20065: Merged from 3.4.
http://hg.python.org/cpython/rev/20cced06acdd
msg222746 - (view) Author: Igor Franchuk (lanthruster) Date: 2014-07-11 14:20
Confirmed as fixed at least in Python 3.3.5 

Successfully compiled at 
Linux gw 2.6.33-gentoo #1 SMP Mon Mar 8 23:29:59 MSK 2010 i686 Intel(R) Pentium(R) D CPU 3.00GHz GenuineIntel GNU/Linux
History
Date User Action Args
2022-04-11 14:57:55adminsetgithub: 64264
2014-07-11 14:20:30lanthrustersetmessages: + msg222746
versions: - Python 3.4
2014-03-21 11:45:40python-devsetmessages: + msg214350
2014-02-09 08:22:21neologixsetstatus: open -> closed
resolution: fixed
messages: + msg210728

stage: resolved
2014-02-08 21:55:35python-devsetnosy: + python-dev
messages: + msg210687
2014-01-23 18:56:19neologixsetfiles: + af_can_define.diff
keywords: + patch
messages: + msg208978
2014-01-01 23:37:54vstinnersetnosy: + vstinner
2014-01-01 11:01:47neologixsetassignee: neologix
2013-12-31 22:19:09Arfreversetversions: + Python 3.4
nosy: + Arfrever, neologix, pitrou

messages: + msg207126

keywords: + 3.3regression
2013-12-25 19:40:11lanthrustersettype: compile error
2013-12-25 08:46:36lanthrustercreate