joshdoe / gst-plugins-vision

GStreamer plugins related to the field of machine vision
Other
134 stars 50 forks source link

Error compiling for Ubuntu #55

Closed mkaivs closed 3 years ago

mkaivs commented 3 years ago

I only need the pylonsrc plugin, I've installed pylon 6 (include path /opt/pylon/include, lib path /opt/pylon/lib) so I modified FindPylon.cmake accordingly to work with pylon 6 instead of pylon 5 as follow:

Line 15: set (_PYLON_DIR "/opt/pylon5") -> set (_PYLON_DIR "/opt/pylon") Line 32: "${PYLON_DIR}/lib64") -> "${PYLON_DIR}/lib")

Then, I followed the instruction to compile for Ubuntu. Running cmake ..:

-- The C compiler identification is GNU 7.5.0
-- The CXX compiler identification is GNU 7.5.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
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.29.1") 
-- Checking for module 'gstreamer-1.0'
--   Found gstreamer-1.0, version 1.14.5
-- Checking for module 'gstreamer-base-1.0'
--   Found gstreamer-base-1.0, version 1.14.5
-- Found GSTREAMER_BASE_LIBRARY: /usr/lib/x86_64-linux-gnu/libgstbase-1.0.so
-- Found GSTREAMER_BASE_INCLUDE_DIR: /usr/include/gstreamer-1.0
-- Found GStreamer: /usr/lib/x86_64-linux-gnu/libgstreamer-1.0.so  
-- Checking for module 'gstreamer-plugins-base-1.0'
--   Found gstreamer-plugins-base-1.0, version 1.14.5
-- Checking for module 'gstreamer-video-1.0'
--   Found gstreamer-video-1.0, version 1.14.5
-- Found GSTREAMER_VIDEO_LIBRARY: /usr/lib/x86_64-linux-gnu/libgstvideo-1.0.so
-- Found GSTREAMER_VIDEO_INCLUDE_DIR: /usr/include/gstreamer-1.0
-- Found GStreamerPluginsBase: TRUE  
-- Checking for module 'glib-2.0'
--   Found glib-2.0, version 2.56.4
-- Found GLIB2: /usr/lib/x86_64-linux-gnu/libglib-2.0.so  
-- Checking for module 'gobject-2.0'
--   Found gobject-2.0, version 2.56.4
-- Found GObject: /usr/include/glib-2.0  
-- Checking for module 'orc-0.4'
--   Found orc-0.4, version 0.4.28
-- Found ORC: /usr/lib/x86_64-linux-gnu/liborc-0.4.so  
-- Could NOT find BITFLOW (missing: BITFLOW_INCLUDE_DIR BITFLOW_LIBRARIES) 
-- Could NOT find NIIMAQ (missing: NIIMAQ_INCLUDE_DIR NIIMAQ_LIBRARIES) 
-- Could NOT find NIIMAQDX (missing: NIIMAQDX_INCLUDE_DIR NIIMAQDX_LIBRARIES) 
-- WARNING: OpenCV was not found. Please specify OpenCV directory using OpenCV_DIR env. variable
-- Could NOT find APTINA (missing: APTINA_INCLUDE_DIR APTINA_LIBRARIES) 
-- Could NOT find EDT (missing: EDT_INCLUDE_DIR EDT_LIBRARIES) 
-- Could NOT find EURESYS (missing: EURESYS_INCLUDE_DIR EURESYS_LIBRARIES) 
-- Could NOT find GIGESIM (missing: GIGESIM_INCLUDE_DIR GIGESIM_LIBRARIES) 
-- Could NOT find IDSUEYE (missing: IDSUEYE_INCLUDE_DIR IDSUEYE_LIBRARIES) 
-- Could NOT find IMPERX_FLEX (missing: IMPERX_FLEX_INCLUDE_DIR IMPERX_FLEX_LIBRARIES) 
-- Could NOT find IMPERX_SDI (missing: IMPERX_SDI_INCLUDE_DIR IMPERX_SDI_LIBRARIES) 
-- IOTECHDAQX: WARNING: include dir not found
-- IOTECHDAQX: WARNING: library not found
-- Could NOT find IOTECHDAQX (missing: IOTECHDAQX_INCLUDE_DIR IOTECHDAQX_LIBRARIES) 
-- Could NOT find KAYA (missing: KAYA_INCLUDE_DIR KAYA_LIBRARIES) 
-- Could NOT find MATROX (missing: MATROX_INCLUDE_DIR MATROX_LIBRARIES) 
-- Could NOT find PHOENIX (missing: PHOENIX_INCLUDE_DIR PHOENIX_LIBRARIES) 
-- Could NOT find Pleora (missing: Pleora_INCLUDE_DIR Pleora_LIBRARY_DIR Pleora_LIBRARIES) 
-- Found PYLON: /opt/pylon/include  
-- Could NOT find QCAM (missing: QCAM_INCLUDE_DIR QCAM_LIBRARIES) 
-- Could NOT find SAPERA (missing: SAPERA_INCLUDE_DIR SAPERA_LIBRARIES) 
-- XCLIB: WARNING: include dir not found
-- XCLIB: WARNING: library not found
-- Could NOT find XCLIB (missing: XCLIB_INCLUDE_DIR XCLIB_LIBRARIES) 

-----------------------------------------------------------------------------
-- The following external packages were located on your system.
-- This installation will have the extra features provided by these packages.
-----------------------------------------------------------------------------
   * GStreamer - Required to build gst-plugins-vision
   * GStreamer base library - Required to build most plugins
   * GStreamer video library - Required to build several video plugins
   * GLib - Required to build gst-plugins-vision
   * GObject - Required to build gst-plugins-vision
   * Orc - Required library to improve performance
   * Basler Pylon - Required to build Basler Pylon source element

-----------------------------------------------------------------------------
-- The following OPTIONAL packages could NOT be located on your system.
-- Consider installing them to enable more features from this software.
-----------------------------------------------------------------------------
   * BitFlow  <http://www.bitflow.com/>
     Required to build BitFlow source element
   * NI-IMAQ  <http://www.ni.com/>
     Required to build National Instruments IMAQ source element
   * NI-IMAQdx  <http://www.ni.com/>
     Required to build National Instruments IMAQdx source element
   * FreeImage  <http://freeimage.sourceforge.net/>
     Required to build FreeImage plugin
   * OpenCV  <http://opencv.willowgarage.com/>
     Required to build sensorfx plugin
   * Aptina  <http://www.onsemi.com/>
     Required to build aptinasrc source element
   * EDT  <http://www.edt.com/>
     Required to build EDT PDV source element
   * Euresys  <http://www.euresys.com/>
     Required to build Euresys source element
   * GigESim  <http://www.ab-soft.com/>
     Required to build A&B Soft GigESim sink element
   * IDS uEye  <http://en.ids-imaging.com/>
     Required to build IDS uEye source element
   * Imperx FrameLink Express  <http://www.imperx.com/>
     Required to build Imperx FrameLink Express source element
   * Imperx HD-SDI Express  <http://www.imperx.com/>
     Required to build Imperx HD-SDI Express source element
   * IOtech DaqX  <http://www.mccdaq.com/>
     Required to build IOtech DaqX source element
   * KAYA Vision Point  <http://www.kayainstruments.com/>
     Required to build KAYA source element
   * Matrox MIL  <http://www.matrox.com/imaging/>
     Required to build Matrox MIL source element
   * Active Silicon Phoenix  <http://www.activesilicon.com/>
     Required to build Active Silicon Phoenix source element
   * Pleora eBUS  <http://www.pleora.com/>
     Required to build Pleora eBUS source element
   * QImaging QCam  <https://www.photometrics.com/qimaging>
     Required to build QImaging QCam source element
   * Teledyne DALSA Sapera  <http://www.teledynedalsa.com/>
     Required to build Teledyne DALSA Sapera source element
   * EPIX PIXCI  <http://www.epixinc.com/>
     Required to build EPIX PIXCI source element

-----------------------------------------------------------------------------

-- Configuring done
WARNING: Target "gstgentl" requests linking to directory "/usr/include/gstreamer-1.0".  Targets may link only to libraries.  CMake is dropping the item.
WARNING: Target "gstgentl" requests linking to directory "/usr/include/gstreamer-1.0".  Targets may link only to libraries.  CMake is dropping the item.
-- Generating done
-- Build files have been written to: /home/minh/gst-plugins-vision/build

No error, but 2 warnings about: Target "gstgentl" requests linking to directory "/usr/include/gstreamer-1.0", I think this is probably cause by this line ${GSTREAMER_INCLUDE_DIR}/../../lib/z.lib?

I checked the generated CMakeCache.txt in the build directory, and see these:

//Path to a file.
GSTREAMER_BASE_INCLUDE_DIR:PATH=/usr/include/gstreamer-1.0

//Path to a library.
GSTREAMER_BASE_LIBRARY:FILEPATH=/usr/lib/x86_64-linux-gnu/libgstbase-1.0.so

//Path to a file.
GSTREAMER_INCLUDE_DIR:PATH=/usr/include/gstreamer-1.0

//Path to a file.
GSTREAMER_INCLUDE_DIR_ARCH:PATH=/usr/include/gstreamer-1.0

//Path to a library.
GSTREAMER_LIBRARY:FILEPATH=/usr/lib/x86_64-linux-gnu/libgstreamer-1.0.so

//The path to the gstreamer plugins installation directory
GSTREAMER_PLUGIN_DIR:PATH=/usr/lib/x86_64-linux-gnu/gstreamer-1.0

//Path to a file.
GSTREAMER_VIDEO_INCLUDE_DIR:PATH=/usr/include/gstreamer-1.0

//Path to a library.
GSTREAMER_VIDEO_LIBRARY:FILEPATH=/usr/lib/x86_64-linux-gnu/libgstvideo-1.0.so

When I run make, I got the following error:

[  5%] Building C object gst/bayerutils/CMakeFiles/gstbayerutils.dir/gstbayer2gray.c.o
/home/minh/gst-plugins-vision/gst/bayerutils/gstbayer2gray.c: In function ‘gst_bayer2gray_transform_caps’:
/home/minh/gst-plugins-vision/gst/bayerutils/gstbayer2gray.c:273:5: warning: ignoring return value of ‘gst_caps_merge’, declared with attribute warn_unused_result [-Wunused-result]
     gst_caps_merge (other_caps, c);
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[ 10%] Linking C shared module libgstbayerutils.so
[ 10%] Built target gstbayerutils
Scanning dependencies of target gstextractcolor
[ 15%] Building C object gst/extractcolor/CMakeFiles/gstextractcolor.dir/gstextractcolor.c.o
/home/minh/gst-plugins-vision/gst/extractcolor/gstextractcolor.c: In function ‘gst_extract_color_transform_caps’:
/home/minh/gst-plugins-vision/gst/extractcolor/gstextractcolor.c:301:5: warning: ignoring return value of ‘gst_caps_merge’, declared with attribute warn_unused_result [-Wunused-result]
     gst_caps_merge (other_caps, c);
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[ 20%] Building C object gst/extractcolor/CMakeFiles/gstextractcolor.dir/gstextractcolororc-dist.c.o
[ 25%] Linking C shared module libgstextractcolor.so
[ 25%] Built target gstextractcolor
Scanning dependencies of target gstmisb
[ 30%] Building C object gst/misb/CMakeFiles/gstmisb.dir/gstmisb.c.o
[ 35%] Building C object gst/misb/CMakeFiles/gstmisb.dir/gstmisbirpack.c.o
[ 40%] Building C object gst/misb/CMakeFiles/gstmisb.dir/gstmisbirunpack.c.o
[ 45%] Linking C shared module libgstmisb.so
[ 45%] Built target gstmisb
Scanning dependencies of target gstselect
[ 50%] Building C object gst/select/CMakeFiles/gstselect.dir/gstselect.c.o
In file included from /usr/include/gstreamer-1.0/gst/gst.h:55:0,
                 from /usr/include/gstreamer-1.0/gst/base/gstbasetransform.h:24,
                 from /home/minh/gst-plugins-vision/gst/select/gstselect.h:28,
                 from /home/minh/gst-plugins-vision/gst/select/gstselect.c:41:
/home/minh/gst-plugins-vision/gst/select/gstselect.c: In function ‘gst_select_transform_ip’:
/home/minh/gst-plugins-vision/gst/select/gstselect.c:224:9: warning: format ‘%d’ expects argument of type ‘int’, but argument 8 has type ‘guint64 {aka long unsigned int}’ [-Wformat=]
         "Dropping buffer %d since it's before the chosen offset %d",
         ^
/usr/include/gstreamer-1.0/gst/gstinfo.h:640:31: note: in definition of macro ‘GST_CAT_LEVEL_LOG’
         (GObject *) (object), __VA_ARGS__);    \
                               ^~~~~~~~~~~
/home/minh/gst-plugins-vision/gst/select/gstselect.c:223:5: note: in expansion of macro ‘GST_LOG_OBJECT’
     GST_LOG_OBJECT (filt,
     ^~~~~~~~~~~~~~
/home/minh/gst-plugins-vision/gst/select/gstselect.c:231:9: warning: format ‘%d’ expects argument of type ‘int’, but argument 8 has type ‘guint64 {aka long unsigned int}’ [-Wformat=]
         "Dropping buffer %d since it's been chosen to be skipped", buf_offset);
         ^
/usr/include/gstreamer-1.0/gst/gstinfo.h:640:31: note: in definition of macro ‘GST_CAT_LEVEL_LOG’
         (GObject *) (object), __VA_ARGS__);    \
                               ^~~~~~~~~~~
/home/minh/gst-plugins-vision/gst/select/gstselect.c:230:5: note: in expansion of macro ‘GST_LOG_OBJECT’
     GST_LOG_OBJECT (filt,
     ^~~~~~~~~~~~~~
[ 55%] Linking C shared module libgstselect.so
[ 55%] Built target gstselect
Scanning dependencies of target gstvideoadjust
[ 60%] Building C object gst/videoadjust/CMakeFiles/gstvideoadjust.dir/gstvideoadjust.c.o
[ 65%] Building C object gst/videoadjust/CMakeFiles/gstvideoadjust.dir/gstvideolevels.c.o
In file included from /usr/include/gstreamer-1.0/gst/gst.h:55:0,
                 from /usr/include/gstreamer-1.0/gst/base/gstbasetransform.h:24,
                 from /home/minh/gst-plugins-vision/gst/videoadjust/gstvideolevels.h:28,
                 from /home/minh/gst-plugins-vision/gst/videoadjust/gstvideolevels.c:43:
/home/minh/gst-plugins-vision/gst/videoadjust/gstvideolevels.c: In function ‘gst_videolevels_transform’:
/home/minh/gst-plugins-vision/gst/videoadjust/gstvideolevels.c:626:36: warning: format ‘%d’ expects argument of type ‘int’, but argument 8 has type ‘GstClockTimeDiff {aka long int}’ [-Wformat=]
       GST_LOG_OBJECT (videolevels, "Auto adjusting levels (%d ns since last)",
                                    ^
/usr/include/gstreamer-1.0/gst/gstinfo.h:640:31: note: in definition of macro ‘GST_CAT_LEVEL_LOG’
         (GObject *) (object), __VA_ARGS__);    \
                               ^~~~~~~~~~~
/home/minh/gst-plugins-vision/gst/videoadjust/gstvideolevels.c:626:7: note: in expansion of macro ‘GST_LOG_OBJECT’
       GST_LOG_OBJECT (videolevels, "Auto adjusting levels (%d ns since last)",
       ^~~~~~~~~~~~~~
[ 70%] Linking C shared module libgstvideoadjust.so
[ 70%] Built target gstvideoadjust
Scanning dependencies of target gstgentl
[ 75%] Building C object sys/gentl/CMakeFiles/gstgentl.dir/gstgentlsrc.c.o
In file included from /usr/include/gstreamer-1.0/gst/gst.h:55:0,
                 from /home/minh/gst-plugins-vision/sys/gentl/gstgentlsrc.c:40:
/home/minh/gst-plugins-vision/sys/gentl/gstgentlsrc.c: In function ‘gst_gentlsrc_get_payload_size’:
/home/minh/gst-plugins-vision/sys/gentl/gstgentlsrc.c:709:27: warning: format ‘%d’ expects argument of type ‘int’, but argument 8 has type ‘size_t {aka long unsigned int}’ [-Wformat=]
     GST_DEBUG_OBJECT(src, "Payload size defined by stream info: %d", payload_size);
                           ^
/usr/include/gstreamer-1.0/gst/gstinfo.h:640:31: note: in definition of macro ‘GST_CAT_LEVEL_LOG’
         (GObject *) (object), __VA_ARGS__);    \
                               ^~~~~~~~~~~
/home/minh/gst-plugins-vision/sys/gentl/gstgentlsrc.c:709:5: note: in expansion of macro ‘GST_DEBUG_OBJECT’
     GST_DEBUG_OBJECT(src, "Payload size defined by stream info: %d", payload_size);
     ^~~~~~~~~~~~~~~~
/home/minh/gst-plugins-vision/sys/gentl/gstgentlsrc.c:717:27: warning: format ‘%d’ expects argument of type ‘int’, but argument 8 has type ‘size_t {aka long unsigned int}’ [-Wformat=]
     GST_DEBUG_OBJECT(src, "Payload size defined by node map: %d", payload_size);
                           ^
/usr/include/gstreamer-1.0/gst/gstinfo.h:640:31: note: in definition of macro ‘GST_CAT_LEVEL_LOG’
         (GObject *) (object), __VA_ARGS__);    \
                               ^~~~~~~~~~~
/home/minh/gst-plugins-vision/sys/gentl/gstgentlsrc.c:717:5: note: in expansion of macro ‘GST_DEBUG_OBJECT’
     GST_DEBUG_OBJECT(src, "Payload size defined by node map: %d", payload_size);
     ^~~~~~~~~~~~~~~~
In file included from /usr/include/gstreamer-1.0/gst/gstbin.h:27:0,
                 from /usr/include/gstreamer-1.0/gst/gst.h:35,
                 from /home/minh/gst-plugins-vision/sys/gentl/gstgentlsrc.c:40:
/home/minh/gst-plugins-vision/sys/gentl/gstgentlsrc.c: In function ‘gst_gentlsrc_get_buffer’:
/home/minh/gst-plugins-vision/sys/gentl/gstgentlsrc.c:1334:10: warning: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘size_t {aka long unsigned int}’ [-Wformat=]
         ("Unsupported payload type: %d", payload_type), (NULL));
          ^
/usr/include/gstreamer-1.0/gst/gstelement.h:422:44: note: in definition of macro ‘GST_ELEMENT_ERROR’
   gchar *__txt = _gst_element_error_printf text;                        \
                                            ^~~~
[ 80%] Building C object sys/gentl/CMakeFiles/gstgentl.dir/ioapi.c.o
[ 85%] Building C object sys/gentl/CMakeFiles/gstgentl.dir/unzip.c.o
make[2]: *** No rule to make target '/usr/include/gstreamer-1.0/../../lib/z.lib', needed by 'sys/gentl/libgstgentl.so'.  Stop.
CMakeFiles/Makefile2:447: recipe for target 'sys/gentl/CMakeFiles/gstgentl.dir/all' failed
make[1]: *** [sys/gentl/CMakeFiles/gstgentl.dir/all] Error 2
Makefile:151: recipe for target 'all' failed
make: *** [all] Error 2

I looked at the CMakeLists.txt for gentl and on line 25, I saw this: ${GSTREAMER_INCLUDE_DIR}/../../lib/z.lib, I'm not sure what is this library (z.lib) that I'm missing? How do I deal with this error?

mkaivs commented 3 years ago

Ok, my assumption was that gentl is not a dependency of pylonsrc so I can skip building it. Thus, I comment out line 17 of this CMakeLists.txt file to skip building gentl all together. Then I had to modified line 131 of this CMakeLists.txt file from set(_PREFIX "/usr/lib") to set(_PREFIX "/usr/lib/x86_64-linux-gnu"), I tried export CMAKE_INSTALL_PREFIX=/usr/lib/x86_64-linux-gnu but it failed to overwrite the default value of CMAKE_INSTALL_PREFIX so I must hard code the path in the CMakeLists.txt file. With these 2 changes, the following run without error:

cmake ...
make
sudo make install

However, when I double check with gst-inspect-1.0 pylonsrc, it said the plugin was not found and a warning about libpylonc-6.2.0.so not found. Do a quick check:

ldd /usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstpylon.so

linux-vdso.so.1 (0x00007fffb9def000)
libglib-2.0.so.0 => /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0 (0x00007fd607053000)
libgobject-2.0.so.0 => /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0 (0x00007fd606dff000)
libgstreamer-1.0.so.0 => /usr/lib/x86_64-linux-gnu/libgstreamer-1.0.so.0 (0x00007fd606ac4000)
libgstbase-1.0.so.0 => /usr/lib/x86_64-linux-gnu/libgstbase-1.0.so.0 (0x00007fd60684f000)
libpylonc-6.2.0.so => not found
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fd60645e000)
libpcre.so.3 => /lib/x86_64-linux-gnu/libpcre.so.3 (0x00007fd6061ec000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007fd605fcd000)
libffi.so.6 => /usr/lib/x86_64-linux-gnu/libffi.so.6 (0x00007fd605dc5000)
libgmodule-2.0.so.0 => /usr/lib/x86_64-linux-gnu/libgmodule-2.0.so.0 (0x00007fd605bc1000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007fd605823000)
librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007fd60561b000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007fd605417000)
/lib64/ld-linux-x86-64.so.2 (0x00007fd607590000)

Now to fix this, I add pylon.conf to /etc/ld.so.conf.d dir, the file contain the pylon 6 lib path /opt/pylon/lib

sudo vi /etc/ld.so.conf.d/pylon.conf 
#add /opt/pylon/lib to the file
sudo ldconfig

Now, gst-inspect-1.0 pylonsrc works, but it gave this warning:

** (gst-inspect-1.0:29954): WARNING **: 10:32:12.120: /home/minh/gst-plugins-vision/sys/pylon/gstpylonsrc.c:1447: invalid property id 30 for "coloradjustment" of type 'GParamBoolean' in 'GstPylonSrc'
flags: readable, writable

Is this something I need to worry about? How do I get rid of this warning?

mrstecklo commented 3 years ago

@mkaivs, invalid property id means that property is installed on plugin, but there is no handler for it in set_property() and get_property() functions. It is an uncritical error, that should be fixed.

Then I had to modified line 131 of this CMakeLists.txt file from set(_PREFIX "/usr/lib") to set(_PREFIX "/usr/lib/x86_64-linux-gnu")

I'm not really sure, but shouldn't you use cmake --prefix=/usr/lib/x86_64-linux-gnu ..?

libpylonc-6.2.0.so => not found

That's a common problem as far as I know. I'm using LD_LIBRARY_PATH

mkaivs commented 3 years ago

@mrstecklo

I'm not really sure, but shouldn't you use cmake --prefix=/usr/lib/x86_64-linux-gnu ..?

You're correct. I'm new to CMake so I wasn't aware that I can just set CMAKE_INSTALL_PREFIX directly as cmake -DCMAKE_INSTALL_PREFIX=/usr/lib/x86_64-linux-gnu ..

It is an uncritical error, that should be fixed.

Thanks for the clarification. Is this something that will be addressed in the next release?

mrstecklo commented 3 years ago

Thanks for the clarification. Is this something that will be addressed in the next release?

Yes, I'll fix it shortly

init-22 commented 3 years ago

@mrstecklo @mkaivs I've followed the steps mentioned above and exported the /opt/pylon/lib in LD_LIBRARY_PATH but I am still getting 'No such element or plugin 'pylonsrc' ' , I've also commented out line no. 17 in src/cmaklists

Please find the steps I've taken for make and cmake :

(base) ➜ build git:(master) ✗ cmake -DCMAKE_INSTALL_PREFIX=/usr/lib/x86_64-linux-gnu .. -- Could NOT find BITFLOW (missing: BITFLOW_INCLUDE_DIR BITFLOW_LIBRARIES) -- Could NOT find NIIMAQ (missing: NIIMAQ_INCLUDE_DIR NIIMAQ_LIBRARIES) -- Could NOT find NIIMAQDX (missing: NIIMAQDX_INCLUDE_DIR NIIMAQDX_LIBRARIES) -- WARNING: OpenCV was not found. Please specify OpenCV directory using OpenCV_DIR env. variable -- Could NOT find APTINA (missing: APTINA_INCLUDE_DIR APTINA_LIBRARIES) -- Could NOT find EDT (missing: EDT_INCLUDE_DIR EDT_LIBRARIES) -- Could NOT find EURESYS (missing: EURESYS_INCLUDE_DIR EURESYS_LIBRARIES) -- Could NOT find GIGESIM (missing: GIGESIM_INCLUDE_DIR GIGESIM_LIBRARIES) -- Could NOT find IDSUEYE (missing: IDSUEYE_INCLUDE_DIR IDSUEYE_LIBRARIES) -- Could NOT find IMPERX_FLEX (missing: IMPERX_FLEX_INCLUDE_DIR IMPERX_FLEX_LIBRARIES) -- Could NOT find IMPERX_SDI (missing: IMPERX_SDI_INCLUDE_DIR IMPERX_SDI_LIBRARIES) -- IOTECHDAQX: WARNING: include dir not found -- IOTECHDAQX: WARNING: library not found -- Could NOT find IOTECHDAQX (missing: IOTECHDAQX_INCLUDE_DIR IOTECHDAQX_LIBRARIES) -- Could NOT find KAYA (missing: KAYA_INCLUDE_DIR KAYA_LIBRARIES) -- Could NOT find MATROX (missing: MATROX_INCLUDE_DIR MATROX_LIBRARIES) -- Could NOT find PHOENIX (missing: PHOENIX_INCLUDE_DIR PHOENIX_LIBRARIES) -- Could NOT find Pleora (missing: Pleora_INCLUDE_DIR Pleora_LIBRARY_DIR Pleora_LIBRARIES) -- Could NOT find QCAM (missing: QCAM_INCLUDE_DIR QCAM_LIBRARIES) -- Could NOT find SAPERA (missing: SAPERA_INCLUDE_DIR SAPERA_LIBRARIES) -- XCLIB: WARNING: include dir not found -- XCLIB: WARNING: library not found -- Could NOT find XCLIB (missing: XCLIB_INCLUDE_DIR XCLIB_LIBRARIES)


-- The following external packages were located on your system. -- This installation will have the extra features provided by these packages.


-- The following OPTIONAL packages could NOT be located on your system. -- Consider installing them to enable more features from this software.


-- Configuring done -- Generating done -- Build files have been written to: /general/gst-plugins-vision/build

(base) ➜ build git:(master) ✗ make [ 12%] Built target gstbayerutils [ 31%] Built target gstextractcolor [ 56%] Built target gstmisb [ 68%] Built target gstselect [ 87%] Built target gstvideoadjust [100%] Built target gstpylon

(base) ➜ build git:(master) ✗ sudo make install [sudo] password for senquire-gpu: [ 12%] Built target gstbayerutils [ 31%] Built target gstextractcolor [ 56%] Built target gstmisb [ 68%] Built target gstselect [ 87%] Built target gstvideoadjust [100%] Built target gstpylon Install the project... -- Install configuration: "" -- Up-to-date: /usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstbayerutils.so -- Up-to-date: /usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstextractcolor.so -- Up-to-date: /usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstmisb.so -- Up-to-date: /usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstselect.so -- Up-to-date: /usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstvideoadjust.so -- Up-to-date: /usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstpylon.so

also, (base) ➜ ld.so.conf.d ldd /usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstpylon.so linux-vdso.so.1 (0x00007ffd733b3000) libglib-2.0.so.0 => /lib/x86_64-linux-gnu/libglib-2.0.so.0 (0x00007fdd5d2d1000) libgobject-2.0.so.0 => /lib/x86_64-linux-gnu/libgobject-2.0.so.0 (0x00007fdd5d271000) libgstreamer-1.0.so.0 => /lib/x86_64-linux-gnu/libgstreamer-1.0.so.0 (0x00007fdd5d12a000) libgstbase-1.0.so.0 => /lib/x86_64-linux-gnu/libgstbase-1.0.so.0 (0x00007fdd5d0ac000) libpylonc-6.1.1.so => /opt/pylon/lib/libpylonc-6.1.1.so (0x00007fdd5ce42000) libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fdd5cc50000) libpcre.so.3 => /lib/x86_64-linux-gnu/libpcre.so.3 (0x00007fdd5cbdb000) libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007fdd5cbb8000) libffi.so.7 => /lib/x86_64-linux-gnu/libffi.so.7 (0x00007fdd5cbac000) libgmodule-2.0.so.0 => /lib/x86_64-linux-gnu/libgmodule-2.0.so.0 (0x00007fdd5cba6000) libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007fdd5ca57000) libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007fdd5ca51000) libpylonbase-6.1.1.so => /opt/pylon/lib/libpylonbase-6.1.1.so (0x00007fdd5bc25000) libpylonutility-6.1.1.so => /opt/pylon/lib/libpylonutility-6.1.1.so (0x00007fdd5b81c000) libGenApi_gcc_v3_1_Basler_pylon.so => /opt/pylon/lib/libGenApi_gcc_v3_1_Basler_pylon.so (0x00007fdd5b2c3000) libGCBase_gcc_v3_1_Basler_pylon.so => /opt/pylon/lib/libGCBase_gcc_v3_1_Basler_pylon.so (0x00007fdd5b0a7000) librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007fdd5b09c000) libstdc++.so.6 => /lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007fdd5aeba000) libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007fdd5ae9d000) /lib64/ld-linux-x86-64.so.2 (0x00007fdd5d442000) libLog_gcc_v3_1_Basler_pylon.so => /opt/pylon/lib/libLog_gcc_v3_1_Basler_pylon.so (0x00007fdd5ac92000) libMathParser_gcc_v3_1_Basler_pylon.so => /opt/pylon/lib/libMathParser_gcc_v3_1_Basler_pylon.so (0x00007fdd5aa87000) libXmlParser_gcc_v3_1_Basler_pylon.so => /opt/pylon/lib/libXmlParser_gcc_v3_1_Basler_pylon.so (0x00007fdd5a747000) libNodeMapData_gcc_v3_1_Basler_pylon.so => /opt/pylon/lib/libNodeMapData_gcc_v3_1_Basler_pylon.so (0x00007fdd5a52b000)

mrstecklo commented 3 years ago

@init-22, your output seems fine. Please clear gstreamer plugin cache and run gst-inspect-1.0. This should provide a more verbose output on error

rm ~/.cache/gstreamer-1.0/*
ls /usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstpylon.so
GST_PLUGIN_PATH=/usr/lib/x86_64-linux-gnu/gstreamer-1.0/ LD_LIBRARY_PATH=/opt/pylon/lib/ gst-inspect-1.0 pylonsrc
init-22 commented 3 years ago

Hey, I tried the above steps but still getting error,

(gst-plugin-scanner:70397): GStreamer-WARNING **: 15:49:30.602: Failed to load plugin '/usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstaudiotestsrc.so': /usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstaudiotestsrc.so: undefined symbol: gst_buffer_add_audio_meta No such element or plugin 'pylonsrc'

On Wed, Jul 7, 2021 at 1:27 PM mrstecklo @.***> wrote:

@init-22 https://github.com/init-22, your output seems fine. Please clear gstreamer plugin cache and run gst-inspect-1.0. This should provide a more verbose output on error

rm ~/.cache/gstreamer-1.0/* ls /usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstpylon.so GST_PLUGIN_PATH=/usr/lib/x86_64-linux-gnu/gstreamer-1.0/ LD_LIBRARY_PATH=/opt/pylon/lib/ gst-inspect-1.0 pylonsrc

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/joshdoe/gst-plugins-vision/issues/55#issuecomment-875378895, or unsubscribe https://github.com/notifications/unsubscribe-auth/AIGIWU4MT4GIMYJ7DZYUC3LTWQCGDANCNFSM44SCSGUQ .

mrstecklo commented 3 years ago

Since gst-inspect-1.0 can't say anything specific about pylonsrc I would suppose that libgstpylon.so is not installed or broken. Does ls /usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstpylon.so print back anything? Try setting GST_PLUGIN_PATH to your build directory

init-22 commented 3 years ago

Hello @mrstecklo ,

(base) ➜ build git:(master) ✗ ls /usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstpylon.so /usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstpylon.so

after setting it to build directory :
No such element or plugin 'pylonsrc'

init-22 commented 3 years ago

(gst-plugin-scanner:71871): GStreamer-WARNING **: 17:40:33.572: Failed to load plugin '/usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstdecklink.so': /usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstdecklink.so: undefined symbol: gst_video_vbi_parser_new

(gst-plugin-scanner:71871): GStreamer-WARNING **: 17:40:33.572: Failed to load plugin '/usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstrtspclientsink.so': /lib/x86_64-linux-gnu/libgstrtspserver-1.0.so.0: undefined symbol: gst_rtsp_watch_send_messages

(gst-plugin-scanner:71871): GStreamer-WARNING **: 17:40:33.576: Failed to load plugin '/usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstcompositor.so': /usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstcompositor.so: undefined symbol: gst_video_aggregator_pad_get_prepared_frame

(gst-plugin-scanner:71871): GStreamer-WARNING **: 17:40:33.577: Failed to load plugin '/usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstaudiobuffersplit.so': /usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstaudiobuffersplit.so: undefined symbol: gst_audio_buffer_truncate

(gst-plugin-scanner:71871): GStreamer-WARNING **: 17:40:33.577: Failed to load plugin '/usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstvideoparsersbad.so': /usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstvideoparsersbad.so: undefined symbol: gst_buffer_add_video_caption_meta

(gst-plugin-scanner:71871): GStreamer-WARNING **: 17:40:33.580: Failed to load plugin '/usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstopengl.so': /usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstopengl.so: undefined symbol: gst_video_aggregator_get_type

(gst-plugin-scanner:71871): GStreamer-WARNING **: 17:40:33.624: Failed to load plugin '/usr/lib/x86_64-linux-gnu/gstreamer-1.0/deepstream/libnvdsgst_inferserver.so': libtrtserver.so: cannot open shared object file: No such file or directory

(gst-plugin-scanner:71871): GStreamer-WARNING **: 17:40:33.630: Failed to load plugin '/usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstisomp4.so': /usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstisomp4.so: undefined symbol: gst_query_set_bitrate

(gst-plugin-scanner:71871): GStreamer-WARNING **: 17:40:33.632: Failed to load plugin '/usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstwebrtcdsp.so': /lib/x86_64-linux-gnu/libgstbadaudio-1.0.so.0: undefined symbol: gst_buffer_add_audio_meta

(gst-plugin-scanner:71871): GStreamer-WARNING **: 17:40:33.637: Failed to load plugin '/usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstqmlgl.so': /usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstqmlgl.so: undefined symbol: gst_gl_display_egl_new_with_egl_display

(gst-plugin-scanner:71871): GStreamer-WARNING **: 17:40:33.637: Failed to load plugin '/usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstdeinterlace.so': /usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstdeinterlace.so: undefined symbol: gst_video_caption_meta_api_get_type

(gst-plugin-scanner:71871): GStreamer-WARNING **: 17:40:33.644: Failed to load plugin '/usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstx264.so': /usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstx264.so: undefined symbol: gst_video_caption_meta_api_get_type

(gst-plugin-scanner:71871): GStreamer-WARNING **: 17:40:33.646: Failed to load plugin '/usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstmatroska.so': /usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstmatroska.so: undefined symbol: gst_query_set_bitrate

(gst-plugin-scanner:71871): GStreamer-WARNING **: 17:40:33.647: Failed to load plugin '/usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstaudioconvert.so': /usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstaudioconvert.so: undefined symbol: gst_audio_buffer_map

(gst-plugin-scanner:71871): GStreamer-WARNING **: 17:40:33.647: Failed to load plugin '/usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstmultifile.so': /usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstmultifile.so: undefined symbol: gst_queue_array_clear

(gst-plugin-scanner:71871): GStreamer-WARNING **: 17:40:33.648: Failed to load plugin '/usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstpulseaudio.so': /usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstpulseaudio.so: undefined symbol: gst_device_provider_device_changed

(gst-plugin-scanner:71871): GStreamer-WARNING **: 17:40:33.649: Failed to load plugin '/usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstaudiorate.so': /usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstaudiorate.so: undefined symbol: gst_buffer_add_audio_meta

(gst-plugin-scanner:71871): GStreamer-WARNING **: 17:40:33.652: Failed to load plugin '/usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstclosedcaption.so': /usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstclosedcaption.so: undefined symbol: gst_aggregator_simple_get_next_time

(gst-plugin-scanner:71871): GStreamer-WARNING **: 17:40:33.656: Failed to load plugin '/usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstmpegtsdemux.so': /usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstmpegtsdemux.so: undefined symbol: gst_query_set_bitrate

(gst-plugin-scanner:71871): GStreamer-WARNING **: 17:40:33.663: Failed to load plugin '/usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstaudioresample.so': /usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstaudioresample.so: undefined symbol: gst_audio_buffer_map

(gst-plugin-scanner:71871): GStreamer-WARNING **: 17:40:33.666: Failed to load plugin '/usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstlibav.so': /usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstlibav.so: undefined symbol: gst_video_caption_meta_api_get_type

(gst-plugin-scanner:71871): GStreamer-WARNING **: 17:40:33.667: Failed to load plugin '/usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstwildmidi.so': /lib/x86_64-linux-gnu/libgstbadaudio-1.0.so.0: undefined symbol: gst_buffer_add_audio_meta

(gst-plugin-scanner:71871): GStreamer-WARNING **: 17:40:33.667: Failed to load plugin '/usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstoverlaycomposition.so': /usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstoverlaycomposition.so: undefined symbol: gst_sample_set_buffer

(gst-plugin-scanner:71871): GStreamer-WARNING **: 17:40:33.670: Failed to load plugin '/usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstgtk.so': /usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstgtk.so: undefined symbol: gst_gl_display_wayland_new_with_display

(gst-plugin-scanner:71871): GStreamer-WARNING **: 17:40:33.672: Failed to load plugin '/usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstcoreelements.so': /usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstcoreelements.so: undefined symbol: gst_query_parse_bitrate

(gst-plugin-scanner:71871): GStreamer-WARNING **: 17:40:33.674: Failed to load plugin '/usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstaudiotestsrc.so': /usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstaudiotestsrc.so: undefined symbol: gst_buffer_add_audio_meta

(gst-plugin-scanner:71871): GStreamer-WARNING **: 17:40:33.679: Failed to load plugin '/usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstflv.so': /usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstflv.so: undefined symbol: gst_aggregator_simple_get_next_time

(gst-plugin-scanner:71871): GStreamer-WARNING **: 17:40:33.679: Failed to load plugin '/usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstopenmpt.so': /lib/x86_64-linux-gnu/libgstbadaudio-1.0.so.0: undefined symbol: gst_buffer_add_audio_meta

(gst-plugin-scanner:71871): GStreamer-WARNING **: 17:40:33.680: Failed to load plugin '/usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgsttimecode.so': /usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgsttimecode.so: undefined symbol: gst_video_time_code_new_from_date_time_full

After this I think that many .so files are not generated like libgsttimecode.so, libgstaudiotestsrc.so etc.

mrstecklo commented 3 years ago

Did you install GStreamer with package manager or built from source? Maybe you should reinstall GStreamer and then try to rebuild plugins. You can also try running gst-inspect-1.0 -b to see if it lists libgstpylon.so

mrstecklo commented 3 years ago

Your shell prompt looks a bit confusing.

(base) ➜ build git:(master) ✗

I mean those non-ASCII symbols. If that is not what you actually see in terminal you can enclose shell output in grave-accent signs (ctrl+e)

init-22 commented 3 years ago

@mrstecklo thanks a lot for your guidance, I had also installed gstreamer in one conda env, I thought of giving it a try after you asked me reinstall and it worked. Thanks. BTW, the shell prompt looks confusing here but it looks fine in my terminal though.