cmake cannot find ffmpeg and unittest++

Bug #1545385 reported by robvn
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenShot Video Library | libopenshot
New
Undecided
Unassigned

Bug Description

Trying to compile libopenshot on slackware64-current.

ffmpeg and unittest++ are installed

Why the unittest failure occurs I cannot understand....

With respect to ffmpeg, libopenshot does not work with that at all:

It looks libopenshot needs libavresample but that is no longer part of ffmpeg but of libav, forked from ffmpeg which seem to be incompatible packages nowadays; see

http://blog.pkh.me/p/13-the-ffmpeg-libav-situation.html#content

libav is available for slackware but the latest ffmpeg is needed for many other programs....

Is there a way to make openshot less dependent on one of the two to keep it usable for the whole linux community?

And if not, can it be clearly stated that libav is a dependency and NOT ffmpeg???

That will save a lot of trouble to other people who else will be wasting their time trying to compile and use openshot-qt.

Thanks,

Rob

Thus, trying to compile libopenshot I get this:

bash-4.3# cmake ../
--------------------------------------------------------------
Welcome to the OpenShot Build System! CMake will now check for all required build
dependencies and notify you of any missing files or other issues. If you have any
questions or issues, please visit <http://www.openshot.org/>.
--------------------------------------------------------------
Determining Version Number (from Version.h file)
--> MAJOR Version: 0
--> MINOR Version: 1
--> BUILD Version: 0
--> SO/API/ABI Version: 7
--> VERSION: 0.1.0

CMake Warning (dev) at CMakeLists.txt:66 (PROJECT):
  Policy CMP0048 is not set: project() command manages VERSION variables.
  Run "cmake --help-policy CMP0048" for policy details. Use the cmake_policy
  command to set the policy and suppress this warning.

  The following variable(s) would be set to empty:

    PROJECT_VERSION
This warning is for project developers. Use -Wno-dev to suppress it.

-- The C compiler identification is GNU 5.3.0
-- The CXX compiler identification is GNU 5.3.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
--------------------------------------------------------------
Generating build files for openshot (0.1.0)
-- Found ImageMagick: /usr/lib64/libMagick++-6.Q16.so (found version "6.9.2-6")
-- Could NOT find FFMPEG (missing: FFMPEG_LIBRARIES FFMPEG_INCLUDE_DIR)

-- Found LIBOPENSHOT_AUDIO: /usr/lib64/libopenshot-audio.so
'LIBOPENSHOT_AUDIO_INCLUDE_DIRS:/usr/include/libopenshot-audio'
-- Try OpenMP C flag = [-fopenmp]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Success
-- Try OpenMP CXX flag = [-fopenmp]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Success
-- Found OpenMP: -fopenmp
-- Found SWIG: /usr/bin/swig (found suitable version "3.0.7", minimum required is "2.0")
-- Found PythonLibs: /usr/lib64/libpython3.5m.so (found suitable version "3.5.1", minimum required is "3")
-- Found PythonInterp: /usr/bin/python3 (found suitable version "3.5.1", minimum required is "3")
-- Found Ruby: /usr/bin/ruby (found version "2.2.0")
-- Ruby executable: /usr/bin/ruby
-- Ruby vendor arch dir: /usr/lib64/ruby/vendor_ruby/2.2.0/x86_64-linux
-- Ruby include path: /usr/include/ruby-2.2.0;/usr/include/ruby-2.2.0/x86_64-linux
-- Could NOT find UNITTEST++ (missing: UNITTEST++_INCLUDE_DIR)
-- Could NOT find FFMPEG (missing: FFMPEG_LIBRARIES FFMPEG_INCLUDE_DIR)

CMake Warning (dev) at tests/CMakeLists.txt:177 (ADD_CUSTOM_TARGET):
  Policy CMP0037 is not set: Target names should not be reserved and should
  match a validity pattern. Run "cmake --help-policy CMP0037" for policy
  details. Use the cmake_policy command to set the policy and suppress this
  warning.
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
AVRESAMPLE_INCLUDE_DIR

Revision history for this message
robvn (rvnues) wrote :

Hi,

I found a solution (see attached patch) but whether it is fully correct I do not know; I am not a programmer...

Three major reasons the installed libraries for ffmpeg or UnitTest++ were not found:
1) on Slackware64 ffmpeg-libraries built using the script from SlackBuilds.org end up in /usr/lib64/.
2) FFmpeg versions 2.8.5/6 come with libavresample but the configure-flag --enable-avresample needs to be set (so my frustration above was mainly based on tiredness and ignorance).
3) For UnitTest++ the include directory ended up as /usr/include/UnitTest++/UnitTest++. It seems a bit unusual and therefore it's hard to tell whether it will be universally useful on Slackware as UnitTest++ is not a supported package (nor on SlackBuilds.org). I created a Slackbuild for it using the prescribed commands but whether this patch will therefore work in oncoming releases of UnitTest++ is difficult to say.

Hope this helps,

Rob

Revision history for this message
robvn (rvnues) wrote :

in unittest-cpp-1.6.0 the include directory is still /usr/include/UnitTest++/UnitTest++.

Revision history for this message
robvn (rvnues) wrote :
Revision history for this message
robvn (rvnues) wrote :

When compiling unittest-cpp-1.6.1 with cmake (and not auto-tools as used for compiling previous versions of unit-test) the include directory is /usr/include/UnitTest++

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.