title: gstreamer plugin library not linking against opencv shared object library - “undefined symbol” on CentOS
body: <p>I have a plugin that uses OpenCV and it works perfectly on Kubuntu. Now I am trying to run the code on CentOS but when I run the pipeline, I get: </p>
  
  <pre><code>$ gst-launch videotestsrc ! opencvelement ! ximagesink 
  WARNING: erroneous pipeline: no element "opencvelement" 
  </code></pre>
  
  <p>When I run ldd in Kubuntu, I get: </p>
  
  <pre><code>    $ ldd .libs/libOPENCVELEMENT.so 
      linux-gate.so.1 =&gt;  (0x0060f000) 
      libgstbase-0.10.so.0 =&gt; /usr/lib/libgstbase-0.10.so.0 (0x00a74000) 
      libgstreamer-0.10.so.0 =&gt; /usr/lib/libgstreamer-0.10.so.0 (0x00474000) 
      libgobject-2.0.so.0 =&gt; /usr/lib/i386-linux-gnu/libgobject-2.0.so.0 (0x006a2000) 
      libglib-2.0.so.0 =&gt; /lib/i386-linux-gnu/libglib-2.0.so.0 (0x00110000) 
      libopencv_core.so.2.3 =&gt; /usr/local/lib/libopencv_core.so.2.3 (0x00730000) 
      libstdc++.so.6 =&gt; /usr/lib/i386-linux-gnu/libstdc++.so.6 (0x00209000) 
      libm.so.6 =&gt; /lib/i386-linux-gnu/libm.so.6 (0x002f4000) 
      libc.so.6 =&gt; /lib/i386-linux-gnu/libc.so.6 (0x00acd000) 
      libgcc_s.so.1 =&gt; /lib/i386-linux-gnu/libgcc_s.so.1 (0x0031e000) 
      libpthread.so.0 =&gt; /lib/i386-linux-gnu/libpthread.so.0 (0x0033c000) 
      libgthread-2.0.so.0 =&gt; /usr/lib/i386-linux-gnu/libgthread-2.0.so.0 (0x00357000) 
      libgmodule-2.0.so.0 =&gt; /usr/lib/i386-linux-gnu/libgmodule-2.0.so.0 (0x0035d000) 
      libxml2.so.2 =&gt; /usr/lib/libxml2.so.2 (0x00c9c000) 
      librt.so.1 =&gt; /lib/i386-linux-gnu/librt.so.1 (0x00362000) 
      libdl.so.2 =&gt; /lib/i386-linux-gnu/libdl.so.2 (0x0036b000) 
      libffi.so.6 =&gt; /usr/lib/i386-linux-gnu/libffi.so.6 (0x00370000) 
      libpcre.so.3 =&gt; /lib/i386-linux-gnu/libpcre.so.3 (0x00e52000) 
      libz.so.1 =&gt; /lib/i386-linux-gnu/libz.so.1 (0x00377000) 
      /lib/ld-linux.so.2 (0x00a10000) 
  </code></pre>
  
  <p>But when I run it on CentOS, I don't see opencv </p>
  
  <pre><code>    $ ldd .libs/libOPENCVELEMENT.so 
      linux-vdso.so.1 =&gt;  (0x00007fff7a1fd000) 
      libgstvideo-0.10.so.0 =&gt; /usr/lib64/libgstvideo-0.10.so.0 (0x00002ba0ac9b7000) 
      libgstcontroller-0.10.so.0 =&gt; /usr/lib64/libgstcontroller-0.10.so.0 (0x00002ba0acbc4000) 
      libgstbase-0.10.so.0 =&gt; /usr/lib64/libgstbase-0.10.so.0 (0x00002ba0acdeb000) 
      libgstreamer-0.10.so.0 =&gt; /usr/lib64/libgstreamer-0.10.so.0 (0x00002ba0ad03c000) 
      libgobject-2.0.so.0 =&gt; /lib64/libgobject-2.0.so.0 (0x00002ba0ad326000) 
      libgmodule-2.0.so.0 =&gt; /lib64/libgmodule-2.0.so.0 (0x00002ba0ad569000) 
      libgthread-2.0.so.0 =&gt; /lib64/libgthread-2.0.so.0 (0x00002ba0ad76c000) 
      librt.so.1 =&gt; /lib64/librt.so.1 (0x00002ba0ad970000) 
      libxml2.so.2 =&gt; /usr/lib64/libxml2.so.2 (0x00002ba0adb7a000) 
      libz.so.1 =&gt; /lib64/libz.so.1 (0x00002ba0adeb7000) 
      libglib-2.0.so.0 =&gt; /lib64/libglib-2.0.so.0 (0x00002ba0ae0cb000) 
      libstdc++.so.6 =&gt; /usr/lib64/libstdc++.so.6 (0x00002ba0ae3a8000) 
      libm.so.6 =&gt; /lib64/libm.so.6 (0x00002ba0ae6a8000) 
      libc.so.6 =&gt; /lib64/libc.so.6 (0x00002ba0ae92b000) 
      libgcc_s.so.1 =&gt; /lib64/libgcc_s.so.1 (0x00002ba0aec83000) 
      libpthread.so.0 =&gt; /lib64/libpthread.so.0 (0x00002ba0aee91000) 
      libdl.so.2 =&gt; /lib64/libdl.so.2 (0x00002ba0af0ac000) 
      /lib64/ld-linux-x86-64.so.2 (0x0000003f6c800000) 
  </code></pre>
  
  <p>Here is my makefile.am, which is the same on both OS </p>
  
  <pre><code>plugin_LTLIBRARIES = libOPENCVELEMENT.la 
  
  # Plugin source files: 
  libOPENCVELEMENT_la_SOURCES = opencv_chain.c opencv_chain.h datasetup.h 
  libOPENCVELEMENT_la_CFLAGS = \ 
      $(GST_PLUGINS_BASE_CFLAGS) \ 
      $(GST_CFLAGS) \ 
      $(OPENCV_CFLAGS) 
  
  libOPENCVELEMENT_la_CXXFLAGS = \ 
      $(GST_PLUGINS_BASE_CFLAGS) \ 
      $(GST_CFLAGS) \ 
      $(OPENCV_CFLAGS) 
  
  libOPENCVELEMENT_la_LIBADD = \ 
      $(GST_PLUGINS_BASE_LIBS) \ 
      $(GST_LIBS) \ 
      $(OPENCV_LIBS) \ 
      -lopencv_core \ 
      -lopencv_highgui 
  
  libOPENCVELEMENT_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS) 
  libOPENCVELEMENT_la_LIBTOOLFLAGS = --tag=disable-static 
  </code></pre>
  
  <p>Let me know if you need more information. Any help will be appreciated. Thank you. </p>