thestr4ng3r / chiaki

Moved to https://git.sr.ht/~thestr4ng3r/chiaki - Free and Open Source PS4 Remote Play Client
https://git.sr.ht/~thestr4ng3r/chiaki
2.17k stars 373 forks source link

FindFFMPEG error while building #83

Open sisco311 opened 4 years ago

sisco311 commented 4 years ago

Hi,

I'm trying to build it on Ubuntu 18.04 sisco@acme:~$ uname -a Linux acme 4.15.0-66-generic #75-Ubuntu SMP Tue Oct 1 05:24:09 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

sisco@acme:~/git/chiaki/build$ cmake ..
-- The C compiler identification is GNU 7.4.0
-- The CXX compiler identification is GNU 7.4.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found PythonInterp: /usr/bin/python3 (found suitable version "3.6.8", minimum required is "3") 
-- Found PythonInterp: /usr/bin/python3 (found suitable version "3.6.8", minimum required is "2.7") 
-- Found Opus: /usr/include  
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - not found
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE  
-- Found OpenSSL: /usr/lib/x86_64-linux-gnu/libcrypto.so (found version "1.1.1") 
-- Found SDL2: /usr/lib/x86_64-linux-gnu/cmake/SDL2/sdl2-config.cmake  
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.29.1") 
-- Checking for module 'libavutil'
--   Found libavutil, version 55.78.100
CMake Error at cmake/FindFFMPEG.cmake:62 (set_target_properties):
  INTERFACE_LIBRARY targets may only have whitelisted properties.  The
  property "IMPORTED_GLOBAL" is not allowed.
Call Stack (most recent call first):
  cmake/FindFFMPEG.cmake:170 (_ffmpeg_find)
  gui/CMakeLists.txt:23 (find_package)

CMake Error at cmake/FindFFMPEG.cmake:63 (add_library):
  add_library cannot create ALIAS target "FFMPEG::avutil" because target
  "PkgConfig::FFMPEG_avutil" is IMPORTED.
Call Stack (most recent call first):
  cmake/FindFFMPEG.cmake:170 (_ffmpeg_find)
  gui/CMakeLists.txt:23 (find_package)

-- Checking for module 'libswresample'
--   Found libswresample, version 2.9.100
CMake Error at cmake/FindFFMPEG.cmake:62 (set_target_properties):
  INTERFACE_LIBRARY targets may only have whitelisted properties.  The
  property "IMPORTED_GLOBAL" is not allowed.
Call Stack (most recent call first):
  cmake/FindFFMPEG.cmake:173 (_ffmpeg_find)
  gui/CMakeLists.txt:23 (find_package)

CMake Error at cmake/FindFFMPEG.cmake:63 (add_library):
  add_library cannot create ALIAS target "FFMPEG::swresample" because target
  "PkgConfig::FFMPEG_swresample" is IMPORTED.
Call Stack (most recent call first):
  cmake/FindFFMPEG.cmake:173 (_ffmpeg_find)
  gui/CMakeLists.txt:23 (find_package)

-- Checking for module 'libswscale'
--   Found libswscale, version 4.8.100
CMake Error at cmake/FindFFMPEG.cmake:62 (set_target_properties):
  INTERFACE_LIBRARY targets may only have whitelisted properties.  The
  property "IMPORTED_GLOBAL" is not allowed.
Call Stack (most recent call first):
  cmake/FindFFMPEG.cmake:175 (_ffmpeg_find)
  gui/CMakeLists.txt:23 (find_package)

CMake Error at cmake/FindFFMPEG.cmake:63 (add_library):
  add_library cannot create ALIAS target "FFMPEG::swscale" because target
  "PkgConfig::FFMPEG_swscale" is IMPORTED.
Call Stack (most recent call first):
  cmake/FindFFMPEG.cmake:175 (_ffmpeg_find)
  gui/CMakeLists.txt:23 (find_package)

-- Checking for module 'libavcodec'
--   Found libavcodec, version 57.107.100
CMake Error at cmake/FindFFMPEG.cmake:62 (set_target_properties):
  INTERFACE_LIBRARY targets may only have whitelisted properties.  The
  property "IMPORTED_GLOBAL" is not allowed.
Call Stack (most recent call first):
  cmake/FindFFMPEG.cmake:177 (_ffmpeg_find)
  gui/CMakeLists.txt:23 (find_package)

CMake Error at cmake/FindFFMPEG.cmake:63 (add_library):
  add_library cannot create ALIAS target "FFMPEG::avcodec" because target
  "PkgConfig::FFMPEG_avcodec" is IMPORTED.
Call Stack (most recent call first):
  cmake/FindFFMPEG.cmake:177 (_ffmpeg_find)
  gui/CMakeLists.txt:23 (find_package)

CMake Error at /usr/share/cmake-3.10/Modules/FindPackageHandleStandardArgs.cmake:137 (message):
  Could NOT find FFMPEG (missing: FFMPEG_LIBRARIES)
Call Stack (most recent call first):
  /usr/share/cmake-3.10/Modules/FindPackageHandleStandardArgs.cmake:378 (_FPHSA_FAILURE_MESSAGE)
  cmake/FindFFMPEG.cmake:233 (find_package_handle_standard_args)
  gui/CMakeLists.txt:23 (find_package)

-- Configuring incomplete, errors occurred!
See also "/home/sisco/git/chiaki/build/CMakeFiles/CMakeOutput.log".
See also "/home/sisco/git/chiaki/build/CMakeFiles/CMakeError.log".
issue-label-bot[bot] commented 4 years ago

Issue Label Bot is not confident enough to auto-label this issue. See dashboard for more details.

thestr4ng3r commented 4 years ago

What is your cmake --version?

sisco311 commented 4 years ago
cmake version 3.10.2

CMake suite maintained and supported by Kitware (kitware.com/cmake).
sisco311 commented 4 years ago

Updated cmake to version 3.15.4 (https://apt.kitware.com/)

and installed python-protobuf via pip3 sudo apt install python3-pip sudo pip3 install protobuf and everything works now.

Thank you and keep up the good work!

thestr4ng3r commented 4 years ago

This shouldn't be closed. The build must work with the version specified by cmake_minimum_required(), so either it should be fixed or the minimum version adjusted.

lf94 commented 4 years ago

It has to do with the cmake/FindFFMPEG.cmake file. In my PR it fixes this issue.

thestr4ng3r commented 4 years ago

@krazykhris875 see this issue here.

gruaig commented 3 years ago

This is still broken in the latest 18.04 cmake version 3.10.2