title: Python3 Relink issue while importing opencv
body: <h2>Question:</h2>
  <p>I have a segmentation fault after trying to import a freshly compiled version of the latest available <a href="https://opencv.org/" rel="nofollow noreferrer">OpenCV</a> from <a href="https://github.com/opencv" rel="nofollow noreferrer">github</a> on Ubuntu 18.04.</p>
  <p>Here is the error message I got while trying to import <code>cv2</code> in <a href="https://www.python.org/download/releases/3.0/" rel="nofollow noreferrer">Python 3</a>:</p>
  <pre><code>$ python3
  Python 3.6.8 (default, Aug 20 2019, 17:12:48) 
  [GCC 8.3.0] on linux
  Type &quot;help&quot;, &quot;copyright&quot;, &quot;credits&quot; or &quot;license&quot; for more information.
  &gt;&gt;&gt; import cv2
  python3: Relink `/lib/x86_64-linux-gnu/libsystemd.so.0' with `/lib/x86_64-linux-gnu/librt.so.1' for IFUNC symbol `clock_gettime'
  python3: Relink `/lib/x86_64-linux-gnu/libudev.so.1' with `/lib/x86_64-linux-gnu/librt.so.1' for IFUNC symbol `clock_gettime'
  Segmentation fault (core dumped)
  </code></pre>
  <p>My Ubuntu; <code>5.0.0-29-generic x86_64 GNU/Linux</code></p>
  <p>From where I cloned OpenCV; <a href="https://github.com/opencv/opencv" rel="nofollow noreferrer">https://github.com/opencv/opencv</a></p>
  <p>Related threads;<br />
  <a href="https://stackoverflow.com/questions/56347458/getting-error-while-importing-cv2-module-in-ubuntu-amazon-instance">getting error while importing cv2 module in ubuntu amazon instance</a><br />
  <a href="https://stackoverflow.com/questions/55166840/configure-aws-redshift-on-ubuntu-18-04-and-use-it-with-pyodbc">Configure AWS Redshift on Ubuntu 18.04 and use it with pyodbc</a><br />
  <a href="https://unix.stackexchange.com/questions/444697/cannot-run-python-file-asks-to-relink-libraries">https://unix.stackexchange.com/questions/444697/cannot-run-python-file-asks-to-relink-libraries</a><br />
  <a href="https://github.com/tensorflow/tensorflow/issues/19375" rel="nofollow noreferrer">https://github.com/tensorflow/tensorflow/issues/19375</a></p>
  <p>None of the solutions presented worked as <strong>I do not have any NVidia graphic chips</strong> on my laptop;</p>
  <pre><code>$ lspci | grep VGA
  00:02.0 VGA compatible controller: Intel Corporation HD Graphics 5500 (rev 09)
  </code></pre>
  <p><strong>Notice</strong>:<br />
  I need to compile OpenCV from sources because I want to use <a href="https://www.cs.ubc.ca/%7Elowe/papers/ijcv04.pdf" rel="nofollow noreferrer">SIFT</a> and <a href="http://people.ee.ethz.ch/%7Esurf/eccv06.pdf" rel="nofollow noreferrer">SURF</a> <a href="https://en.wikipedia.org/wiki/Feature_detection_(computer_vision)" rel="nofollow noreferrer">detectors</a> and <a href="https://en.wikipedia.org/wiki/Visual_descriptor" rel="nofollow noreferrer">descriptors</a> and they are no more available when OpenCV is installed with <a href="http://manpages.ubuntu.com/manpages/bionic/man8/apt.8.html" rel="nofollow noreferrer"><code>apt</code></a>:</p>
  <pre><code>&gt;&gt;&gt; import cv2
  &gt;&gt;&gt; cv2.__version__
  '4.2.0'
  
  &gt;&gt;&gt; cv2.xfeatures2d.SIFT_create()    
  
  Traceback (most recent call last):
    File &quot;&lt;stdin&gt;&quot;, line 1, in &lt;module&gt;
  cv2.error: OpenCV(4.2.0)     
  /io/opencv_contrib/modules/xfeatures2d/src/sift.cpp:1210:    
  error: (-213:The function/feature is not implemented)     
  This algorithm is patented and is excluded in this configuration;    
  Set OPENCV_ENABLE_NONFREE CMake option and rebuild the library in    
  function 'create'
  </code></pre>