Thanks a lot Radovan,
I've let the upstream know about your patch.
F.
On Thu, 17 Nov 2016 15:55:43 +, Radovan Birdic
wrote:
> Package: sphde
> Version: 1.3.0-1
> Severity: important
> Tags: sid + patch
> Justification: FTBFS
> User: debian-m...@lists.debian.org
> Usertags: mips-patch
>
>
> Package sphde_1.3.0-1 FTBFS on mips64el with following error:
>
> > In file included from tests/sasindex_t.c:22:0:
> > tests/sasindex_t.c: In function 'sassim_index_test2':
> > ./sasindexkey.h:222:17: error: 'key_val.key_element.data_0' may be used
> > uninitialized in this function [-Werror=maybe-uninitialized]
> >dest->data[0] = key_val.key_element.data_0;
>
> Full build log:
> https://buildd.debian.org/status/fetch.php?pkg=sphde&arch=mips64el&ver=1.3.0-1&stamp=1473264403
>
> Build fails because there is no support for mips64 architecture.
> We need to change sasconf.h and sassim.cpp files, to define addresses and to
> adjust struct logNodeType for mips64 arch.
>
> I have created and attached a patch that includes these changes and resolves
> this issue.
> With this patch package builds successfully.
>
> Regards,
> Radovan> --- sphde-1.3.0.orig/src/sasconf.h
> +++ sphde-1.3.0/src/sasconf.h
> @@ -78,6 +78,14 @@
> # define __SAS_SHMAP_MAX 0x040L /* 4MB */
> #endif
>
> +#ifdef __mips64
> +# define __WORDSIZE_64
> +# define __SAS_BASE_ADDRESS 0x40L /* 256GB */
> +# define RegionSize 0x20L /* 128GB */
> +# define SegmentSize 0x001000L /* 256MB */
> +# define __SAS_SHMAP_MAX 0x000100L /* 16MB */
> +#endif
> +
> /*
> * If the platform is not recognized above, select some resonable default.
> */
> --- sphde-1.3.0.orig/src/sassim.cpp
> +++ sphde-1.3.0/src/sassim.cpp
> @@ -119,7 +119,8 @@ typedef struct
> {
> #ifdef __WORDSIZE_64
> #if defined (__x86_64__) || \
> -(defined (__LITTLE_ENDIAN__) && defined (__powerpc64__))
> +(defined (__LITTLE_ENDIAN__) && defined (__powerpc64__)) \
> +|| ((__BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__) && defined(__mips64))
>unsigned long offset:56;
>unsigned int size:8;
> #else