Everything compiled well, except for 3 files, Interval, FunctionPointers and SobelFilter.
It would be nice, if those doing testing at NVIDIA would consider to include gcc 4.5 as a supported version. 4.5 is not exactly bleeding edge any longer.
I haven’t had time to install CUDA 4.0rc yet, but this does not surprise me at all. Everytime there’s a new version of CUDA, it’s only working with gcc <= n-1, where n is the current gcc version.
Here is what I usually do:
in parallel to the current gcc version (currently 4.5.2 on Arch Linux), install an older one. Right now I have 4.3.4 and 4.4.4, available as “gcc-4.3” and “gcc-4.4”.
for each of these old compilers, create a folder, say /opt/gcc43 and /opt/gcc44, which contain symlinks to /usr/bin/g{cc,++}-4.{3,4} that are named “gcc” and “g++” without version numbers
run nvcc with the --compiler-bindir option: “nvcc --compiler-bindir /opt/gcc44 $CUFLAGS …”
This has worked well so far.
But I agree, people at NVIDIA should really consider upgrading their own gcc versions. gcc 4.5.0 has been released on April 14th, 2010 – that’s almost one year! And gcc 4.6.0 is in stage 4, so it won’t be long before it is released too…
The reason for not supporting gcc 4.5 yet was laid out in another thread. gcc 4.5 switches to DWARF3 frame format, so supporting it doesn’t just involve making the toolkit and nvcc emitted code play nicely with the compiler, it involves a complete overhaul of the cuda elf and binutils and cuda-gdb as well. Right none of that will work with gcc 4.5.
NVIDIA doesn’t directly target GCC versions. They target specific Linux distributions and the default gcc that ships with them. Since the 4.0 toolkit is only tested for Ubuntu 10.10, Fedora 13, OpenSUSE 11.2, etc, they only “have” to support gcc 4.4. (In the past this was not enforced with pre-processor directives, though. Have they been getting a bunch of bug reports from people using non-standard gcc versions??)
However, I do agree it can be a little annoying that the 4-6 month release cycle of CUDA is always going to be out of phase and one step behind the 6 month release cycle of the non-enterprise distros. It does seem weird that CUDA 4.0 is still targeting OpenSUSE 11.2, when 11.3 has been out for 3 months longer than Ubuntu 10.10. That seems like an oversight, or some more interesting problem.
I’m having the same problem under Fedora 14. I tried finding an RPM package for Fedora 14 for a 4.4 version of gcc, but could only find old links that no longer linked to packages. I downloaded a package built for Fedora 13 (gcc-4.4.4-2.fc13.x86_64.rpm) and tried to install that, but got:
rpm -ivh gcc-4.4.4-2.fc13.x86_64.rpm
warning: gcc-4.4.4-2.fc13.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID e8e40fde: NOKEY
error: Failed dependencies:
cpp = 4.4.4-2.fc13 is needed by gcc-4.4.4-2.fc13.x86_64
libgomp = 4.4.4-2.fc13 is needed by gcc-4.4.4-2.fc13.x86_64
At this point, I’m afraid I’m embarking down a dependency cascade, and wonder if it wouldn’t be easier to simply install Fedora 13. Does anyone have it working under Fedora 14, and if so, can you advise? I don’t really feel up to building gcc 4.4 from source.
ETA: Went ahead and backed off to Fedora 13 and gcc 4.4.5, and everything is working for me as of May 1, 2011.
lol, it`s a little bit offtopic, but when i trying to install PyCUDA on SLES SP1, i realized that there is no libcuda.so file. After all, i found that there is need in installation kernel devel rpm package before you install nvidia-devel driver. Then libcuda.so suddenly appears in /usr/lib64/. Or maybe this file appears after reinstalling SDK after driver.
After all PyCUDA installed.
Under the section GCC Version Issues, which shows how to install gcc 4.5, 4.3 and configure update-alternatives for easy switching. The same applies to adding gcc 4.4