Skip to contentSkip to conversation

lttng-tools compilation error v2.5.0 rc1

DISCUSSION Martin Townsend 3 participants 3 messages Jul 2, 2014 – Jul 9, 2014 2 messages not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

Any update on this?

Best Regards,
Martin.

Quoted 50 lines · Martin Townsend

Hi,

I updated to version 2.5.0 rc1 today and found that I couldn't build lttng-tools for my Microblaze based system.

| error.c: In function 'log_add_time':
| error.c:52:17: error: 'error_log_time' undeclared (first use in this function)
|   ret = snprintf(error_log_time.str, sizeof(error_log_time.str),
|                  ^
| error.c:52:17: note: each undeclared identifier is reported only once for each function it appears in
| make[3]: *** [error.lo] Error 1
| make[3]: *** Waiting for unfinished jobs....

After grepping URCU_TLS in the source I could see it was used elsewhere with accessor macros so I used the following patch which fixes the compiler error.

I'm not familiar with the code so I was wondering if this is the correct fix?

Best Regards,
Martin

From 8a2789962fb22e92f8e9b46747c4d56cdaae04ca Mon Sep 17 00:00:00 2001
From: Martin Townsend <[email protected]>
Date: Fri, 27 Jun 2014 11:41:03 +0100
Subject: [PATCH] fixed compile error mising URCU_TLS

---
 src/common/error.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
src/common/error.c +2 -2
index 418fc47..92852f9 100644
@@ -49,14 +49,14 @@ const char *log_add_time(void)
     }
 
     /* Format time in the TLS variable. */
-    ret = snprintf(error_log_time.str, sizeof(error_log_time.str),
+    ret = snprintf(URCU_TLS(error_log_time).str, 
 sizeof(URCU_TLS(error_log_time).str),
             "%02d:%02d:%02d.%06ld",
             tm.tm_hour, tm.tm_min, tm.tm_sec, tp.tv_nsec);
     if (ret < 0) {
         goto error;
     }
 
-    return error_log_time.str;
+    return URCU_TLS(error_log_time).str;
 
 error:
     /* Return an empty string on error so logging is not affected. */

A message that is not in the archive (sent off-list or not yet received): [email protected]

#3 lore raw

Hi Martin,

David is on vacation this week. Don't worry, he will look into this before 2.5 final.

Thanks!

Mathieu

----- Original Message -----

Quoted 74 lines

From: "Martin Townsend" <[email protected]>
To: [email protected]
Sent: Wednesday, July 2, 2014 5:48:29 AM
Subject: Re: [lttng-dev] lttng-tools compilation error v2.5.0 rc1

Any update on this?

Best Regards,
Martin.

Quoted 55 lines · Martin Townsend

Hi,

I updated to version 2.5.0 rc1 today and found that I couldn't build lttng-tools for my Microblaze based system.

| error.c: In function 'log_add_time':
| error.c:52:17: error: 'error_log_time' undeclared (first use in this function)

|   ret = snprintf(error_log_time.str, sizeof(error_log_time.str),
|                  ^
| error.c:52:17: note: each undeclared identifier is reported only

once for each function it appears in
| make[3]: *** [error.lo] Error 1
| make[3]: *** Waiting for unfinished jobs....

After grepping URCU_TLS in the source I could see it was used elsewhere with accessor macros so I used the following patch which fixes the compiler error.

I'm not familiar with the code so I was wondering if this is the correct fix?

Best Regards,
Martin

From 8a2789962fb22e92f8e9b46747c4d56cdaae04ca Mon Sep 17 00:00:00 2001
From: Martin Townsend <[email protected]>
Date: Fri, 27 Jun 2014 11:41:03 +0100
Subject: [PATCH] fixed compile error mising URCU_TLS

---
 src/common/error.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
src/common/error.c +2 -2
index 418fc47..92852f9 100644
@@ -49,14 +49,14 @@ const char *log_add_time(void)
     }
 
     /* Format time in the TLS variable. */
-    ret = snprintf(error_log_time.str, sizeof(error_log_time.str),
+    ret = snprintf(URCU_TLS(error_log_time).str,
 sizeof(URCU_TLS(error_log_time).str),
             "%02d:%02d:%02d.%06ld",
             tm.tm_hour, tm.tm_min, tm.tm_sec, tp.tv_nsec);
     if (ret < 0) {
         goto error;
     }
 
-    return error_log_time.str;
+    return URCU_TLS(error_log_time).str;
 
 error:
Quoted 1 line
     /* Return an empty string on error so logging is not affected. */

_______________________________________________
lttng-dev mailing list
[email protected]
http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev

Signature · 3 lines
Mathieu Desnoyers
EfficiOS Inc.
http://www.efficios.com
#4 lore raw
In reply to a message not in the archive

Merged!

Sorry for the delay, AFK from work :).

Cheers!
David

Quoted 55 lines · Martin Townsend

Hi,

I updated to version 2.5.0 rc1 today and found that I couldn't build lttng-tools for my Microblaze based system.

| error.c: In function 'log_add_time':
| error.c:52:17: error: 'error_log_time' undeclared (first use in this function)

|   ret = snprintf(error_log_time.str, sizeof(error_log_time.str),
|                  ^
| error.c:52:17: note: each undeclared identifier is reported only once for

each function it appears in
| make[3]: *** [error.lo] Error 1
| make[3]: *** Waiting for unfinished jobs....

After grepping URCU_TLS in the source I could see it was used elsewhere with accessor macros so I used the following patch which fixes the compiler error.

I'm not familiar with the code so I was wondering if this is the correct fix?

Best Regards,
Martin

From 8a2789962fb22e92f8e9b46747c4d56cdaae04ca Mon Sep 17 00:00:00 2001
From: Martin Townsend <[email protected]>
Date: Fri, 27 Jun 2014 11:41:03 +0100
Subject: [PATCH] fixed compile error mising URCU_TLS

---
 src/common/error.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
src/common/error.c +2 -2
index 418fc47..92852f9 100644
@@ -49,14 +49,14 @@ const char *log_add_time(void)
     }
 
     /* Format time in the TLS variable. */
-    ret = snprintf(error_log_time.str, sizeof(error_log_time.str),
+    ret = snprintf(URCU_TLS(error_log_time).str,
 sizeof(URCU_TLS(error_log_time).str),
             "%02d:%02d:%02d.%06ld",
             tm.tm_hour, tm.tm_min, tm.tm_sec, tp.tv_nsec);
     if (ret < 0) {
         goto error;
     }
 
-    return error_log_time.str;
+    return URCU_TLS(error_log_time).str;
 
 error:
Quoted 9 lines
     /* Return an empty string on error so logging is not affected. */
Signature · 7 lines
1.9.1


_______________________________________________
lttng-dev mailing list
[email protected]
http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev

_______________________________________________
lttng-dev mailing list
[email protected]
http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev