Bug#852960: rt-app FTBFS on mips64el/ppc64el: error: conflicting types for 'timespec_to_nsec'

2017-02-22 Thread Gianfranco Costamagna
Hi,
On Tue, 7 Feb 2017 14:23:33 + Radovan Birdic  
wrote:
> Hi,
> 
> Build for mips64 and powerpc64 fails because __SANE_USERSPACE_TYPES__ is not 
> defined.
> Without this flag in "asm/types.h" file always will be included "int-l64.h" 
> which means that __u64 always will be defined as unsigned long.
> 
> I have created and attached a patch witch defines __SANE_USERSPACE_TYPES__ 
> flag for mips64 and powerpc64.
> With this patch package builds successfully on mips, mipsel and  mips64el.
> 
> Another way to solve the problem could be adding -D__SANE_USERSPACE_TYPES__ 
> to CFLAGS.
> 

Another way might even be to patch the .h and .c to use the same prototype, in 
the same way as before

diff -Nru rt-app-0.3/debian/changelog rt-app-0.3/debian/changelog
--- rt-app-0.3/debian/changelog 2017-01-26 05:23:22.0 +
+++ rt-app-0.3/debian/changelog 2017-02-22 10:28:22.0 +
@@ -1,3 +1,9 @@
+rt-app (0.3-1ubuntu1) zesty; urgency=medium
+
+  * Fix build on ppc64el
+
+ -- Gianfranco Costamagna   Wed, 22 Feb 2017 
11:28:13 +0100
+
 rt-app (0.3-1) unstable; urgency=medium
 
   * New upstream release, merging ARM and Linaro variants
diff -Nru rt-app-0.3/debian/patches/longlong-u64.diff 
rt-app-0.3/debian/patches/longlong-u64.diff
--- rt-app-0.3/debian/patches/longlong-u64.diff 1970-01-01 00:00:00.0 
+
+++ rt-app-0.3/debian/patches/longlong-u64.diff 2017-02-22 10:28:09.0 
+
@@ -0,0 +1,11 @@
+--- rt-app-0.3.orig/src/rt-app_utils.h
 rt-app-0.3/src/rt-app_utils.h
+@@ -123,7 +123,7 @@ log_timing(FILE *handler, timing_point_t
+ pid_t
+ gettid(void);
+ 
+-unsigned long long
++__u64
+ timespec_to_nsec(struct timespec *ts);
+ #endif
+ 
diff -Nru rt-app-0.3/debian/patches/series rt-app-0.3/debian/patches/series
--- rt-app-0.3/debian/patches/series1970-01-01 00:00:00.0 +
+++ rt-app-0.3/debian/patches/series2017-02-22 10:28:09.0 +
@@ -0,0 +1 @@
+longlong-u64.diff


(this was already there in the previous release, I reintroduced it in Ubuntu)

G.



signature.asc
Description: OpenPGP digital signature


Bug#852960: rt-app FTBFS on mips64el/ppc64el: error: conflicting types for 'timespec_to_nsec'

2017-02-07 Thread Radovan Birdic
Hi,

Build for mips64 and powerpc64 fails because __SANE_USERSPACE_TYPES__ is not 
defined.
Without this flag in "asm/types.h" file always will be included "int-l64.h" 
which means that __u64 always will be defined as unsigned long.

I have created and attached a patch witch defines __SANE_USERSPACE_TYPES__ flag 
for mips64 and powerpc64.
With this patch package builds successfully on mips, mipsel and  mips64el.

Another way to solve the problem could be adding -D__SANE_USERSPACE_TYPES__ to 
CFLAGS.

Regards,
Radovan--- rt-app-0.3.orig/src/rt-app_utils.h
+++ rt-app-0.3/src/rt-app_utils.h
@@ -22,6 +22,10 @@ Foundation, Inc., 51 Franklin Street, Fi
 #ifndef _TIMESPEC_UTILS_H_
 #define _TIMESPEC_UTILS_H_
 
+#if defined (__mips64) || defined (__powerpc64__)
+#define __SANE_USERSPACE_TYPES__
+#endif
+
 #include 
 #include 
 #include 


Bug#852960: rt-app FTBFS on mips64el/ppc64el: error: conflicting types for 'timespec_to_nsec'

2017-01-28 Thread Adrian Bunk
Source: rt-app
Version: 0.3-1
Severity: serious

https://buildd.debian.org/status/package.php?p=rt-app

...
gcc -DHAVE_CONFIG_H -I.  -I./../libdl/ -Wdate-time -D_FORTIFY_SOURCE=2  -g -O2 
-fdebug-prefix-map=/«PKGBUILDDIR»=. -fstack-protector-strong -Wformat 
-Werror=format-security -c -o rt-app_parse_config.o rt-app_parse_config.c
rt-app_utils.c:46:1: error: conflicting types for 'timespec_to_nsec'
 timespec_to_nsec(struct timespec *ts)
 ^~~~
In file included from rt-app_utils.c:24:0:
rt-app_utils.h:127:1: note: previous declaration of 'timespec_to_nsec' was here
 timespec_to_nsec(struct timespec *ts);
 ^~~~
 ...