Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Impossible to compile using MSYS2-UCRT64 or MSYS2-MINGW64 #107

Open
zacharynevin-stemcell opened this issue Jun 7, 2024 · 2 comments
Open

Comments

@zacharynevin-stemcell
Copy link

zacharynevin-stemcell commented Jun 7, 2024

Hi there,

I am trying to get this plugin to work on Windows 10 with gstreamer and gst-python.

To install gstreamer and gst-python, I installed MSYS2 as that is the official way to install the Python bindings on Windows as a result of the dependency on PyGObject. Using the UCRT64 environment, I ran the following commands:

pacman -S \
mingw-w64-ucrt-x86_64-gstreamer \
mingw-w64-ucrt-x86_64-gst-plugins-base \
mingw-w64-ucrt-x86_64-gst-good \
mingw-w64-ucrt-x86_64-gst-python

This is extremely convenient and works well to get access to the Gstreamer library and its Python bindings.

However, now I want to install the gst-plugin-pylon library. The problem is, the MSYS2 environment uses the gcc compiler which doesn't seem to be compatible with this library or the Pylon C++ development files. The meson setup build command works well and all the required dependencies are found, but when I run ninja -C build I get several thousand compilation errors across various Pylon C++ files.

Do you know how to install the gst-plugin-pylon package within an MSYS2 environment (whether that is UCRT64 or MINGW64)?

Output of meson setup build:

The Meson build system
Version: 1.4.0
Source dir: C:/**/**/gst-plugin-pylon
Build dir: C:/**/**/gst-plugin-pylon/build
Build type: native build
Project name: gst-plugin-pylon
Project version: 0.7.0
C compiler for the host machine: cc (gcc 13.2.0 "cc (Rev6, Built by MSYS2 project) 13.2.0")
C linker for the host machine: cc ld.bfd 2.42
C++ compiler for the host machine: c++ (gcc 13.2.0 "c++ (Rev6, Built by MSYS2 project) 13.2.0")
C++ linker for the host machine: c++ ld.bfd 2.42
Host machine cpu family: x86_64
Host machine cpu: x86_64
Found pkg-config: YES (C:\msys64\ucrt64\bin/pkg-config.EXE) 2.2.0
Run-time dependency gstreamer-1.0 found: YES 1.24.3
Message: Building against GStreamer 1.24.3
Program python3 found: YES (C:/msys64/ucrt64/bin/python.exe)
Compiler for C supports link arguments -Wl,-Bsymbolic-functions: YES
Compiler for C supports arguments -fno-strict-aliasing: YES
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*" : 8
Checking for size of "off_t" : 8
Compiler for C supports arguments -fvisibility=hidden: YES
Compiler for C supports arguments -Wmissing-declarations: YES
Compiler for C++ supports arguments -Wmissing-declarations: YES
Compiler for C supports arguments -Wredundant-decls: YES
Compiler for C++ supports arguments -Wredundant-decls: YES
Compiler for C supports arguments -Wwrite-strings: YES
Compiler for C++ supports arguments -Wwrite-strings: YES
Compiler for C supports arguments -Winit-self: YES
Compiler for C++ supports arguments -Winit-self: YES
Compiler for C supports arguments -Wmissing-include-dirs: YES
Compiler for C++ supports arguments -Wmissing-include-dirs: YES
Compiler for C supports arguments -Wno-multichar: YES
Compiler for C++ supports arguments -Wno-multichar: YES
Compiler for C supports arguments -Wvla: YES
Compiler for C++ supports arguments -Wvla: YES
Compiler for C supports arguments -Wpointer-arith: YES
Compiler for C++ supports arguments -Wpointer-arith: YES
Compiler for C supports arguments -Wmissing-prototypes: YES
Compiler for C supports arguments -Wdeclaration-after-statement: YES
Compiler for C supports arguments -Wold-style-definition: YES
Compiler for C supports arguments -Waggregate-return: YES
Run-time dependency gstreamer-base-1.0 found: YES 1.24.3
Run-time dependency gstreamer-check-1.0 found: YES 1.24.3
Run-time dependency gstreamer-pbutils-1.0 found: YES 1.24.3
Run-time dependency gstreamer-allocators-1.0 found: YES 1.24.3
Run-time dependency gstreamer-video-1.0 found: YES 1.24.3
Run-time dependency glib-2.0 found: YES 2.80.0
Run-time dependency gobject-2.0 found: YES 2.80.0
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:\msys64\ucrt64\bin/cmake.EXE (3.29.2)
Run-time dependency pylon (modules: pylon::pylon) found: YES 7.4.0
Run-time dependency valgrind found: NO (tried pkgconfig)
Run-time dependency gstreamer-plugins-base-1.0 found: YES 1.24.3
Dependency gstpylon found: YES 0.7.0 (overridden)
Program C:/msys64/ucrt64/libexec/gstreamer-1.0/gst-plugins-doc-cache-generator found: YES (C:/msys64/ucrt64/bin/python.exe C:/msys64/ucrt64/libexec/gstreamer-1.0/gst-plugins-doc-cache-generator)
Program hotdoc found: NO
Message: Hotdoc not found, not building the documentation
Message: Meta python bindings disabled
Configuring config.h using configuration
Message: install git commit hooks
Build targets in project: 9

gst-plugin-pylon 0.7.0

    Plugins: pylon

  User defined options
    backend: ninja

Found ninja-1.12.0 at C:\msys64\ucrt64\bin/ninja.EXE

Attached is an image of the output from ninja -C build:
pylon_error

@zacharynevin-stemcell zacharynevin-stemcell changed the title Impossible to compile using MSYS2-UCRT64 and MSYS2-MINGW64 Impossible to compile using MSYS2-UCRT64 or MSYS2-MINGW64 Jun 7, 2024
@thiesmoeller
Copy link
Collaborator

@zacharynevin-stemcell compiling pylon is only verified using gcc/clang on linux and msvc/clang on windows and clang/gcc on macos.

To my knowledge collabora did some work to allow compiling the python bindings on windows using msvc

I'll check what is the problem there

@thiesmoeller
Copy link
Collaborator

From my analyis it is possible to get this running by using gstreamer and pygobject from conda.

Is this an option for you?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants