Package: libopenmpi-dev
Version: 1.6.5-9.2
Severity: normal
Tags: patch

When using Open MPI 1.6 with `-std=c++11`, one gets flooded with warnings of
the kind
```
/usr/lib/openmpi/include/mpi_portable_platform.h:374:63: warning: invalid
suffix on literal; C++11 requires a space between literal and string macro
[-Wliteral-suffix]
_STRINGIFY(__GNUC__)"."_STRINGIFY(__GNUC_MINOR__)"."_STRINGIFY(__GNUC_PATCHLEVEL__)
```
The bug is already fixed upstream [1]. Since the transition to at least Open
MPI 1.8 will take a while in Debian, I suggest to include the attached patch.
It's virtually identical with the upstream patch [2].

[1] https://www.open-mpi.org/community/lists/users/2013/11/22914.php
[2] https://www.open-mpi.org/community/lists/users/att-22914/cxx11.patch



-- System Information:
Debian Release: jessie/sid
  APT prefers vivid-updates
  APT policy: (500, 'vivid-updates'), (500, 'vivid-security'), (500, 'vivid'), 
(100, 'vivid-backports')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 3.19.0-21-generic (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages libopenmpi-dev depends on:
ii  libc6           2.21-0ubuntu4
ii  libhwloc-dev    1.10.0-3
ii  libibverbs-dev  1.1.8-1ubuntu1
ii  libopenmpi1.6   1.6.5-9.2
ii  openmpi-common  1.6.5-9.2

libopenmpi-dev recommends no packages.

libopenmpi-dev suggests no packages.

-- no debconf information
diff -Naur openmpi-1.6.5/ompi/include/mpi_portable_platform.h.in openmpi-1.6.5-fix/ompi/include/mpi_portable_platform.h.in
--- openmpi-1.6.5/ompi/include/mpi_portable_platform.h.in	2012-04-03 16:29:54.000000000 +0200
+++ openmpi-1.6.5-fix/ompi/include/mpi_portable_platform.h.in	2015-08-26 16:37:40.137646947 +0200
@@ -98,7 +98,7 @@
 #    define PLATFORM_COMPILER_VERSION \
          PLATFORM_COMPILER_VERSION_INT(__INTEL_COMPILER/10, __INTEL_COMPILER/100, _PLATFORM_INTEL_COMPILER_BUILD_DATE)
 #    define PLATFORM_COMPILER_VERSION_STR \
-         _STRINGIFY(__INTEL_COMPILER)"."_STRINGIFY(_PLATFORM_INTEL_COMPILER_BUILD_DATE)
+         _STRINGIFY(__INTEL_COMPILER) "." _STRINGIFY(_PLATFORM_INTEL_COMPILER_BUILD_DATE)
 
 #elif defined(__PATHSCALE__)
 #    define PLATFORM_COMPILER_PATHSCALE  1
@@ -131,7 +131,7 @@
 #      define PLATFORM_COMPILER_VERSION \
             PLATFORM_COMPILER_VERSION_INT(__PGIC__,__PGIC_MINOR__,__PGIC_PATCHLEVEL__)
 #      define PLATFORM_COMPILER_VERSION_STR \
-            _STRINGIFY(__PGIC__)"."_STRINGIFY(__PGIC_MINOR__)"-"_STRINGIFY(__PGIC_PATCHLEVEL__)
+            _STRINGIFY(__PGIC__) "." _STRINGIFY(__PGIC_MINOR__) "-" _STRINGIFY(__PGIC_PATCHLEVEL__)
 #    else
        /* PGI before 6.1-4 lacks any version ID preprocessor macros - so use this filthy hack */
        /* XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
@@ -370,13 +370,13 @@
      /* gather any advertised GNU version number info, even for non-gcc compilers */
 #    if defined(__GNUC_MINOR__) && defined(__GNUC_PATCHLEVEL__)
 #        define __PLATFORM_COMPILER_GNU_VERSION_STR \
-             _STRINGIFY(__GNUC__)"."_STRINGIFY(__GNUC_MINOR__)"."_STRINGIFY(__GNUC_PATCHLEVEL__)
+             _STRINGIFY(__GNUC__) "." _STRINGIFY(__GNUC_MINOR__) "." _STRINGIFY(__GNUC_PATCHLEVEL__)
 #    elif defined(__GNUC_MINOR__)
 #        define __PLATFORM_COMPILER_GNU_VERSION_STR \
-             _STRINGIFY(__GNUC__)"."_STRINGIFY(__GNUC_MINOR__)".?"
+             _STRINGIFY(__GNUC__) "." _STRINGIFY(__GNUC_MINOR__) ".?"
 #    else
 #        define __PLATFORM_COMPILER_GNU_VERSION_STR \
-             _STRINGIFY(__GNUC__)".?.?"
+             _STRINGIFY(__GNUC__) ".?.?"
 #    endif
 #elif defined(PLATFORM_COMPILER_UNKNOWN) /* unknown compiler */
 #    define PLATFORM_COMPILER_FAMILYNAME UNKNOWN

Reply via email to