[ltt-dev] [UST PATCH] Fix dynamic link with safe snprintf

David Goulet david.goulet at polymtl.ca
Thu May 5 14:00:33 EDT 2011


This email was in a "time vortex"...

Right now, the libustctl is using macro from usterr.h and those macros 
are using the extern ust_safe_snprintf symbol.

So, any outside program linking with libustctl (-lustctl) must have 
libust... This cause problem with lttng-tools which is NOT link with libust.

This patch is a quick fix for this problem.

Cheers
David

On 11-03-28 06:02 PM, Mathieu Desnoyers wrote:
> * David Goulet (david.goulet at polymtl.ca) wrote:
>> -----BEGIN PGP SIGNED MESSAGE-----
>> Hash: SHA1
>>
>> We need that in order for libustctl to be compiled with other stuff (like
>> liblttngctl :)) without linking libust with it. This way, libustctl is
>> "standalone" and no need for other library linking.
>>
>> Maybe I should add that to the commit message ;).
>
> Can you also specify which symbols from libustsnprintf you are using ?
>
> This would help us decide if it's better to remove dependency on these
> symbols or merge your patch.
>
> Thanks,
>
> Mathieu
>
>>
>> Thanks
>> David
>>
>> On 11-03-28 05:07 PM, Nils Carlson wrote:
>>>
>>> On Mar 28, 2011, at 8:59 PM, David Goulet wrote:
>>>
>>>> Signed-off-by: David Goulet<david.goulet at polymtl.ca>
>>>> ---
>>>> libustctl/Makefile.am |    3 ++-
>>>> 1 files changed, 2 insertions(+), 1 deletions(-)
>>>>
>>>> diff --git a/libustctl/Makefile.am b/libustctl/Makefile.am
>>>> index bc7526b..153a5bd 100644
>>>> --- a/libustctl/Makefile.am
>>>> +++ b/libustctl/Makefile.am
>>>> @@ -9,6 +9,7 @@ libustctl_la_SOURCES = \
>>>> libustctl_la_LDFLAGS = -no-undefined -version-info 0:0:0
>>>>
>>>> libustctl_la_LIBADD = \
>>>> -    $(top_builddir)/libustcomm/libustcomm.la
>>>> +    $(top_builddir)/libustcomm/libustcomm.la \
>>>> +    $(top_builddir)/snprintf/libustsnprintf.la
>>>
>>> Why do we need this link? What calls does libustctl make into libustsnprintf?
>>>
>>> /Nils
>>>
>>>>
>>>> libustctl_la_CFLAGS = -DUST_COMPONENT="libustctl" -fno-strict-aliasing
>>>> --
>>>> 1.7.4.2
>>>>
>>>>
>>>> _______________________________________________
>>>> ltt-dev mailing list
>>>> ltt-dev at lists.casi.polymtl.ca
>>>> http://lists.casi.polymtl.ca/cgi-bin/mailman/listinfo/ltt-dev
>>>
>>
>> - --
>> David Goulet
>> LTTng project, DORSAL Lab.
>>
>> 1024D/16BD8563
>> BE3C 672B 9331 9796 291A  14C6 4AF7 C14B 16BD 8563
>> -----BEGIN PGP SIGNATURE-----
>> Version: GnuPG v1.4.10 (GNU/Linux)
>>
>> iEYEARECAAYFAk2Q+U8ACgkQSvfBSxa9hWOoPgCbBPQHaMhlWZLEDZFxqH2uCdQL
>> ZD4An2HiCoFdaTw1jtTy+iw0/MfN13Ul
>> =2skp
>> -----END PGP SIGNATURE-----
>

-- 
David Goulet
LTTng project, DORSAL Lab.

PGP/GPG : 1024D/16BD8563
BE3C 672B 9331 9796 291A  14C6 4AF7 C14B 16BD 8563




More information about the lttng-dev mailing list