• M
    fix(build/lite): fix lite rc4_encryptor build failed at new ld env · 89e52281
    Megvii Engine Team 提交于
    when cuda enable:
    
    error log:
    nn-8.0.4-trt-7.2.2.3-libs/TensorRT-7.2.2.3/lib/libnvinfer_static.a(profile.o):
    undefined reference to symbol 'dlclose@@GLIBC_2.2.5'
    /usr/bin/ld:
    /usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/libdl.so:
    error adding symbols: DSO missing from command line
    
    ld version:
    GNU ld (GNU Binutils for Ubuntu) 2.34, example ubuntu20.04
    
    error reason: at new ld, import flags with active zone
    
    libnvinfer_static.a depend dlclose@@GLIBC_2.2.5, which need -ldl
    
    ld -o rc4_encryptor xxx.o -ldl libnvinfer_static.a, which failed
    
    so we put a -ldl for CUDA_LIBS env, then will change to
    ld -o rc4_encryptor xxx.o  libnvinfer_static.a -ldl
    
    GitOrigin-RevId: adda3acb2d5c0952013d59948717060747dd2f8f
    89e52281
CMakeLists.txt 39.4 KB