Skip to content

Build fails in Ubuntu 18.04 system with zstd development package installed #82114

Open
@songdongsheng

Description

@songdongsheng

Build fails in Ubuntu 18.04 system with zstd development package installed:

/opt/llvm-build/llvm-18.x/rc2/llvm-project/lld/ELF/OutputSections.cpp:362:40: error: use of undeclared identifier 'ZSTD_c_nbWorkers'
  362 |     (void)ZSTD_CCtx_setParameter(cctx, ZSTD_c_nbWorkers,
      |                                        ^
/opt/llvm-build/llvm-18.x/rc2/llvm-project/lld/ELF/OutputSections.cpp:365:5: error: unknown type name 'ZSTD_EndDirective'
  365 |     ZSTD_EndDirective directive = ZSTD_e_continue;
      |     ^
/opt/llvm-build/llvm-18.x/rc2/llvm-project/lld/ELF/OutputSections.cpp:365:35: error: use of undeclared identifier 'ZSTD_e_continue'
  365 |     ZSTD_EndDirective directive = ZSTD_e_continue;                                                              
      |                                   ^
/opt/llvm-build/llvm-18.x/rc2/llvm-project/lld/ELF/OutputSections.cpp:370:21: error: use of undeclared identifier 'ZSTD_e_end'
  370 |         directive = ZSTD_e_end;
      |                     ^
/opt/llvm-build/llvm-18.x/rc2/llvm-project/lld/ELF/OutputSections.cpp:374:28: error: use of undeclared identifier 'ZSTD_e_end'
  374 |              (directive == ZSTD_e_end && bytesRemaining != 0)) {
      |                            ^
/opt/llvm-build/llvm-18.x/rc2/llvm-project/lld/ELF/OutputSections.cpp:384:27: error: use of undeclared identifier 'ZSTD_e_end'
  384 |     } while (directive != ZSTD_e_end);
      |                           ^
6 errors generated.
  1. The minimum supported version of zstd should be stated on page https://llvm.org/docs/GettingStarted.html
  2. The build system should detect the version of zstd and disable zstd support when the version does not meet the requirements.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    Needs Fix

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions