bsc-pm / nanox

Nanos++ is a runtime designed to serve as runtime support in parallel environments. It is mainly used to support OmpSs, a extension to OpenMP developed at BSC.

Home Page:https://pm.bsc.es/nanox

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

jemalloc check not needed

Alessandro-Barbieri opened this issue · comments

memkind bundles jemalloc (it's statically linked inside) so I don't get why a check for it is needed
I've removed any reference to jemalloc from the m4 macro

--- a/m4/ax_check_memkind.m4
+++ b/m4/ax_check_memkind.m4
@@ -25,17 +25,10 @@
 # DESCRIPTION
 #
 #   Check whether Memkind path to the headers and libraries are correctly specified.
-#   Also checks Jemalloc library availability (required by libmemkind).
 #
 
 AC_DEFUN([AX_CHECK_MEMKIND],[
 
-AC_ARG_WITH(jemalloc,
-[AS_HELP_STRING([--with-jemalloc,--with-jemalloc=PATH],
-                [search in system directories or specify prefix directory for installed jemalloc package.])],
-[],
-[with_jemalloc=no])
-
 AC_ARG_WITH(memkind,
 [AS_HELP_STRING([--with-memkind,--with-memkind=PATH],
                 [search in system directories or specify prefix directory for installed memkind package.])],
@@ -45,7 +38,7 @@
 AS_IF([test "$with_memkind" != no],[
 
   memkindinc=-I$with_memkind/include
-  memkindlib="-L$with_jemalloc/lib -Wl,-rpath,$with_jemalloc/lib -L$with_memkind/lib -Wl,-rpath,$with_memkind/lib"
+  memkindlib="-L$with_memkind/lib -Wl,-rpath,$with_memkind/lib"
   
   AC_LANG_PUSH([C++])
 
@@ -54,16 +47,6 @@
   AX_VAR_PUSHVALUE([LDFLAGS],[$LDFLAGS $memkindlib])
   AX_VAR_PUSHVALUE([LIBS],[])
 
-  AC_SEARCH_LIBS([je_malloc], [jemalloc], [
-    jemalloc=yes
-  ],[
-    AC_SEARCH_LIBS([jemk_malloc], [jemalloc],
-      [jemalloc=yes],
-      [jemalloc=no])
-  ])
-
-  AS_IF([test "$jemalloc" = yes],[
-
     AC_CHECK_HEADERS([memkind.h],
       [memkind=yes],
       [memkind=no])
@@ -74,14 +57,6 @@
         [memkind=no])
     ])dnl
 
-  ],[
-    AC_MSG_ERROR([
-------------------------------
-Could not find libjemalloc (required by memkind)
-Please, check that the provided directories are correct.
-------------------------------])
-  ])dnl
-
   AS_IF([test "$memkind" = yes],[
     AC_DEFINE([MEMKIND_SUPPORT],[],[Enables memkind support])
   ],[

Back in 2015 I can see that the earlier versions of memkind did not include jemalloc. In any case, it doesn't seem necessary anymore.
Please, feel free to open a Pull Request if you want to keep the authorship of the changes,