rapidsai / cudf

cuDF - GPU DataFrame Library
https://docs.rapids.ai/api/cudf/stable/
Apache License 2.0
8.42k stars 900 forks source link

Issues with installing NVIDIA driver in Ubuntu 22.04 LTS #13871

Closed jmechua-itsrdc closed 1 year ago

jmechua-itsrdc commented 1 year ago

For context, I am using a laptop with the following specifications:

Processor: 13th Gen Intel® Core™ i7-13700HX × 24 GPU: RTX 4060 (mobile)

What I need for my purpose (I want to use Amber22) is a CUDA Toolkit 11.x which is compatible with NVIDIA driver 450.80.02, and CuDNN which I need in my Machine Learning programs. However, the driver was compiled using gcc 11.3.0.

To be able to install gcc 11.3.0, it requires gcc (which is bundled with build-essential). When I installed build-essential, gcc 11.4.0 was automatically installed. Since 11.3.0 is not available as a deb or run file, I had to build 11.3.0 from source. I tried to follow the step by step procedures on compiling gcc but I am having a problem with executing make -j. This is the CLI input and output.

joanna@joanna:~/Downloads/gcc-11.3.0$ gcc --version gcc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0 Copyright (C) 2021 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

joanna@joanna:~/Downloads/gcc-11.3.0$ ./contrib/download_prerequisites 2023-08-13 16:06:23 URL:http://gcc.gnu.org/pub/gcc/infrastructure/gmp-6.1.0.tar.bz2 [2383840/2383840] -> "gmp-6.1.0.tar.bz2" [1] 2023-08-13 16:06:26 URL:http://gcc.gnu.org/pub/gcc/infrastructure/mpfr-3.1.6.tar.bz2 [1287202/1287202] -> "mpfr-3.1.6.tar.bz2" [1] 2023-08-13 16:06:30 URL:http://gcc.gnu.org/pub/gcc/infrastructure/mpc-1.0.3.tar.gz [669925/669925] -> "mpc-1.0.3.tar.gz" [1] 2023-08-13 16:06:37 URL:http://gcc.gnu.org/pub/gcc/infrastructure/isl-0.18.tar.bz2 [1658291/1658291] -> "isl-0.18.tar.bz2" [1] gmp-6.1.0.tar.bz2: OK mpfr-3.1.6.tar.bz2: OK mpc-1.0.3.tar.gz: OK isl-0.18.tar.bz2: OK All prerequisites downloaded successfully.

joanna@joanna:~/Downloads/gcc-11.3.0$ mkdir build

joanna@joanna:~/Downloads/gcc-11.3.0$ cd build

joanna@joanna:~/Downloads/gcc-11.3.0/build$ ../gcc/configure -v --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu --prefix=/usr/local/gcc-11.3.0 --enable-checking=release --enable-languages=c,c++,fortran --disable-multilib --program-suffix=-11.3 checking build system type... x86_64-pc-linux-gnu checking host system type... x86_64-pc-linux-gnu checking target system type... x86_64-pc-linux-gnu checking LIBRARY_PATH variable... ok checking GCC_EXEC_PREFIX variable... ok checking whether to place generated files in the source directory... no checking whether a default linker was specified... no checking whether a default dsymutil was specified... no checking whether a default assembler was specified... no checking for x86_64-linux-gnu-gcc... x86_64-linux-gnu-gcc checking whether the C compiler works... yes checking for C compiler default output file name... a.out checking for suffix of executables... checking whether we are cross compiling... no checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether x86_64-linux-gnu-gcc accepts -g... yes checking for x86_64-linux-gnu-gcc option to accept ISO C89... none needed checking for x86_64-linux-gnu-g++... x86_64-linux-gnu-g++ checking whether we are using the GNU C++ compiler... yes checking whether x86_64-linux-gnu-g++ accepts -g... yes checking for x86_64-linux-gnu-gnatbind... no checking for gnatbind... no checking for x86_64-linux-gnu-gnatmake... no checking for gnatmake... no checking whether compiler driver understands Ada... no checking how to run the C++ preprocessor... x86_64-linux-gnu-g++ -E checking for grep that handles long lines and -e... /usr/bin/grep checking for egrep... /usr/bin/grep -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking minix/config.h usability... no checking minix/config.h presence... no checking for minix/config.h... no checking whether it is safe to define EXTENSIONS... yes checking how to run the C preprocessor... x86_64-linux-gnu-gcc -E checking for inline... inline checking for special C compiler options needed for large files... no checking for _FILE_OFFSET_BITS value needed for large files... no checking size of void *... 8 checking size of short... 2 checking size of int... 4 checking size of long... 8 checking for long long... yes checking size of long long... 8 checking for int8_t... yes checking for int16_t... yes checking for int32_t... yes checking for int64_t... yes checking for unsigned long long int... yes checking for long long int... yes checking for intmax_t... yes checking for intptr_t... yes checking for uint8_t... yes checking for uint16_t... yes checking for uint32_t... yes checking for uint64_t... yes checking for uintmax_t... yes checking for uintptr_t... yes checking for int64_t underlying type... long checking for std::swap in ... yes checking whether x86_64-linux-gnu-g++ is affected by placement new aliasing bug... no checking whether x86_64-linux-gnu-g++ supports -W... yes checking whether x86_64-linux-gnu-g++ supports -Wall... yes checking whether x86_64-linux-gnu-g++ supports -Wnarrowing... yes checking whether x86_64-linux-gnu-g++ supports -Wwrite-strings... yes checking whether x86_64-linux-gnu-g++ supports -Wcast-qual... yes checking whether x86_64-linux-gnu-g++ supports -Werror=format-diag... yes checking whether x86_64-linux-gnu-gcc supports -Wstrict-prototypes... yes checking whether x86_64-linux-gnu-gcc supports -Wmissing-prototypes... yes checking whether x86_64-linux-gnu-gcc supports -Werror=format-diag... (cached) yes checking whether x86_64-linux-gnu-g++ supports -Wmissing-format-attribute... yes checking whether x86_64-linux-gnu-g++ supports -Woverloaded-virtual... yes checking whether x86_64-linux-gnu-gcc supports -Wold-style-definition... yes checking whether x86_64-linux-gnu-gcc supports -Wc++-compat... yes checking whether x86_64-linux-gnu-g++ supports -pedantic -Wlong-long -Wvariadic-macros -Woverlength-strings... yes checking whether x86_64-linux-gnu-gcc supports -fno-exceptions... yes checking whether x86_64-linux-gnu-gcc supports -fno-rtti... yes checking whether x86_64-linux-gnu-gcc supports -fasynchronous-unwind-tables... yes checking valgrind.h usability... no checking valgrind.h presence... no checking for valgrind.h... no checking for VALGRIND_DISCARD in <valgrind/memcheck.h>... no checking for VALGRIND_DISCARD in ... no checking for multiarch configuration... auto configure: WARNING: fixed-point is not supported for this target, ignored checking whether make sets $(MAKE)... yes checking for gawk... no checking for mawk... mawk checking whether ln -s works... yes checking whether ln works... yes checking for x86_64-linux-gnu-ranlib... x86_64-linux-gnu-ranlib checking for a BSD compatible install... /usr/bin/install -c checking for cmp's capabilities... gnucompare checking for mktemp... yes checking for makeinfo... no configure: WARNING: Makeinfo is missing or too old. Info documentation will not be built. checking for recent Pod::Man... yes checking for flex... no checking for bison... no checking for nm... nm checking for ar... ar checking for sphinx-build... texinfo checking for ANSI C header files... (cached) yes checking whether time.h and sys/time.h may both be included... yes checking whether string.h and strings.h may both be included... yes checking for sys/wait.h that is POSIX.1 compatible... yes checking whether termios.h defines TIOCGWINSZ... no checking whether sys/ioctl.h defines TIOCGWINSZ... yes checking for limits.h... yes checking for stddef.h... yes checking for string.h... (cached) yes checking for strings.h... (cached) yes checking for stdlib.h... (cached) yes checking for time.h... yes checking for iconv.h... yes checking for fcntl.h... yes checking for ftw.h... yes checking for unistd.h... (cached) yes checking for sys/file.h... yes checking for sys/time.h... yes checking for sys/mman.h... yes checking for sys/resource.h... yes checking for sys/param.h... yes checking for sys/times.h... yes checking for sys/stat.h... (cached) yes checking for direct.h... no checking for malloc.h... yes checking for langinfo.h... yes checking for ldfcn.h... no checking for locale.h... yes checking for wchar.h... yes checking for thread.h... no checking for pthread.h... yes checking for CHAR_BIT... yes checking whether byte ordering is bigendian... no checking how to run the C++ preprocessor... x86_64-linux-gnu-g++ -E checking for unordered_map... yes checking for tr1/unordered_map... yes checking for ext/hash_map... yes checking dependency style of x86_64-linux-gnu-g++... gcc3 checking for collect2 libraries... none required checking for library containing exc_resume... no checking for library containing kstat_open... no checking for library containing gethostbyname... none required checking for library containing socket... none required checking for library containing ldexp... none required checking for library containing dlopen... none required checking for inttypes.h... yes checking for zstd.h... no checking for library containing ZSTD_compress... no checking for times... yes checking for clock... yes checking for kill... yes checking for getrlimit... yes checking for setrlimit... yes checking for atoq... no checking for popen... yes checking for sysconf... yes checking for strsignal... yes checking for getrusage... yes checking for nl_langinfo... yes checking for gettimeofday... yes checking for mbstowcs... yes checking for wcswidth... yes checking for mmap... yes checking for posix_fallocate... yes checking for setlocale... yes checking for clearerr_unlocked... yes checking for feof_unlocked... yes checking for ferror_unlocked... yes checking for fflush_unlocked... yes checking for fgetc_unlocked... yes checking for fgets_unlocked... yes checking for fileno_unlocked... yes checking for fprintf_unlocked... no checking for fputc_unlocked... yes checking for fputs_unlocked... yes checking for fread_unlocked... yes checking for fwrite_unlocked... yes checking for getchar_unlocked... yes checking for getc_unlocked... yes checking for putchar_unlocked... yes checking for putc_unlocked... yes checking for madvise... yes checking for mallinfo... yes checking for mallinfo2... yes checking for fstatat... yes checking whether mbstowcs works... yes checking for ssize_t... yes checking for caddr_t... yes checking for sighander_t... no checking for sys/mman.h... (cached) yes checking for mmap... (cached) yes checking whether read-only mmap of a plain file works... yes checking whether mmap from /dev/zero works... yes checking for MAP_ANON(YMOUS)... yes checking whether mmap with MAP_ANON(YMOUS) works... yes checking for pid_t... yes checking for vfork.h... no checking for fork... yes checking for vfork... yes checking for working fork... yes checking for working vfork... (cached) yes checking for ld used by GCC... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for shared library run path origin... done checking for iconv... yes checking for iconv declaration... extern size_t iconv (iconv_t cd, char inbuf, size_t inbytesleft, char outbuf, size_t outbytesleft); checking for LC_MESSAGES... yes checking for nl_langinfo and CODESET... yes checking whether basename is declared... no checking whether strstr is declared... no checking whether getenv is declared... no checking whether atol is declared... no checking whether atoll is declared... no checking whether asprintf is declared... no checking whether sbrk is declared... no checking whether abort is declared... no checking whether atof is declared... no checking whether getcwd is declared... no checking whether getwd is declared... no checking whether madvise is declared... no checking whether stpcpy is declared... no checking whether strnlen is declared... no checking whether strsignal is declared... no checking whether strverscmp is declared... no checking whether strtol is declared... no checking whether strtoul is declared... no checking whether strtoll is declared... no checking whether strtoull is declared... no checking whether setenv is declared... no checking whether unsetenv is declared... no checking whether errno is declared... no checking whether snprintf is declared... no checking whether vsnprintf is declared... no checking whether vasprintf is declared... no checking whether malloc is declared... no checking whether realloc is declared... no checking whether calloc is declared... no checking whether free is declared... no checking whether getopt is declared... no checking whether clock is declared... no checking whether getpagesize is declared... no checking whether ffs is declared... no checking whether clearerr_unlocked is declared... no checking whether feof_unlocked is declared... no checking whether ferror_unlocked is declared... no checking whether fflush_unlocked is declared... no checking whether fgetc_unlocked is declared... no checking whether fgets_unlocked is declared... no checking whether fileno_unlocked is declared... no checking whether fprintf_unlocked is declared... no checking whether fputc_unlocked is declared... no checking whether fputs_unlocked is declared... no checking whether fread_unlocked is declared... no checking whether fwrite_unlocked is declared... no checking whether getchar_unlocked is declared... no checking whether getc_unlocked is declared... no checking whether putchar_unlocked is declared... no checking whether putc_unlocked is declared... no checking whether getrlimit is declared... no checking whether setrlimit is declared... no checking whether getrusage is declared... no checking whether mallinfo is declared... no checking whether mallinfo2 is declared... no checking whether ldgetname is declared... no checking whether times is declared... no checking whether sigaltstack is declared... no checking for struct tms... no checking for clock_t... no checking for F_SETLKW... yes checking for O_CLOEXEC... yes checking for AF_UNIX... yes checking for AF_INET6... yes checking if mkdir takes one argument... no Using ../gcc/config/i386/i386.c' for machine-specific logic. Using../gcc/config/i386/i386.md' as machine description file. Using the following target machine macro files: ../gcc/config/vxworks-dummy.h ../gcc/config/i386/biarch64.h ../gcc/config/i386/i386.h ../gcc/config/i386/unix.h ../gcc/config/i386/att.h ../gcc/config/dbxelf.h ../gcc/config/elfos.h ../gcc/config/gnu-user.h ../gcc/config/glibc-stdint.h ../gcc/config/i386/x86-64.h ../gcc/config/i386/gnu-user-common.h ../gcc/config/i386/gnu-user64.h ../gcc/config/linux.h ../gcc/config/linux-android.h ../gcc/config/i386/linux-common.h ../gcc/config/i386/linux64.h ../gcc/config/initfini-array.h Using host-linux.o for host machine hooks. checking for __cxa_atexit... yes checking whether NLS is requested... no checking how to print strings... printf checking for a sed that does not truncate output... /usr/bin/sed checking for fgrep... /usr/bin/grep -F checking for ld used by x86_64-linux-gnu-gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for BSD- or MS-compatible name lister (nm)... nm checking the name lister (nm) interface... BSD nm checking whether ln -s works... yes checking the maximum length of command line arguments... 1572864 checking whether the shell understands some XSI constructs... yes checking whether the shell understands "+="... yes checking for /usr/bin/ld option to reload object files... -r checking for x86_64-linux-gnu-objdump... x86_64-linux-gnu-objdump checking how to recognize dependent libraries... pass_all checking for x86_64-linux-gnu-ar... (cached) ar checking for x86_64-linux-gnu-strip... x86_64-linux-gnu-strip checking for x86_64-linux-gnu-ranlib... (cached) x86_64-linux-gnu-ranlib checking command to parse nm output from x86_64-linux-gnu-gcc object... ok checking for dlfcn.h... yes checking for objdir... .libs checking if x86_64-linux-gnu-gcc supports -fno-rtti -fno-exceptions... no checking for x86_64-linux-gnu-gcc option to produce PIC... -fPIC -DPIC checking if x86_64-linux-gnu-gcc PIC flag -fPIC -DPIC works... yes checking if x86_64-linux-gnu-gcc static flag -static works... yes checking if x86_64-linux-gnu-gcc supports -c -o file.o... yes checking if x86_64-linux-gnu-gcc supports -c -o file.o... (cached) yes checking whether the x86_64-linux-gnu-gcc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking dynamic linker characteristics... GNU/Linux ld.so checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... yes checking how to run the C++ preprocessor... x86_64-linux-gnu-g++ -E checking for ld used by x86_64-linux-gnu-g++... /usr/bin/ld -m elf_x86_64 checking if the linker (/usr/bin/ld -m elf_x86_64) is GNU ld... yes checking whether the x86_64-linux-gnu-g++ linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes checking for x86_64-linux-gnu-g++ option to produce PIC... -fPIC -DPIC checking if x86_64-linux-gnu-g++ PIC flag -fPIC -DPIC works... yes checking if x86_64-linux-gnu-g++ static flag -static works... yes checking if x86_64-linux-gnu-g++ supports -c -o file.o... yes checking if x86_64-linux-gnu-g++ supports -c -o file.o... (cached) yes checking whether the x86_64-linux-gnu-g++ linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes checking dynamic linker characteristics... (cached) GNU/Linux ld.so checking how to hardcode library paths into programs... immediate checking what assembler to use... ./as checking whether we are using gold... no checking gold linker with split stack support as non default... checking what linker to use... ./collect-ld checking what nm to use... ./nm checking what objdump to use... not found checking what readelf to use... not found checking what otool to use... not found checking assembler flags... --64 checking assembler for .balign and .p2align... no checking assembler for .p2align with maximum skip... no checking assembler for .literal16... no checking assembler for working .subsection -1... no checking assembler for .weak... no checking assembler for .weakref... no checking assembler for .nsubspa comdat... no checking assembler for .hidden... no checking linker for .hidden support... no checking linker read-only and read-write section mixing... unknown checking for .preinit_array/.init_array/.fini_array support... no checking assembler for .sleb128 and .uleb128... no checking assembler for cfi directives... no checking assembler for cfi personality directive... no checking assembler for cfi sections directive... no checking assembler for eh_frame optimization... no checking assembler for section exclude flag... no checking assembler for section exclude flag... no checking assembler for section 'R' flag... no checking assembler for section 'o' flag... no checking assembler for section merging support... no checking assembler for section merging support... (cached) no checking assembler for stabs directive... no checking assembler for COMDAT group support (GNU as)... no checking assembler for COMDAT group support (GNU as, %type)... no checking assembler for line table is_stmt support... no checking assembler for line table discriminator support... no checking assembler for thread-local storage support... no checking linker -Bstatic/-Bdynamic option... no checking linker --version-script option... yes checking linker soname option... yes checking linker --demangle support... no checking linker plugin support... 0 checking assembler for -xbrace_comment... no checking assembler for filds and fists mnemonics... no checking assembler for fildq and fistpq mnemonics... no checking assembler for cmov syntax... no checking assembler for ffreep mnemonic... no checking assembler for .quad directive... no checking assembler for sahf mnemonic... no checking assembler for interunit movq mnemonic... no checking assembler for hle prefixes... no checking assembler for swap suffix... no checking assembler for different section symbol subtraction... no checking assembler for rep and lock prefix... no checking assembler for ud2 mnemonic... no checking assembler for R_386_TLS_GD_PLT reloc... no checking assembler for R_386_TLS_LDM_PLT reloc... no checking assembler for R_386_TLS_LDM reloc... no checking assembler for R_386_GOT32X reloc... no checking assembler for GOTOFF in data... no checking assembler for calling _tls_get_addr via GOT... no checking assembler for dwarf2 debug_line support... no checking assembler for buggy dwarf2 .file directive... no checking assembler for --gdwarf2 option... no checking assembler for --gdwarf-5 option... no checking assembler for assembly of compiler generated 64-bit .debug_line... no checking assembler for assembly of compiler generated 32-bit .debug_line... no checking assembler for --gstabs option... no checking assembler for --debug-prefix-map option... no checking assembler for compressed debug sections... no checking assembler for .lcomm with alignment... no checking for target glibc version... 2.35 checking assembler for gnu_unique_object... no checking assembler for tolerance to line number 0... no checking support for thin archives... yes checking linker PT_GNU_EH_FRAME support... no checking linker CIEv3 in .eh_frame support... no checking linker position independent executable support... no checking linker PIE support with copy reloc... no checking linker EH-compatible garbage collection of sections... no checking linker EH garbage collection of sections bug... no checking linker for compressed debug sections... 0 checking linker --as-needed support... no checking linker mapfile support for clearing hardware capabilities... no checking linker --build-id support... no checking linker *_sol2 emulation support... no checking linker --sysroot support... no checking stack_chk_fail in target C library... yes checking sys/sdt.h in the target C library... no checking dl_iterate_phdr in target C library... unknown checking whether to enable maintainer-specific portions of Makefiles... no checking whether to avoid linking multiple front-ends at once... no checking whether to serialize linking of multiple front-ends... no Links are now set up to build a native compiler for x86_64-pc-linux-gnu. checking for exported symbols... yes checking for -rdynamic... yes checking for library containing dlopen... (cached) none required checking for -fPIC -shared... yes gcc_driver_version: 11.3.0 checking for -fno-PIE option... yes checking for -no-pie option... yes checking for CET support... yes checking linker -z bndplt option... no checking linker --push-state/--pop-state options... no configure: creating ./config.status config.status: creating Makefile config.status: creating ada/gcc-interface/Makefile config.status: creating ada/Makefile config.status: creating auto-host.h config.status: executing depdir commands config.status: executing gccdepdir commands config.status: executing default commands

joanna@joanna:~/Downloads/gcc-11.3.0/build$ make -j24 make: No rule to make target '../build-x86_64-linux-gnu/libiberty/libiberty.a', needed by 'build/genmodes'. Stop. make: Waiting for unfinished jobs....

I tried installing NVIDIA driver 450.80 (in .run extension) using gcc but it is not proceeding because it requires gcc 11.3.0 to be installed. If I will not be able to install this driver, I will not be able to install CTK and CuDNN. Is there a way for me to work around the problem? Thank you.

vyasr commented 1 year ago

Hi @jmechua-itsrdc I'm not quite following the issues that you're running into. You shouldn't need to build gcc from source. You don't need your system gcc to be the exact same as what the driver was compiled with, all you need is a gcc that can compile your code. More generally I don't think you should need to compile any of the software you need. Based on the driver version that you want to use, CUDA 11.8 should be fine (see this table). I would have a look at the CUDA installation guide for more information on how to get CUDA installed.

This issue tracker isn't the best place for CUDA questions. This repo is for the cuDF DataFrame library, which uses CUDA but is a higher-level library. If my explanation above doesn't help address your concerns, I would recommend following up at https://forums.developer.nvidia.com/.