Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 235848 - python distutils not recognising difference between .cpp and .c files and using g++ or gcc accorindly
Summary: python distutils not recognising difference between .cpp and .c files and usi...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Python Gentoo Team
URL: http://docs.python.org/dist/describin...
Whiteboard:
Keywords: Bug
Depends on:
Blocks: 232151
  Show dependency tree
 
Reported: 2008-08-26 23:34 UTC by Sam Hodge
Modified: 2010-03-23 17:08 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sam Hodge 2008-08-26 23:34:40 UTC
It seems that distutils.extenstion should automatically recognise the difference between .c files and use /usr/bin/gcc and .cpp files and use /usr/bin/g++

as mentioned on this page here:
http://docs.python.org/dist/describing/extensions.html#SECTION002320000000000000000

the workaround is to set environment variables

CXX, CPP, CC etc to make sure the right compiler is used.

at the very least we should make use of the argument "linux-gnu-g++ -x c" so that c code get compiled with the g++ with the option of treating the code as C++


this has caused the following bug in cgkit

http://bugs.gentoo.org/show_bug.cgi?id=232151




emerge --info
Portage 2.1.4.4 (default-linux/x86/2007.0/desktop, gcc-4.1.2, glibc-2.6.1-r0, 2.6.25-gentoo-r7 i686)
=================================================================
System uname: 2.6.25-gentoo-r7 i686 Genuine Intel(R) CPU T2400 @ 1.83GHz
Timestamp of tree: Thu, 21 Aug 2008 00:36:01 +0000
ccache version 2.4 [disabled]
app-shells/bash:     3.2_p33
dev-java/java-config: 1.3.7, 2.1.6
dev-lang/python:     2.4.4-r13, 2.5.2-r6
dev-python/pycrypto: 2.0.1-r6
dev-util/ccache:     2.4-r7
sys-apps/baselayout: 1.12.11.1
sys-apps/sandbox:    1.2.18.1-r2
sys-devel/autoconf:  2.13, 2.61-r2
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.1
sys-devel/binutils:  2.18-r3
sys-devel/gcc-config: 1.3.16
sys-devel/libtool:   1.5.26
virtual/os-headers:  2.6.23-r3
ACCEPT_KEYWORDS="x86"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=prescott -pipe -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/config"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/terminfo /etc/udev/rules.d"
CXXFLAGS="-O2 -march=prescott -pipe -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="distlocks metadata-transfer sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="ftp://mirror.internode.on.net/pub/gentoo"
LANG="en_AU.UTF-8"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="3ds X a52 aac aalib acl acpi alsa apache2 arts berkdb bidi bitmap-fonts blender-game bluetooth bzip2 cairo cdb cdparanoia cdr cegui cg cli cracklib crypt cups cxx dbus devil divx dri dts dv dvb dvd dvdr dvdread eds emboss enblend encode esd evo examples fam ffmpeg firefox fluxbox fortran freetype gdbm gif gmedia gnome gpm gstreamer gtk hal heora iconv ieee1394 isdnlog ithreads john joystick jpeg kerberos laptop ldap licserver mad midi mikmod mjpeg mmx mozbranding mp3 mpeg mudflap mysql ncurses nls nptl nptlonly nsplugin nvidia ogg ogre openexr opengl openmp pcre pdf perl png portmon pppd python qt-static qt3support quicktime readline realmedia reflection sdl session shadow sift smp spell spl sqlite ssl svg symlink tcpd tga threads tiff truetype truetype-fonts type1-fonts unicode v4l v4l2 vorbis win32codecs winbind wmp x86 xml xorg xulrunner xv xvid xvnc zlib" ALSA_CARDS="hda-intel" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic auth_digest authn_anon authn_dbd authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock dbd deflate dir disk_cache env expires ext_filter file_cache filter headers ident imagemap include info log_config logio mem_cache mime mime_magic negotiation proxy proxy_ajp proxy_balancer proxy_connect proxy_http rewrite setenvif so speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="keyboard mouse synaptics joystick" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" USERLAND="GNU" VIDEO_CARDS="nvidia"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LC_ALL, LDFLAGS, LINGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS


Found 66 matches.
samh@trevor /media/cgKit/cgkit-2.0.0alpha8 $ eix dev-lang/python
[U] dev-lang/python
     Available versions:  
	(2.3)	2.3.5-r2 2.3.5-r3 ~2.3.6 2.3.6-r3 2.3.6-r6
	(2.4)	2.4.4-r5 2.4.4-r6 2.4.4-r13 2.4.4-r14
	(2.5)	2.5.2-r5 2.5.2-r6 ~2.5.2-r7
	{+cxx +threads berkdb bootstrap build doc elibc_uclibc examples gdbm ipv6 ncurses nocxx nothreads readline sqlite ssl tk ucs2 wininst}
     Installed versions:  2.4.4-r13(2.4)(10:12:07 06/07/08)(berkdb cxx examples gdbm ncurses readline ssl threads -bootstrap -build -doc -elibc_uclibc -ipv6 -tk -ucs2 -wininst)
			  2.5.2-r6(2.5)(08:32:35 16/08/08)(berkdb examples gdbm ncurses readline sqlite ssl threads -bootstrap -build -doc -elibc_uclibc -ipv6 -tk -ucs2 -wininst)
     Homepage:            http://www.python.org/
     Description:
Comment 1 Arfrever Frehtes Taifersar Arahesis (RETIRED) gentoo-dev 2010-03-23 17:08:15 UTC
It should be fixed in 2.6.5 and 3.1.2.