Patchwork [1/1] lttng-ust: cannot find -llttng-ust-tracepoint

login
register
mail settings
Submitter Robert Yang
Date Feb. 26, 2013, 9:24 a.m.
Message ID <a5db423d88f92e3ff5ed58bf35c7561b80aec82e.1361857721.git.liezhi.yang@windriver.com>
Download mbox | patch
Permalink /patch/45099/
State Accepted
Commit b947dbc72b3cd03901112c1bab6ac0b81f1b374f
Headers show

Comments

Robert Yang - Feb. 26, 2013, 9:24 a.m.
liblttng_ust.la should depend on liblttng-ust-tracepoint.la, otherwise
there maybe a parallel build issue when building liblttng_ust.la:

ld: cannot find -llttng-ust-tracepoint

[YOCTO #3934]

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
---
 .../lttng-ust/depends-liblttng-ust-tracepoin.patch | 30 ++++++++++++++++++++++
 meta/recipes-kernel/lttng/lttng-ust_2.1.0.bb       |  4 ++-
 2 files changed, 33 insertions(+), 1 deletion(-)
 create mode 100644 meta/recipes-kernel/lttng/lttng-ust/depends-liblttng-ust-tracepoin.patch
Darren Hart - Feb. 26, 2013, 4:18 p.m.
Pulling in Tom as I don't have any experience with lttng.

On 02/26/2013 01:24 AM, Robert Yang wrote:
> liblttng_ust.la should depend on liblttng-ust-tracepoint.la, otherwise
> there maybe a parallel build issue when building liblttng_ust.la:
> 
> ld: cannot find -llttng-ust-tracepoint
> 
> [YOCTO #3934]
> 
> Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
> ---
>  .../lttng-ust/depends-liblttng-ust-tracepoin.patch | 30 ++++++++++++++++++++++
>  meta/recipes-kernel/lttng/lttng-ust_2.1.0.bb       |  4 ++-
>  2 files changed, 33 insertions(+), 1 deletion(-)
>  create mode 100644 meta/recipes-kernel/lttng/lttng-ust/depends-liblttng-ust-tracepoin.patch
> 
> diff --git a/meta/recipes-kernel/lttng/lttng-ust/depends-liblttng-ust-tracepoin.patch b/meta/recipes-kernel/lttng/lttng-ust/depends-liblttng-ust-tracepoin.patch
> new file mode 100644
> index 0000000..458a8d4
> --- /dev/null
> +++ b/meta/recipes-kernel/lttng/lttng-ust/depends-liblttng-ust-tracepoin.patch
> @@ -0,0 +1,30 @@
> +liblttng_ust.la should depend on liblttng-ust-tracepoint.la
> +
> +liblttng_ust.la should depend on liblttng-ust-tracepoint.la, otherwise
> +there maybe a parallel build issue:
> +
> +ld: cannot find -llttng-ust-tracepoint
> +
> +Upstream-Status: Pending
> +
> +Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
> +---
> + liblttng-ust/Makefile.am | 3 ++-
> + 1 file changed, 2 insertions(+), 1 deletion(-)
> +
> +diff --git a/liblttng-ust/Makefile.am b/liblttng-ust/Makefile.am
> +--- a/liblttng-ust/Makefile.am
> ++++ b/liblttng-ust/Makefile.am
> +@@ -67,7 +67,8 @@ liblttng_ust_la_LIBADD = \
> + 	-llttng-ust-tracepoint \
> + 	$(top_builddir)/snprintf/libustsnprintf.la \
> + 	$(top_builddir)/liblttng-ust-comm/liblttng-ust-comm.la \
> +-	liblttng-ust-runtime.la liblttng-ust-support.la
> ++	liblttng-ust-runtime.la liblttng-ust-support.la \
> ++	liblttng-ust-tracepoint.la
> + 
> + if LTTNG_UST_BUILD_WITH_LIBUUID
> + liblttng_ust_la_LIBADD += -luuid
> +-- 
> +1.7.11.2
> +
> diff --git a/meta/recipes-kernel/lttng/lttng-ust_2.1.0.bb b/meta/recipes-kernel/lttng/lttng-ust_2.1.0.bb
> index 20c8b3d..6c2ca04 100644
> --- a/meta/recipes-kernel/lttng/lttng-ust_2.1.0.bb
> +++ b/meta/recipes-kernel/lttng/lttng-ust_2.1.0.bb
> @@ -22,7 +22,9 @@ PV = "2.1.0"
>  PR = "r0"
>  PE = "2"
>  
> -SRC_URI = "git://git.lttng.org/lttng-ust.git;protocol=git"
> +SRC_URI = "git://git.lttng.org/lttng-ust.git;protocol=git \
> +	   file://depends-liblttng-ust-tracepoin.patch \
> +	   "
>  
>  S = "${WORKDIR}/git"
>  
>
Khem Raj - Feb. 26, 2013, 5:58 p.m.
On (26/02/13 08:18), Darren Hart wrote:
> Pulling in Tom as I don't have any experience with lttng.
> 
> On 02/26/2013 01:24 AM, Robert Yang wrote:
> > liblttng_ust.la should depend on liblttng-ust-tracepoint.la, otherwise
> > there maybe a parallel build issue when building liblttng_ust.la:
> > 
> > ld: cannot find -llttng-ust-tracepoint

Are you using gold linker when you get this issue ?
patch is OK if you are sure that some other .la is not pulling it in as
well otherwise you dont want overlinking.
Robert Yang - Feb. 27, 2013, 1:59 a.m.
Hi Khem,

Here is the full error log, we can see that liblttng-ust.la needs 
lttng-ust-tracepoint.la:

arm-poky-linux-gnueabi-libtool: link: arm-poky-linux-gnueabi-gcc  -march=armv5te 
  -marm -mthumb-interwork 
--sysroot=/buildarea2/lyang1/ppp/tmp/sysroots/qemuarm -shared  -fPIC -DPIC 
-Wl,--whole-archive ../snprintf/.libs/libustsnprintf.a 
../liblttng-ust-comm/.libs/liblttng-ust-comm.a ./.libs/liblttng-ust-runtime.a 
./.libs/liblttng-ust-support.a -Wl,--no-whole-archive  -llttng-ust-tracepoint 
-lrt /buildarea2/lyang1/ppp/tmp/sysroots/qemuarm/usr/lib/libuuid.so 
/buildarea2/lyang1/ppp/tmp/sysroots/qemuarm/usr/lib/liburcu-bp.so 
-L/buildarea2/lyang1/ppp/tmp/sysroots/qemuarm/usr/lib 
/buildarea2/lyang1/ppp/tmp/sysroots/qemuarm/usr/lib/liburcu-cds.so 
/buildarea2/lyang1/ppp/tmp/sysroots/qemuarm/usr/lib/liburcu-common.so -lpthread 
  -march=armv5te -marm -mthumb-interwork 
--sysroot=/buildarea2/lyang1/ppp/tmp/sysroots/qemuarm -O2 -Wl,-O1 
-Wl,--hash-style=gnu -Wl,--as-needed   -Wl,-soname -Wl,liblttng-ust.so.0 -o 
.libs/liblttng-ust.so.0.0.0
arm-poky-linux-gnueabi-libtool: link: ( cd ".libs" && rm -f 
"liblttng-ust-tracepoint.la" && ln -s "../liblttng-ust-tracepoint.la" 
"liblttng-ust-tracepoint.la" )
/buildarea2/lyang1/ppp/tmp/sysroots/x86_64-linux/usr/libexec/armv5te-poky-linux-gnueabi/gcc/arm-poky-linux-gnueabi/4.7.2/ld: 
cannot find -llttng-ust-tracepoint
collect2: error: ld returned 1 exit status
make[2]: *** [liblttng-ust.la] Error 1

// Robert

On 02/27/2013 01:58 AM, Khem Raj wrote:
> On (26/02/13 08:18), Darren Hart wrote:
>> Pulling in Tom as I don't have any experience with lttng.
>>
>> On 02/26/2013 01:24 AM, Robert Yang wrote:
>>> liblttng_ust.la should depend on liblttng-ust-tracepoint.la, otherwise
>>> there maybe a parallel build issue when building liblttng_ust.la:
>>>
>>> ld: cannot find -llttng-ust-tracepoint
>
> Are you using gold linker when you get this issue ?
> patch is OK if you are sure that some other .la is not pulling it in as
> well otherwise you dont want overlinking.
>

Patch

diff --git a/meta/recipes-kernel/lttng/lttng-ust/depends-liblttng-ust-tracepoin.patch b/meta/recipes-kernel/lttng/lttng-ust/depends-liblttng-ust-tracepoin.patch
new file mode 100644
index 0000000..458a8d4
--- /dev/null
+++ b/meta/recipes-kernel/lttng/lttng-ust/depends-liblttng-ust-tracepoin.patch
@@ -0,0 +1,30 @@ 
+liblttng_ust.la should depend on liblttng-ust-tracepoint.la
+
+liblttng_ust.la should depend on liblttng-ust-tracepoint.la, otherwise
+there maybe a parallel build issue:
+
+ld: cannot find -llttng-ust-tracepoint
+
+Upstream-Status: Pending
+
+Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
+---
+ liblttng-ust/Makefile.am | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/liblttng-ust/Makefile.am b/liblttng-ust/Makefile.am
+--- a/liblttng-ust/Makefile.am
++++ b/liblttng-ust/Makefile.am
+@@ -67,7 +67,8 @@ liblttng_ust_la_LIBADD = \
+ 	-llttng-ust-tracepoint \
+ 	$(top_builddir)/snprintf/libustsnprintf.la \
+ 	$(top_builddir)/liblttng-ust-comm/liblttng-ust-comm.la \
+-	liblttng-ust-runtime.la liblttng-ust-support.la
++	liblttng-ust-runtime.la liblttng-ust-support.la \
++	liblttng-ust-tracepoint.la
+ 
+ if LTTNG_UST_BUILD_WITH_LIBUUID
+ liblttng_ust_la_LIBADD += -luuid
+-- 
+1.7.11.2
+
diff --git a/meta/recipes-kernel/lttng/lttng-ust_2.1.0.bb b/meta/recipes-kernel/lttng/lttng-ust_2.1.0.bb
index 20c8b3d..6c2ca04 100644
--- a/meta/recipes-kernel/lttng/lttng-ust_2.1.0.bb
+++ b/meta/recipes-kernel/lttng/lttng-ust_2.1.0.bb
@@ -22,7 +22,9 @@  PV = "2.1.0"
 PR = "r0"
 PE = "2"
 
-SRC_URI = "git://git.lttng.org/lttng-ust.git;protocol=git"
+SRC_URI = "git://git.lttng.org/lttng-ust.git;protocol=git \
+	   file://depends-liblttng-ust-tracepoin.patch \
+	   "
 
 S = "${WORKDIR}/git"