[CUDA toolkit 12.0.0] cublasLt & cublas stubs libraries requires GLIBC

Hello,

I’m trying to use CUDA toolkit 12.0.0 and I got QA issue regarding the runtime dependency.

Kindly see the log below.

ERROR: libcublas-12.0.1.189-1-r0 do_package_qa: QA Issue: /usr/local/cuda-12.0/lib/stubs/libcublasLt.so contained in package libcublas-stubs requires libc.so.6(GLIBC_2.17)(64bit), but no providers found in RDEPENDS:libcublas-stubs? [file-rdeps]
ERROR: libcublas-12.0.1.189-1-r0 do_package_qa: QA Issue: /usr/local/cuda-12.0/lib/stubs/libcublasLt.so contained in package libcublas-stubs requires libc.so.6()(64bit), but no providers found in RDEPENDS:libcublas-stubs? [file-rdeps]
$ readelf -d ./usr/local/cuda-12.0/lib64/stubs/libcublas.so 

Dynamic section at offset 0x12d90 contains 31 entries:
  Tag        Type                         Name/Value
 0x0000000000000001 (NEEDED)             Shared library: [libc.so.6]
 0x000000000000000e (SONAME)             Library soname: [libcublas.so.12]
 0x0000000000000010 (SYMBOLIC)           0x0
 0x000000000000001d (RUNPATH)            Library runpath: [$ORIGIN]
 ...
$ readelf -d ./usr/local/cuda-12.0/lib64/stubs/libcublasLt.so 

Dynamic section at offset 0x9d90 contains 31 entries:
  Tag        Type                         Name/Value
 0x0000000000000001 (NEEDED)             Shared library: [libc.so.6]
 0x000000000000000e (SONAME)             Library soname: [libcublasLt.so.12]
 0x0000000000000010 (SYMBOLIC)           0x0
 0x000000000000001d (RUNPATH)            Library runpath: [$ORIGIN]
 ...

FYI, I don’t see anything specific that require GLIBC when checking the symbols needed by the libraries mentioned in the title.

$ readelf  -w --dyn-syms ./usr/local/cuda-12.0/lib64/stubs/libcublas.so

Symbol table '.dynsym' contains 745 entries:
   Num:    Value          Size Type    Bind   Vis      Ndx Name
     0: 0000000000000000     0 NOTYPE  LOCAL  DEFAULT  UND 
     1: 000000000000a760     0 SECTION LOCAL  DEFAULT   10 
     2: 0000000000023018     0 SECTION LOCAL  DEFAULT   22 
     3: 0000000000000000     0 NOTYPE  WEAK   DEFAULT  UND _ITM_deregisterTMCloneTab
     4: 0000000000000000     0 FUNC    WEAK   DEFAULT  UND __cxa_finalize@GLIBC_2.17 (3)
     5: 0000000000000000     0 NOTYPE  WEAK   DEFAULT  UND __gmon_start__
     6: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND puts@GLIBC_2.17 (3)
     7: 0000000000000000     0 NOTYPE  WEAK   DEFAULT  UND _ITM_registerTMCloneTable
     8: 000000000000c760    12 FUNC    GLOBAL DEFAULT   12 cublasXtCsymm@@libcublas.so.12
     9: 000000000000aee0    12 FUNC    GLOBAL DEFAULT   12 cublasZtbmv_v2@@libcublas.so.12

     ...
$ readelf  -w --dyn-syms ./usr/local/cuda-12.0/lib64/stubs/libcublasLt.so 

Symbol table '.dynsym' contains 300 entries:
   Num:    Value          Size Type    Bind   Vis      Ndx Name
     0: 0000000000000000     0 NOTYPE  LOCAL  DEFAULT  UND 
     1: 0000000000005be8     0 SECTION LOCAL  DEFAULT   10 
     2: 000000000001a018     0 SECTION LOCAL  DEFAULT   22 
     3: 0000000000000000     0 NOTYPE  WEAK   DEFAULT  UND _ITM_deregisterTMCloneTab
     4: 0000000000000000     0 FUNC    WEAK   DEFAULT  UND __cxa_finalize@GLIBC_2.17 (3)
     5: 0000000000000000     0 NOTYPE  WEAK   DEFAULT  UND __gmon_start__
     6: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND puts@GLIBC_2.17 (3)
     7: 0000000000000000     0 NOTYPE  WEAK   DEFAULT  UND _ITM_registerTMCloneTable
     8: 0000000000006470    12 FUNC    GLOBAL DEFAULT   12 cublasLtBSSMatmulAlgoChec@@libcublasLt.so.12
     9: 0000000000005ee0    12 FUNC    GLOBAL DEFAULT   12 cublasLtCreate@@libcublasLt.so.12
     ...

Attached file contains the complete logs.

readelf_syms_libcublas.log (161.8 KB)
readelf_syms_libcublasLt.log (68.3 KB)

Could you please explain why GLIBC is needed ?

Any help would be much appreciated.

Best regards,
Ilies

Hi Ilies, apologies for the late reply, could you confirm the changes made to GitHub - nvidia-holoscan/meta-tegra-holoscan: OpenEmbedded/Yocto layer for NVIDIA Clara Holoscan MGX for building the Yocto recipe? As well as which compiler is used that produces the runtime issue?

Regarding why GLIBC is needed: after checking with CUDA experts, their pointer is that: RDEPENDS seems to document run-time package requirements in Yocto Linux. CUDA package should naturally depend on the libc package because many of its libraries require libc to function.

Hey @jinl

Thanks for your replay.

First of all, I’m not referring to CUDA toolkit 11.7 but CUDA toolkit 12.0

Please check the difference between ./usr/local/cuda-11.7/targets/sbsa-linux/lib/stubs/libcublasLt.so and ./usr/local/cuda-12.0/targets/sbsa-linux/lib/stubs/libcublasLt.so and the need of the GLIBC in both case.

GCC version 11.3 is used

Regards,
Ilies

Hi @ilies.chergui,

The dependency on GLIBC appeared during the rework of the stub libraries and was not intentional on its own: for some reason the previous UNDEF symbol printf was replaced with puts@GLIBC_2.17, likely due to the compiler update or some other change. Given that the actual cuBLAS library requires GLIBC anyways (please see the system requirements), this change should not be a problem.

1 Like