title: Can't find jemalloc while building MariaDB on Raspbian Wheezy
body: <p>I have installed the list of Required tools shown on the <a href="https://mariadb.com/kb/en/mariadb/Build_Environment_Setup_for_Linux/" rel="nofollow noreferrer">Build Environment Setup for Linux</a>, including JEMALLOC, on my Raspberry Pi which has Raspbian Wheezy installed, fully updated, and setup for development. I have successfully built some of the listed tools (Bison, CMake 3.7.2). I have gcc and g++ (Raspbian 4.8.2-21rpi3rpi1) 4.8.2.</p>
  
  <p>When I attempt to build mariadb 10.1.22 (master branch from the github repository) using <code>cmake . -DBUILD_CONFIG=mysql_release</code> I get an error:</p>
  
  <pre><code>CMake Error at cmake/jemalloc.cmake:38 (MESSAGE):
    jemalloc is not found
  Call Stack (most recent call first):
    CMakeLists.txt:343 (CHECK_JEMALLOC)
  </code></pre>
  
  <p>After building JEMALLOC, I installed it into <code>/usr/local</code> using <code>sudo make install</code>. I have export <code>JEMALLOC_PATH=/usr/local</code> in my <code>.bashrc</code>.</p>
  
  <p>I don't understand why CHECK_JEMALLOC is failing to find the correct files. A list of the file locations is:</p>
  
  <pre><code>/usr/local/bin/jemalloc.sh
  /usr/local/bin/jemalloc-config
  /usr/local/include/jemalloc
  /usr/local/include/jemalloc/jemalloc.h
  /usr/local/lib/pkgconfig/jemalloc.pc
  /usr/local/lib/libjemalloc.so
  /usr/local/lib/libjemalloc_pic.a
  /usr/local/lib/libjemalloc.so.2
  /usr/local/lib/libjemalloc.a
  /usr/local/share/doc/jemalloc
  /usr/local/share/doc/jemalloc/jemalloc.html
  /usr/local/share/man/man3/jemalloc.3
  </code></pre>
  
  <p>I can attach a link to the CMake configure log, error log, and terminal output if needed.</p>
  
  <p><strong>UPDATE</strong><br>
  I tried using just <code>cmake .</code> and the configuration part worked, but the make failed with the following error:</p>
  
  <pre><code>/home/user/Downloads/mariadb/server/storage/mroonga/vendor/groonga/lib/expr.c:6816:7: note: in expansion of macro ‘GRN_PTR_POP’
     GRN_PTR_POP(&amp;keywords, keyword);
     ^
  cc: internal compiler error: Killed (program cc1)
  Please submit a full bug report,
  with preprocessed source if appropriate.
  See &lt;file:///usr/share/doc/gcc-4.8/README.Bugs&gt; for instructions.
  storage/mroonga/vendor/groonga/lib/CMakeFiles/libgroonga.dir/build.make:257: recipe for target 'storage/mroonga/vendor/groonga/lib/CMakeFiles/libgroonga.dir/expr.c.o' failed
  make[2]: *** [storage/mroonga/vendor/groonga/lib/CMakeFiles/libgroonga.dir/expr.c.o] Error 4
  make[2]: Leaving directory '/home/user/Downloads/mariadb/server'
  CMakeFiles/Makefile2:4420: recipe for target 'storage/mroonga/vendor/groonga/lib/CMakeFiles/libgroonga.dir/all' failed
  make[1]: *** [storage/mroonga/vendor/groonga/lib/CMakeFiles/libgroonga.dir/all] Error 2
  make[1]: Leaving directory '/home/user/Downloads/mariadb/server'
  Makefile:152: recipe for target 'all' failed
  make: *** [all] Error 2
  </code></pre>