basler / gst-plugin-pylon

The official GStreamer plug-in for Basler cameras
BSD 3-Clause "New" or "Revised" License
42 stars 10 forks source link

can't compile #110

Open OdedNeoja opened 5 months ago

OdedNeoja commented 5 months ago

1234 After following the guide I always come to this result

omerts commented 5 months ago

Did you install the pylon software suite?

OdedNeoja commented 5 months ago

yep i install everything by the guide

DarthBogdo commented 4 months ago

Have you found the solution? I have the same issue. I installed the pylon software suite from the official website, followed the installation instructions of gstream, but I get the same error of 'dependency "pylon" not found'.

DarthBogdo commented 4 months ago

I have tried moving to newer versions of meson, messing with environment variables, and applying arguments to commands. Nothing worked for me. Here are the logs of the issue. Maybe someone can assist

`Determining dependency 'pylon' with CMake executable 'C:\Program Files\CMake\bin\cmake.EXE' Try CMake generator: auto Calling CMake (['C:\Program Files\CMake\bin\cmake.EXE']) in C:\Users\vodol\OneDrive\Desktop\C++ Projects\ConsoleApplication1\gst-plugin-pylon\build\meson-private\cmake_pylon with:

Determining dependency 'pylon' with CMake executable 'C:\Program Files\CMake\bin\cmake.EXE' Try CMake generator: auto Calling CMake (['C:\Program Files\CMake\bin\cmake.EXE']) in C:\Users\vodol\OneDrive\Desktop\C++ Projects\ConsoleApplication1\gst-plugin-pylon\build\meson-private\cmake_pylon with:

gst-libs\gst\pylon\meson.build:28:16: ERROR: Dependency "pylon" not found, tried cmake `

thiesmoeller commented 4 months ago

Our CI builds on windows

https://github.com/basler/gst-plugin-pylon/blob/f9dc08c949ecf481c7db188ec70a645aedb1c85e/.github/workflows/ci.yml#L100

Can you check your steps against our setup?

DarthBogdo commented 4 months ago

Unfortunately, it didn't work. Here are my steps:

  1. Download the Basler pylon 7.5.0 software suit software
  2. Install meson 1.4.1 msi file
  3. Install gstreamer packages
  4. Open the developer command prompt in VS
  5. Execute: set GSTREAMER_1_0_ROOT_MSVC_X86_64=C:\gstreamer\1.0\msvc_x86_64 CMAKE_PREFIX_PATH=C:\Program Files\Basler\pylon 7\Development\CMake\pylon\ Path=%GSTREAMER_1_0_ROOT_MSVC_X86_64%\bin;%Path% PKG_CONFIG_PATH=%GSTREAMER_1_0_ROOT_MSVC_X86_64%\lib\pkgconfig PKG_CONFIG=%GSTREAMER_1_0_ROOT_MSVC_X86_64%\bin\pkg-config

Output: The Meson build system Version: 1.4.1 Source dir: C:\Users\vodol\OneDrive\Desktop\C++ Projects\ConsoleApplication2\gst-plugin-pylon Build dir: C:\Users\vodol\OneDrive\Desktop\C++ Projects\ConsoleApplication2\gst-plugin-pylon\build Build type: native build Project name: gst-plugin-pylon Project version: 0.7.0 C compiler for the host machine: cl (msvc 19.38.33130 "Microsoft (R) C/C++ Optimizing Compiler Version 19.38.33130 for x86") C linker for the host machine: link link 14.38.33130.0 C++ compiler for the host machine: cl (msvc 19.38.33130 "Microsoft (R) C/C++ Optimizing Compiler Version 19.38.33130 for x86") C++ linker for the host machine: link link 14.38.33130.0 Host machine cpu family: x86 Host machine cpu: x86 Found pkg-config: YES (C:\gstreamer\1.0\msvc_x86_64\bin\pkg-config) 0.29.2 Run-time dependency gstreamer-1.0 found: YES 1.22.7 Message: Building against GStreamer 1.22.7 Program python3 found: YES (C:\Users\vodol\anaconda3\python.exe) Compiler for C supports arguments /utf-8: YES Compiler for C supports link arguments -Wl,-Bsymbolic-functions: NO Compiler for C supports arguments -fno-strict-aliasing: NO Message: Disabling GLib cast checks Checking for size of "char" : 1 Checking for size of "int" : 4 Checking for size of "long" : 4 Checking for size of "short" : 2 Checking for size of "void*" : 4 Checking for size of "off_t" : -1 Compiler for C supports arguments -Wmissing-declarations: NO Compiler for C++ supports arguments -Wmissing-declarations: NO Compiler for C supports arguments -Wredundant-decls: NO Compiler for C++ supports arguments -Wredundant-decls: NO Compiler for C supports arguments -Wwrite-strings: NO Compiler for C++ supports arguments -Wwrite-strings: NO Compiler for C supports arguments -Winit-self: NO Compiler for C++ supports arguments -Winit-self: NO Compiler for C supports arguments -Wmissing-include-dirs: NO Compiler for C++ supports arguments -Wmissing-include-dirs: NO Compiler for C supports arguments -Wno-multichar: NO Compiler for C++ supports arguments -Wno-multichar: NO Compiler for C supports arguments -Wvla: NO Compiler for C++ supports arguments -Wvla: NO Compiler for C supports arguments -Wpointer-arith: NO Compiler for C++ supports arguments -Wpointer-arith: NO Compiler for C supports arguments -Wmissing-prototypes: NO Compiler for C supports arguments -Wdeclaration-after-statement: NO Compiler for C supports arguments -Wold-style-definition: NO Compiler for C supports arguments -Waggregate-return: NO Run-time dependency gstreamer-base-1.0 found: YES 1.22.7 Run-time dependency gstreamer-check-1.0 found: YES 1.22.7 Run-time dependency gstreamer-pbutils-1.0 found: YES 1.22.7 Run-time dependency gstreamer-allocators-1.0 found: YES 1.22.7 Run-time dependency gstreamer-video-1.0 found: YES 1.22.7 Run-time dependency glib-2.0 found: YES 2.74.4 Run-time dependency gobject-2.0 found: YES 2.74.4 Header "gst/gstconfig.h" has symbol "GST_DISABLE_GST_DEBUG" with dependency gstreamer-1.0: NO Message: GStreamer debug system is enabled Found CMake: C:\Program Files\CMake\bin\cmake.EXE (3.29.6) Run-time dependency pylon found: NO (tried cmake) Message: fallback to detect pylon 6.x Run-time dependency pylon found: NO (tried cmake)

gst-libs\gst\pylon\meson.build:28:16: ERROR: Dependency "pylon" not found, tried cmake

DarthBogdo commented 4 months ago

It seems similar to #68 , is there a work around the issue?

thiesmoeller commented 4 months ago

can you list contents of: C:\Program Files\Basler\pylon 7\Development\CMake\pylon best as:

dir "%CMAKE_PREFIX_PATH%"

We did a cross check with also latest cmake latest meson ninja ( that you get for a fresh install ) it works on our side

CMake binary for host machine is not cached
CMake binary missing from cross or native file, or env var undefined.
Trying a default CMake fallback at cmake
Found CMake: C:\xxxxxxxxx\miniconda3\envs\test_gst\Library\bin\cmake.EXE (3.30.0)
Extracting basic cmake information
CMake Toolchain: Calling CMake once to generate the compiler state
Calling CMake (['C:\\xxxxxxxxx\\miniconda3\\envs\\test_gst\\Library\\bin\\cmake.EXE']) in C:\xxxxxxxxxx\gst-plugin-pylon\test_build\meson-private\__CMake_compiler_info__ with:
  - "--trace-expand"
  - "--trace-format=json-v1"
  - "--no-warn-unused-cli"
  - "--trace-redirect=cmake_trace.txt"
  - "-G"
  - "Ninja"
  - "-DCMAKE_TOOLCHAIN_FILE=C:/xxxxxxxxx/gst-plugin-pylon/test_build/meson-private/__CMake_compiler_info__/CMakeMesonTempToolchainFile.cmake"
  - "."
  - "-DCMAKE_PREFIX_PATH=C:\Program Files\Basler\pylon 7\Development\CMake\pylon\"
DarthBogdo commented 4 months ago

This is what shows up image

DarthBogdo commented 4 months ago

If this helps:

When running this command: meson setup build --prefix=%GSTREAMER_1_0_ROOT_MSVC_X86_64% --backend=vs2022

, the following issue occurs: image

thiesmoeller commented 4 months ago

You call meson with an Option vs2022 .. We don't do this

thiesmoeller commented 4 months ago

this is a working script using conda python:

rem "using conda to install all deps"
call conda install -y cmake meson ninja
call conda --version
echo "cmake ( installed in conda)"
call cmake --version
echo "python interpreter"
call python --version
echo "meson"
call meson --version
echo "ninja"
call ninja --version

rem setup the paths to gstreamer

set PKG_CONFIG_PATH=%GSTREAMER_1_0_ROOT_MSVC_X86_64%lib\pkgconfig
set PATH=%PATH%;%GSTREAMER_1_0_ROOT_MSVC_X86_64%\bin

cd gst-plugin-pylon
rmdir /q /s builddir
meson setup --vsenv builddir --prefix=%GSTREAMER_1_0_ROOT_MSVC_X86_64%
meson compile -C builddir
meson install -C builddir
DarthBogdo commented 4 months ago

Thank you! I was able to build it in a conda environment by following your instructions.

Great support! Thank you again for your work!

Unfortunately, the issue wasn't opened by me, so I can't close it.

DarthBogdo commented 4 months ago

Hello, @thiesmoeller, there's one more issue. Even though the meson succeeds, I get "No such element or plugin 'pylonsrc'" when running "gst-inspect-1.0 pylonsrc". What might be the cause?

thiesmoeller commented 4 months ago

first check if gst-inspect has blacklisted the plugin from a failed start in the past:

gst-inspect-1.0 -b

if this is the case delete the cache file in

C:\Users\<username>\AppData\Local\Microsoft\Windows\INetCache\gstreamer-1.0

if you now call gst-inspect-1.0 pylonsrc again you should see the correct output or error messages

DarthBogdo commented 4 months ago

It wasn't in the list, but I deleted cache just in case. However, pylonsrc still doesn't show up despite all the libraries and config files being in respective folders

thiesmoeller commented 4 months ago

what was the output of meson install -C builddir

DarthBogdo commented 3 months ago

Thank you, I found how to do it by launching it from the bin directory

thiesmoeller commented 3 months ago

this still shouldn't be the way it is on your system.. :-\

can you run other plugins or inspect them like

gst-inspect-1.0 videoconvert