Please make sure that
– PATH includes /usr/local/cuda-10.0/bin
– LD_LIBRARY_PATH includes /usr/local/cuda-10.0/lib64, or, add /usr/local/cuda-10.0/lib64 to /etc/ld.so.conf and run ldconfig as root

To uninstall the CUDA Toolkit, run the uninstall script in /usr/local/cuda-10.0/bin

Please see CUDA_Installation_Guide_Linux.pdf in /usr/local/cuda-10.0/doc/pdf for detailed information on setting up CUDA.

***WARNING: Incomplete installation! This installation did not install the CUDA Driver. A driver of version at least 384.00 is required for CUDA 10.0 functionality to work.
To install the driver using this installer, run the following command, replacing with the name of this run file:
sudo .run -silent -driver

Logfile is /tmp/cuda_install_23154.log

1.7 Post Installation Tasks

Make sure that PATH includes /usr/local/cuda-10.0/bin and LD_LIBRARY_PATH includes /usr/local/cuda-10.0/lib64. You can of course do this per user or use some other method, but here is one method to do this. Run following command (copy & paste all lines to console) to create /etc/profile.d/cuda.sh file:

Modify host_config.h
As usual, we need to comment out the section of NVIDIA’s host_config.h that prevents us from using newer GCC versions. In a slight twist from last time, we need to modify /usr/local/cuda/include/crt/host_config.h (Note that the /usr/local/cuda part depends on where you chose to install during the installation). Comment out the line

#error — unsupported GNU version! gcc versions later than 6 are not supported!

For me, that was line 121.

Modify floatn.h
For some reason, nvcc does not like 128 bit floats, so we need to modify /usr/include/bits/floatn.h. The easiest way to do this (e.g. the way that involves opening as few files as possible) is to add

#ifdef __CUDACC__
#define __HAVE_FLOAT128 0
#endif

just after the section of floatn.h that defines __HAVE_FLOAT128. In my copy, this was line 37.

So far, the only error I am getting is related to having an outdated driver, so I think

*****/

I can’t figure outwhere I got the next edit but it is to add:

CCFLAGS := -ansi

to all Makefiles. This and removing some c++ style comments (// …) allows me to compile all of the examples except c++11_cuda. Unfortunately, that won’t compile because the C++ compiler I have is:

gcc version 8.2.1 20181011 (Red Hat 8.2.1-4) (GCC)

which when set to -ansi removes the C++11 ability. This in turn means I can’t install OpenCV with CUDA support since that requires at least C++11.

So I’m at a dead end for now. Do you have any suggestions? How long do you think it will be before the CUDA Toolkit catches up to Fedora 28 and gcc 8.

Unfortunately I don’t have any idea when CUDA toolkit catch up to Fedora 28 and gcc 8. I guess that nVidia CUDA is more targeted to RHEL and CentOS than Fedora, because Fedora use always latest packages.

Why the step 1.7 (updating the PATH and LD_LIBRARY_PATH) with the cude.sh in /etc/profile.d/ does not work?
I tried logout and system restart both doesn’t update the PATH. I can update through ~/.bashrc.

I have a GTX 750 running on Fedora 29. I have installed NVIDIA-Linux-x86_64-390.87-patched.run. (410.78 and 415.13 fail in gnome-display-manager). cuda_10.0.130_410.48_linux.run fails on driver incompatablity. cuda_9.1.85_387.26_linux.run installs and precompiled binaries work, but the Nvidia compiler, nvcc fails because my gcc version in greater than 6. I would like to install cuda 10.0 and run it with nvidia 410 or 415. Do you have a patched version of one of these or instruct how to create one? thanks

I got Blender CUDA rendering to work on Fedora 29 by using clang to compile the cuda kernels instead of gcc. Simply running nvcc with parameter “-ccbin clang-7”. I actually replaced nvcc with a shell script: “/usr/local/cuda/bin/nvcc-old -ccbin clang-7 [email protected]”. Probably just a stupid hack, but I did not like the idea of downgrading gcc :P
“.

It seems that GCC-8.2 is still not compatible with CUDA-10.0 on Fedora-29.
The “deviceQuery” example works fine. However, building any other CUDA-10 examples available in the NVIDIA_CUDA-10.0_Samples leads to an error.

“error — unsupported GNU version! gcc versions later than 7 are not supported!”

After modifying the
/opt/cuda-10.0/include/crt/host_config.h to elliminate the GNUC version check (line 127), the compilation error with “nvcc” is:

I used the “p2pBandwidthLatencyTest” for the test.

Please help me to deal with this issue.

Best regards,

———————-
/usr/include/c++/8/type_traits(1049): error: type name is not allowed

/usr/include/c++/8/type_traits(2436): error: class “std::enable_if<, void>” has no member “type”
detected during instantiation of “std::swap” based on template argument
/usr/include/c++/8/x86_64-redhat-linux/bits/basic_file.h(79): here

Thanks so much for this guide – this is exactly what I needed! Great work!!!

FYI – I did try this a couple months ago on my Dell XPS 15 (9560) and was having a lot of problems everytime I upgraded past F28 however this time around it went much better. I also have an HP zBook 15 (work laptop) and also had same issues with that one too until just recently. It appears what really fixed a lot of the early issues was the newer release of the 5.x kernel because on later versions of 4.x both laptops (Nvidia Optimus) would just fail to boot completely after the Nvidia drivers installation. I re-tried the entire installation on my work laptop (HP zBook15) last week and for the first time on F29 it was successful and working great. After a week of testing and seeing no issues, I tried the entire installation on my personal laptop (Dell XPS-15) and same results – successful this time around. The only difference was the newer 5.x kernel versions. I wanted to share this in case anyone was previously running into any issues because you may not have those issues anymore on the newer kernel. These are the steps I followed which did make a difference on the successful outcome:
1. In beginning of process where you install all updates and reboot, EXCLUDE all kernel packages. (# dnf -y –exclude=kernel* update).
2. Confirm all packages (except kernel) installed successfully then reboot.
3. After reboot now go ahead and install the kernel packages, edit the grub config, generate the initramfs and the other steps prior to rebooting and changing default runlevels.
4. Then follow the rest of the guide as normal.

When I did it this way I had a lot more success then installing everything all at once. The reason is if you install all the updates and reboot without first updating the grub and re-generating the initramfs then the kernel could choke upon the first reboot. This way I was able to break the update and reboots into two phases and it seemed to work a lot better. I hope this helps someone else. Lastly to mention, my first laptop already had this installation completed on earlier version of F28 and earlier kernel. I re-ran through this guide to upgrade all the versions which went without a hitch. The second laptop was a fresh install of the Nvidia drivers and both were successful on the newer 5.x kernels where a few months ago that wasn’t the case on F29.