Skip to content

[BUG] Gst plugin kvssink is built as static library #1178

@mateuszboryn

Description

@mateuszboryn

Logging

cmake .. -DBUILD_GSTREAMER_PLUGIN=ON -DBUILD_STATIC=ON
...
make
...
ls *libgst*
libgstkvssink.a

Describe the bug
I would like to build gst plugin, that is a shared library (libgstkvssink.so) and could be used by gst-launch-1.0 command, but the producer, and other open-source located deps should be statically linked to that libgstkvssink.so. With current setup I can't find it in the options.
Current implementation makes kvssink GST component difficult to package/deploy.

To Reproduce
Steps to reproduce the behavior:

For now I can see two options to build kvssink, both unsatisfactory.

cmake .. -DBUILD_GSTREAMER_PLUGIN=ON -DBUILD_STATIC=ON -DBUILD_DEPENDENCIES=OFF
...
make
...
ls *libgst*   # here, we can see static lib that is useless for gst-launch-1.0 command
libgstkvssink.a
cmake .. -DBUILD_GSTREAMER_PLUGIN=ON -DBUILD_STATIC=OFF -DBUILD_DEPENDENCIES=OFF
...
make
...
ldd libgstkvssink.so | grep $(realpath ..)    # here, we can see shared lib, but linkage to dependencies is hardcoded. It makes kvssink difficult to package/deploy.
        libKinesisVideoProducer.so => /home/laptop/pro/amazon-kinesis-video-streams-producer-sdk-cpp/build_dynamic_default/libKinesisVideoProducer.so (0x00007dc51e172000)
        libcproducer.so => /home/laptop/pro/amazon-kinesis-video-streams-producer-sdk-cpp/build_dynamic_default/dependency/libkvscproducer/kvscproducer-src/libcproducer.so (0x00007dc51e0e8000)

Expected behavior
In libgstkvssink.so I don't want dependencies to libKinesisVideoProducer.so or libcproducer.so.

cmake .. -DBUILD_GSTREAMER_PLUGIN=ON -DBUILD_STATIC=ON
...
make
...
ls *libgst*
libgstkvssink.so

then issuing command:

ldd libgstkvssink.so | grep $(realpath ..)

should output nothing.

SDK version number
3.4.1

Open source building
default setup of dependencies (both system-installed libs, and libs built by cmake configure)

Screenshots
none

Platform (please complete the following information):

  • OS: Linux, but maybe others
  • Processor: any
  • Version Ubuntu 22.04

Additional context
none

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions