Skip to content

Please use pkg_check_modules to locate Vorbis #1507

@grepwood

Description

@grepwood

Priority

Medium

Area

  • Data
  • Source
  • Docker
  • Other

What happened?

When trying to build OTClient for Linux, the source configuration stage fails:

-- Enabled: ipo
-- Found Protobuf Compiler: /usr/bin/protoc
-- Use precompiled header: ON
-- Enabled: Build unity for speed up compilation
-- Disabled: asan
-- Disabled: DEBUG LOG
-- Build type: 
-- Build commit: 
-- Build revision: 
CMake Error at src/CMakeLists.txt:219 (find_package):
  Could not find a package configuration file provided by "Vorbis" with any
  of the following names:

    VorbisConfig.cmake
    vorbis-config.cmake

  Add the installation prefix of "Vorbis" to CMAKE_PREFIX_PATH or set
  "Vorbis_DIR" to a directory containing one of the above files.  If "Vorbis"
  provides a separate development package or SDK, be sure it has been
  installed.


-- Configuring incomplete, errors occurred!

The problem is that a lot of distributions don't package those files - and for very good reason. libvorbis is built with autoconf, not CMake, because its CMake code is already deprecated and one day the common version of CMake may drop support for libvorbis' CMake infrastructure entirely.

This is what happens when I try to configure libvorbis 1.3.7:

CMake Error at CMakeLists.txt:1 (cmake_minimum_required):
  Compatibility with CMake < 3.5 has been removed from CMake.

  Update the VERSION argument <min> value.  Or, use the <min>...<max> syntax
  to tell CMake that the project requires at least <min> but has been updated
  to work with policies introduced by <max> or earlier.

  Or, add -DCMAKE_POLICY_VERSION_MINIMUM=3.5 to try configuring anyway.


-- Configuring incomplete, errors occurred!

As such, the support for CMake in libvorbis is slowly going the way of the dodo and relying on it is not a sustainable strategy.

Please consider using pkg_check_modules instead.

What OS are you seeing the problem on?

Linux

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    Priority: MediumThis issue may be impactful and needs some attention.Status: Pending TestThis PR or Issue requires more testingType: BugInconsistencies or issues which will cause an issue or problem for users or implementors.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions