intel / gstreamer-media-SDK

GNU Lesser General Public License v2.1
90 stars 53 forks source link

CMake falsely indicates incorrect versions of GStreamer installed #160

Closed GregHewittDA closed 5 years ago

GregHewittDA commented 5 years ago

Hi all,

`I'm trying to build-in these gstreamer plugins for the Intel Media SDK for my Up2 board running Ubuntu 16.04. When building this package, Cmake dies here:

-- MediaSDK distribution found in /opt/intel/mediasdk -- MediaSDK include directory: /opt/intel/mediasdk/include -- MediaSDK library directory: /opt/intel/mediasdk/lib/lin_x64/libmfx.a -- Checking for module 'gstreamer-1.0>=1.6'

CMake Error at /usr/share/cmake-3.5/Modules/FindPkgConfig.cmake:367 (message): A required package was not found Call Stack (most recent call first): /usr/share/cmake-3.5/Modules/FindPkgConfig.cmake:532 (_pkg_check_modules_internal) cmake/FindBaseDependencies.cmake:25 (pkg_check_modules) cmake/FindBaseDependencies.cmake:93 (FindGstreamer) cmake/ProjectConfig.cmake:15 (FindBaseLibs) CMakeLists.txt:49 (include)`

I can verify that my all my gstreamer apps are version 1.8.3 by running dpkg -l | grep gstreamer. I took a screencap for this because it's a bear to visualize with text. https://i.imgur.com/O12vnAE.png

Can anyone point me in the right direction to get past this issue? My CMake knowledge isn't the best, but this is a completely fresh install of gstreamer, and ubuntu (less than two hours old!) so I don't have any other/older gstreamer installs that CMake might be finding..

ishmael1985 commented 5 years ago

Try the Meson build version on the topic_linux_and_window branch. It should work out for you as long as you follow the README very carefully...

GregHewittDA commented 5 years ago

Thanks @ishmael1985 I'll attempt that right now.

GregHewittDA commented 5 years ago

Regrettably I'm running into a similar problem. Gstreamer is installed and tested. which gst-launch-1.0 points to /usr/bin/gst-launch-1.0 I can see all the libgst libraries in /usr/lib/x86_64-linux-gnu

Still I get the following when running meson ../gst-mfx-build_release --prefix=/usr --libdir=lib/x86_64-linux-gnu --buildtype=release

Determining dependency 'gstreamer-1.0' with CMake executable '/usr/bin/cmake' Try CMake generator: auto Called /usr/bin/cmake --trace-expand -DNAME=gstreamer-1.0 . in /home/lab/gst-mfx-build_release/meson-private/cmake_gstreamer-1.0 -> 0 Dependency gstreamer-1.0 found: NO (tried pkgconfig and cmake) Looking for a fallback subproject for the dependency gstreamer-1.0 Couldn't use fallback subproject in subprojects/gstreamer for the dependency gstreamer-1.0 Reason: Failed to initialize 'subprojects/gstreamer': Subproject directory not found and gstreamer.wrap file not found

meson.build:71:0: ERROR: Dependency "gstreamer-1.0" not found, tried pkgconfig and cmake

ishmael1985 commented 5 years ago

Pretty clear you are missing the development libraries for GStreamer, for e.g. libgstreamer1.0-dev, you better apt install them.

GregHewittDA commented 5 years ago

Hi @ishmael1985 - you're exactly correct. I installed libgstreamer1.0-dev and libgstreamer-plugins-base1.0-dev and was able to finish that meson command. You say it's pretty clear - how did you know? I've used gstreamer for years and never run into this problem.

I'm now stuck with another issue. I cd into the newly created gst-mfx-build and successfully build the project with the 'ninja' command. When typing sudo ninja install, I get Ninja: command not found. Puzzling.

If I just type 'ninja install' I can continue on (only when using a GUI, if you're ssh'd it fails), but then I get an error "failed to import module mesonbuild" This is again puzzling, because I can import it in python3 from the command line. Still trying to find a way past this.

GregHewittDA commented 5 years ago

Alright ya'll.

The final issue to overcome was with ninja. The instructions indicate to install ninja with mesonbuild as part of pip3. This method, at least on the upsquared ubuntu 16.04 system installs this to /home/user/.local/ etc. This is not a root PATH, so sudo ninja install will not work. This was solved by simply apt-get install ninja-build.

Thanks for the help @ishmael1985