Hey there,

I've attached two patches (one for the 1.1 branch and one for trunk)
which should hopefully make building with Valgrind installed into a
non-standard location (such as /usr/local) stop failing.

In short, valgrind.pc's includedir is set to
"${prefix}/include/valgrind", so the includes in the mempool files were
actually including "valgrind/valgrind/memcheck.h" (it was working
because most of the time valgrind is installed into /usr on Linux, so
/usr/include/valgrind/memcheck.h was used).

One other problem is that when building the mempools statically the
valgrind cflags were not being passed to src/lib's AM_CPPFLAGS.

Index: src/lib/Makefile.am
===================================================================
--- src/lib/Makefile.am	(revision 69441)
+++ src/lib/Makefile.am	(working copy)
@@ -7,7 +7,8 @@
 -DPACKAGE_LIB_DIR=\"$(libdir)\" \
 -DPACKAGE_DATA_DIR=\"$(datadir)/$(PACKAGE)\" \
 @EINA_CPPFLAGS@ \
-@EFL_EINA_BUILD@
+@EFL_EINA_BUILD@ \
+@VALGRIND_CFLAGS@
 
 base_sources = \
 eina_accessor.c \
Index: src/modules/mp/chained_pool/eina_chained_mempool.c
===================================================================
--- src/modules/mp/chained_pool/eina_chained_mempool.c	(revision 69441)
+++ src/modules/mp/chained_pool/eina_chained_mempool.c	(working copy)
@@ -48,7 +48,7 @@
 #include "eina_private.h"
 
 #ifndef NVALGRIND
-# include <valgrind/memcheck.h>
+# include <memcheck.h>
 #endif
 
 #ifdef DEBUG
Index: src/modules/mp/one_big/eina_one_big.c
===================================================================
--- src/modules/mp/one_big/eina_one_big.c	(revision 69441)
+++ src/modules/mp/one_big/eina_one_big.c	(working copy)
@@ -42,7 +42,7 @@
 #include "eina_lock.h"
 
 #ifndef NVALGRIND
-# include <valgrind/memcheck.h>
+# include <memcheck.h>
 #endif
 
 #include "eina_private.h"
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 69441)
+++ ChangeLog	(working copy)
@@ -175,3 +175,7 @@
 2012-03-14  Cedric Bail
 
 	* Fix a dead lock in Eina_File.
+
+2012-03-16  Raphael Kubo da Costa
+
+	* Adjust Valgrind's CFLAGS to fix the build when it is in a non-default location.
Index: src/lib/Makefile.am
===================================================================
--- src/lib/Makefile.am	(revision 69438)
+++ src/lib/Makefile.am	(working copy)
@@ -6,7 +6,8 @@
 -DPACKAGE_BIN_DIR=\"$(bindir)\" \
 -DPACKAGE_LIB_DIR=\"$(libdir)\" \
 -DPACKAGE_DATA_DIR=\"$(datadir)/$(PACKAGE)\" \
-@EFL_EINA_BUILD@
+@EFL_EINA_BUILD@ \
+@VALGRIND_CFLAGS@
 
 base_sources = \
 eina_accessor.c \
Index: src/modules/mp/chained_pool/eina_chained_mempool.c
===================================================================
--- src/modules/mp/chained_pool/eina_chained_mempool.c	(revision 69438)
+++ src/modules/mp/chained_pool/eina_chained_mempool.c	(working copy)
@@ -52,7 +52,7 @@
 #include "eina_private.h"
 
 #ifndef NVALGRIND
-# include <valgrind/memcheck.h>
+# include <memcheck.h>
 #endif
 
 #if defined DEBUG || defined EINA_DEBUG_MALLOC
Index: src/modules/mp/one_big/eina_one_big.c
===================================================================
--- src/modules/mp/one_big/eina_one_big.c	(revision 69438)
+++ src/modules/mp/one_big/eina_one_big.c	(working copy)
@@ -42,7 +42,7 @@
 #include "eina_lock.h"
 
 #ifndef NVALGRIND
-# include <valgrind/memcheck.h>
+# include <memcheck.h>
 #endif
 
 #include "eina_private.h"
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 69438)
+++ ChangeLog	(working copy)
@@ -237,3 +237,7 @@
 2012-03-14  Cedric Bail
 
 	* Fix a dead lock in Eina_File.
+
+2012-03-16  Raphael Kubo da Costa
+
+	* Adjust Valgrind's CFLAGS to fix the build when it is in a non-default location.
------------------------------------------------------------------------------
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here 
http://p.sf.net/sfu/sfd2d-msazure
_______________________________________________
enlightenment-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to