[lttng-dev] Compilation error in LTTng-UST 2.0.8

Mathieu Desnoyers mathieu.desnoyers at efficios.com
Sat Aug 17 18:46:54 EDT 2013


* Zvi Vered (veredz72 at gmail.com) wrote:
> Hello,
> 
> I downloaded the file lttng-ust-2.0.8.tar.bz2, extracted it and the ran:
> ./configure
> make
> 
> After a while I got the following compilcation error:
> 
>   CC     ltt-probes.lo
>   CC     lttng-probe-ust.lo
> In file included from ../include/lttng/ust-tracepoint-event.h:506,
>                  from ../include/lttng/tracepoint-event.h:41,
>                  from probes/lttng-probe-ust.h:47,
>                  from probes/lttng-probe-ust.c:25:
> ././probes/lttng-probe-ust.h:27: error: weak declaration of
> '__ref_loglevel___lttng_ust___metadata' must be public
> ././probes/lttng-probe-ust.h:27: error:
> '__ref_loglevel___lttng_ust___metadata' defined both normally and as an
> alias
> make[2]: *** [lttng-probe-ust.lo] Error 1
> make[2]: Leaving directory `/home/zvivered/GNU/lttng-ust-2.0.8/liblttng-ust'
> make[1]: *** [all-recursive] Error 1
> make[1]: Leaving directory `/home/zvivered/GNU/lttng-ust-2.0.8'
> make: *** [all] Error 2
> 
> 
> I'm working with Centos 5.9, gcc 4.1.2 20080704 (Red Hat 4.1.2-54)
> 
> Can you help ?

It seems related to:

http://bugs.lttng.org/issues/236

Even the Linux kernel will refuse to be compiled with gcc 4.1.0/4.1.1:

include/linux/compiler-gcc4.h:

/* GCC 4.1.[01] miscompiles __weak */
#ifdef __KERNEL__
# if GCC_VERSION >= 40100 &&  GCC_VERSION <= 40101
#  error Your version of gcc miscompiles the __weak directive
# endif
#endif

I suspect that the gcc 4.1.2 used by redhat might have a similar
behavior.

Can you try compiling a LTTng-UST probe with an upstream gcc 4.1.2
package from http://gcc.gnu.org and let us know the result ?
(http://gcc.gnu.org/gcc-4.1/)

Can you try compiling a recent kernel tree with the gcc 4.1.2 from
Centos and let us know the result ?

Thanks,

Mathieu

> 
> Thanks,
> Zvika

> _______________________________________________
> lttng-dev mailing list
> lttng-dev at lists.lttng.org
> http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev


-- 
Mathieu Desnoyers
EfficiOS Inc.
http://www.efficios.com



More information about the lttng-dev mailing list