Bug#830956: openmprtl FTBFS on mips*, Error: cannot convert 'kmp_int* {aka long long int*}' to 'kmp_int32* {aka int*}'

Radovan Birdic Radovan.Birdic at imgtec.com
Wed Jul 13 09:20:00 UTC 2016


Package: openmprtl
Version: 3.8.0-2
Severity: serious
Tags: sid + patch
Justification: FTBFS
User: debian-mips at lists.debian.org
Usertags: mips-patch

Hello,

Package openmprtl_3.8.0-2 FTBFS on mips, mipsel and mips64el with following error:

> /«PKGBUILDDIR»/runtime/src/kmp_gsupport.c: In function 'int __kmp_api_GOMP_loop_static_start(long int, long int, long int, long int, long int*, long int*)':
> /«PKGBUILDDIR»/runtime/src/kmp_gsupport.c:614:50: error: cannot convert 'kmp_int* {aka long long int*}' to 'kmp_int32* {aka int*}' for argument '4' to 'int __kmpc_dispatch_next_4(ident_t*, kmp_int32, kmp_int32*, kmp_int32*, kmp_int32*, kmp_int32*)'
>               (kmp_int *)p_ub, (kmp_int *)&stride);

Full build log:
https://buildd.debian.org/status/fetch.php?pkg=openmprtl&arch=mips&ver=3.8.0-2&stamp=1467502809

For mips64el in file kmp_gsupport.c, it is needed to remove MIPS_ARCH_MIPS64
Now, __kmpc_dispatch_next_8 is used instead __kmpc_dispatch_next_4, which is used for 64-bit
architectures.

For mips64el in file kmp_gsupport.c, it is needed to remove MIPS_ARCH_MIPS64 from


Build for mips64el is failing due to wrong dispatch macros definition in file kmp_gsupport.c,
__kmpc_dispatch_next_4 is used instead of __kmpc_dispatch_next_ which should be used for 64-bit  architectures.

> #if KMP_ARCH_X86 || KMP_ARCH_ARM || KMP_ARCH_MIPS || MIPS_ARCH_MIPS64
> # define KMP_DISPATCH_INIT              __kmp_aux_dispatch_init_4
> # define KMP_DISPATCH_FINI_CHUNK        __kmp_aux_dispatch_fini_chunk_4
> # define KMP_DISPATCH_NEXT              __kmpc_dispatch_next_4
> #else
> # define KMP_DISPATCH_INIT              __kmp_aux_dispatch_init_8
> # define KMP_DISPATCH_FINI_CHUNK        __kmp_aux_dispatch_fini_chunk_8
> # define KMP_DISPATCH_NEXT              __kmpc_dispatch_next_8
> #endif /* KMP_ARCH_X86 */


Build for mips/mipsel fails because MIPS is not listed as 32-bit architecture in kmp_platform.h

> /* Specify 32 bit architectures here */
> #define KMP_32_BIT_ARCH (KMP_ARCH_X86 || KMP_ARCH_ARM)


I have created and attached a patch that resolves both issues.

The patch is tested on mips, mipsel, mips64el, i386 and amd64.
With this patch package builds successfully.

Regards,
Radovan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alioth.debian.org/pipermail/pkg-llvm-team/attachments/20160713/ab4d285b/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fix-mips-support.patch
Type: text/x-patch
Size: 1028 bytes
Desc: fix-mips-support.patch
URL: <http://lists.alioth.debian.org/pipermail/pkg-llvm-team/attachments/20160713/ab4d285b/attachment-0001.bin>


More information about the Pkg-llvm-team mailing list