I've experienced compiler problems with the CUDA 2.2 toolkit, when using the pedantic option of gcc. In the cuda.h and driver_types.h header files are enumerations that end with a comma, and gcc doesn't like that. The attached patch corrects these two header files. (The nvidia-cuda-sdk-2.2 and my CUDA applications were successfully tested) In addition, I'll attach two ebuilds. The first one is the original ebuild with the application of the patch. The second one is an extended version that installs the CUDA Visual Profiler as well (via USE flag 'profiler'). NVidia bundles the Visual Profiler now with the toolkit. However, there is also a nvidia-cuda-profiler gentoo package. I don't know whether the profiler should be moved into the toolkit like NVidia did, so I'll file another updated ebuild for the nvidia-cuda-profiler-2.2 in another bug report. Thanks in advance, Clemens Reproducible: Always Steps to Reproduce: 1. Install nvidia-cuda-toolkit-2.2 2. Compile your CUDA stuff with gccs '-pedantic' option. Actual Results: GCC fails due to comma at end of the enumerations. Expected Results: No complaints from GCC. Portage 2.1.6.13 (default/linux/x86/2008.0/desktop, gcc-4.3.2, glibc-2.8_p20080602-r1, 2.6.29-gentoo-r5 i686) ================================================================= System uname: Linux-2.6.29-gentoo-r5-i686-Intel-R-_Core-TM-2_Quad_CPU_Q6600_@_2.40GHz-with-glibc2.0 Timestamp of tree: Sun, 14 Jun 2009 07:15:02 +0000 ccache version 2.4 [enabled] app-shells/bash: 3.2_p39 dev-java/java-config: 2.1.7 dev-lang/python: 2.5.4-r2 dev-util/ccache: 2.4-r8 dev-util/cmake: 2.6.4 sys-apps/baselayout: 1.12.11.1 sys-apps/sandbox: 1.6-r2 sys-devel/autoconf: 2.13, 2.63 sys-devel/automake: 1.5, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.2 sys-devel/binutils: 2.18-r3 sys-devel/gcc-config: 1.4.1 sys-devel/libtool: 1.5.26 virtual/os-headers: 2.6.27-r2 ACCEPT_KEYWORDS="x86" CBUILD="i686-pc-linux-gnu" CFLAGS="-O2 -march=native -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/kde/4.2/env /usr/kde/4.2/share/config /usr/kde/4.2/shutdown /usr/share/config" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /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/sandbox.d /etc/splash /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c /etc/udev/rules.d" CXXFLAGS="-O2 -march=native -pipe -fomit-frame-pointer" DISTDIR="/usr/portage/distfiles" FEATURES="ccache distlocks fixpackages parallel-fetch protect-owned sandbox sfperms strict unmerge-orphans userfetch userpriv usersandbox" GENTOO_MIRRORS="http://ftp-stud.fht-esslingen.de/pub/Mirrors/gentoo/ http://mirrors.sec.informatik.tu-darmstadt.de/gentoo/ http://ftp.belnet.be/mirror/rsync.gentoo.org/gentoo/" LANG="de_DE.utf8" LC_ALL="de_DE.utf8" LDFLAGS="-Wl,-O1" LINGUAS="en de" MAKEOPTS="-j5" PKGDIR="/mnt/500gb/gentoo/binary_packages/x86_gcc4.3.2_Core2" PORTAGE_CONFIGROOT="/" PORTAGE_RSYNC_EXTRA_OPTS="--timeout=10" 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.europe.gentoo.org/gentoo-portage" USE="X a52 aac acl acpi alsa apache2 arts berkdb bluetooth branding bzip2 cairo cdr cli cracklib crypt cups dbus divx4linux dri dvd dvdr dvdread eds emboss encode esd evo fam ffmpeg firefox fortran gdbm gif glibc-omitfp gpm gstreamer gtk hal iconv ieee1394 imlib ipv6 isdnlog jpeg jpeg2k kde kdeprefix libnotify mad midi mikmod mmx mmx2 mng mozilla mp3 mpeg mudflap mysql ncurses nls nptl nptlonly nsplugin nvidia ogg opengl openmp oss pam pcre pdf perl png povray ppds pppd pthreads python qt3 qt3support qt4 quicktime readline reflection samba sdl session spell spl sse sse2 ssl startup-notification svg sysfs tcpd tetex theora tiff truetype type1 unicode usb v4l v4l2 vorbis webkit win32codecs x86 xcb xinerama xml xml2 xorg xulrunner xv xvid zlib" 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" 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 authn_alias authn_anon 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 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" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en de" USERLAND="GNU" VIDEO_CARDS="nvidia vesa" Unset: CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS
Created attachment 194622 [details, diff] Patch to correct the header files cuda.h and driver_types.h
Created attachment 194624 [details] ebuild for nvidia-cuda-toolkit-2.2 that applies the given patch (without visual profiler)
Created attachment 194626 [details] ebuild for nvidia-cuda-toolkit-2.2 that applies the given patch (with visual profiler) This ebuild adds a 'profiler' USE flag to install the Visual Profiler that is bundled with the toolkit. Note, that it installs also qt4 libraries, that are shipped by NVidia, into the bin directory of the profiler. It works for me (x86 and amd64) but may perhaps cause problems on other machines. I'm not familiar with the binary compatibility of the qt4 libs. Clemens
(In reply to comment #3) Thanks for the patch and the ebuild. I've just pushed an updated version of the 2.2 ebuild to the CVS. > Note, that it installs also qt4 libraries, that are shipped by NVidia, into the > bin directory of the profiler. It works for me (x86 and amd64) but may perhaps > cause problems on other machines. I'm not familiar with the binary > compatibility of the qt4 libs. This should be fine for now (the same thing was done in nvidia-cuda-profiler). The binary libs are definitely needed on amd64 systems (as 32-bit qt4 is not provided by any -compat packages), but could probably be avoided on x86. If you have a x86 machine on which you could test whether the visual profiler works with the current system qt4 libraries, I'd appreciate some feedback on that.
(In reply to comment #4) Great! It works with the gentoo qt4 (4.5.1), but you need the qt-core-4.5.1, qt-gui-4.5.1 and qt-assistant-4.5.1 packages (checked from the ldd output of the cudaprof binary). Clemens