Mirror of the lttng-dev mailing list
 help / color / mirror / Atom feed
From: mathieu.desnoyers@efficios.com (Mathieu Desnoyers)
Subject: [lttng-dev] [LTTNG][LTTng-ust] "Out of system" building	patches.
Date: Mon, 26 Aug 2013 11:11:47 -0400	[thread overview]
Message-ID: <20130826151147.GA16659@Krystal> (raw)
In-Reply-To: <20130826162407.1996f085@skate>

* 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<URCU_BUILD_PATH>/include" \
> >   CPPFLAGS="-I<URCU_BUILD_PATH>/include" \
> >   LDFLAGS="-L<URCU_BUILD_PATH>/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



  reply	other threads:[~2013-08-26 15:11 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1377160051-12449-1-git-send-email-jimmy.durand.wesolowski@gmail.com>
     [not found] ` <20130822125523.GB26852@Krystal>
     [not found]   ` <CAMaFG-3HCsKngNE1cNv9PfCFuhnHwsON=T-q084ZjD+1Aj2Zqg@mail.gmail.com>
     [not found]     ` <20130824175909.GA12409@Krystal>
2013-08-24 19:42       ` Jimmy Durand
2013-08-26  7:43         ` Jimmy Durand Wesolowski
2013-08-26 14:24           ` Thomas Petazzoni
2013-08-26 15:11             ` Mathieu Desnoyers [this message]
2013-08-26 15:14               ` Jimmy Durand Wesolowski
2013-08-26 15:19                 ` Mathieu Desnoyers
2013-08-26 15:27                   ` Mathieu Desnoyers
2013-08-26 15:53                     ` Jimmy Durand Wesolowski
2013-08-26 16:00                       ` Mathieu Desnoyers
2013-08-27 15:02                         ` Jimmy Durand Wesolowski
2013-08-26 15:13             ` Jimmy Durand Wesolowski
2013-08-26 14:22     ` Thomas Petazzoni

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130826151147.GA16659@Krystal \
    --to=mathieu.desnoyers@efficios.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox