title: Compiling library with make returns error - recompile with -fPIC (no ./configure file)
body: <p>I'm trying to compile KArchive from KDE (<a href="https://api.kde.org/frameworks/karchive/html/index.html" rel="nofollow noreferrer">here</a>). Obviously I'm following their instructions in the install file. First thing goes well, I just have to make a directory called <strong>build</strong> and in there I use this:</p>
  
  <pre><code>cmake .. \
    -DCMAKE_BUILD_TYPE=debug \
    -DCMAKE_INSTALL_PREFIX=/usr/local
  </code></pre>
  
  <p>Which goes well. The problem appears when I have to use <strong>make</strong>. After running that I get the following error:</p>
  
  <pre><code>/usr/bin/ld: /usr/local/lib/libbz2.a(bzlib.o): relocation R_X86_64_32S against symbol BZ2_crc32Table can not be used when making a shared object; recompile with -fPIC
  /usr/bin/ld: /usr/local/lib/libbz2.a(compress.o): relocation R_X86_64_32 against .rodata.str1.1 can not be used when making a shared object; recompile with -fPIC
  /usr/bin/ld: /usr/local/lib/libbz2.a(decompress.o): relocation R_X86_64_32S against .rodata can not be used when making a shared object; recompile with -fPIC
  /usr/bin/ld: /usr/local/lib/libbz2.a(blocksort.o): relocation R_X86_64_32 against .rodata.str1.1 can not be used when making a shared object; recompile with -fPIC
  </code></pre>
  
  <p>Now, this problem is not uncommon, but most solutions haven't worked for me. </p>