From mboxrd@z Thu Jan 1 00:00:00 1970 From: mathieu.desnoyers@efficios.com (Mathieu Desnoyers) Date: Mon, 26 Aug 2013 11:11:47 -0400 Subject: [lttng-dev] [LTTNG][LTTng-ust] "Out of system" building patches. In-Reply-To: <20130826162407.1996f085@skate> References: <1377160051-12449-1-git-send-email-jimmy.durand.wesolowski@gmail.com> <20130822125523.GB26852@Krystal> <20130824175909.GA12409@Krystal> <20130826162407.1996f085@skate> Message-ID: <20130826151147.GA16659@Krystal> * Thomas Petazzoni (thomas.petazzoni at free-electrons.com) wrote: > Dear Jimmy Durand Wesolowski, > > On Mon, 26 Aug 2013 09:43:49 +0200, Jimmy Durand Wesolowski wrote: > > > Here is a quick test, without any of my modifications. I had to pass both > > CFLAGS and LDFLAGS to "./configure", as said earlier, which can be > > considered > > a normal process: > > CFLAGS="-I/include" \ > > CPPFLAGS="-I/include" \ > > LDFLAGS="-L/lib" \ > > ./configure --prefix=${PWD}/build > > As said previously, if you're cross-compiling, doing > --prefix=${PWD}/build is completely wrong. --prefix is the directory > where the software will be located when executed on the target, not the > location where the software will be installed when doing 'make install'. > > Please document yourself on the difference between --prefix at > configure time and DESTDIR at install time. There appears to be a problem introduced recently by the new doc/examples in lttng-ust. If I make uninstall both userspace RCU and UST from my system, then: (urcu) ./configure --with-sysroot=/tmp/test make clean make DESTDIR=/tmp/test make install (lttng-ust) LDFLAGS=-L/tmp/test/usr/local/lib CPPFLAGS=-I/tmp/test/usr/local/include \ ./configure --with-sysroot=/tmp/test make clean make The last make fails with: for subdir in easy-ust demo gen-tp hello-static-lib; do \ cd $subdir && make AM_CPPFLAGS="-I../../../include/" AM_LDFLAGS='-L../../../liblttng-ust/.libs/ -Wl,-rpath="/home/compudj/git/lttng-ust/doc/examples/../../liblttng-ust/.libs/"' LTTNG_GEN_TP_PATH="../../../tools/" all; cd ..; \ done make[4]: Entering directory `/home/compudj/git/lttng-ust/doc/examples/easy-ust' gcc -I. -I../../../include/ \ -c -o sample.o sample.c In file included from ../../../include/lttng/tracepoint.h:29:0, from sample_component_provider.h:62, from sample.c:31: ../../../include/lttng/tracepoint-rcu.h:26:27: fatal error: urcu/compiler.h: No such file or directory compilation terminated. make[4]: *** [sample.o] Error 1 make[4]: Leaving directory `/home/compudj/git/lttng-ust/doc/examples/easy-ust' make[4]: Entering directory `/home/compudj/git/lttng-ust/doc/examples/demo' The following patch fixes part of the problem: diff --git a/doc/examples/Makefile.am b/doc/examples/Makefile.am index 8c4901b..d26e520 100644 --- a/doc/examples/Makefile.am +++ b/doc/examples/Makefile.am @@ -45,7 +45,7 @@ all-local: done; \ fi for subdir in $(SUBDIRS_PROXY); do \ - cd $$subdir && $(MAKE) AM_CPPFLAGS="-I../../../include/" AM_LDFLAGS='-L../../../liblttng-ust/.libs/ -Wl,-rpath="$(PWD)/../../liblttng-ust/.libs/"' LTTNG_GEN_TP_PATH="../../../tools/" $(AM_MAKEFLAGS) all; cd ..; \ + cd $$subdir && $(MAKE) AM_CPPFLAGS="$(CPPFLAGS) -I../../../include/" AM_LDFLAGS='$(LDFLAGS) -L../../../liblttng-ust/.libs/ -Wl,-rpath="$(PWD)/../../liblttng-ust/.libs/"' LTTNG_GEN_TP_PATH="../../../tools/" $(AM_MAKEFLAGS) all; cd ..; \ done clean-local: Now I just have to figure out how to teach lttng-gen-tp about CPPFLAGS :-/ Thanks, Mathieu -- Mathieu Desnoyers EfficiOS Inc. http://www.efficios.com