Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 683778 - dev-util/valgrind-3.15.0[mpi] fails to build with sys-cluster/openmpi-4.*: libmpiwrap.c:281:19: error: expected expression before ‘_Static_assert’
Summary: dev-util/valgrind-3.15.0[mpi] fails to build with sys-cluster/openmpi-4.*: li...
Status: RESOLVED UPSTREAM
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Anthony Basile
URL: https://bugs.kde.org/show_bug.cgi?id=...
Whiteboard:
Keywords:
: 685064 (view as bug list)
Depends on:
Blocks:
 
Reported: 2019-04-18 16:24 UTC by Juergen Rose
Modified: 2021-10-25 12:12 UTC (History)
5 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log (build.log,556.44 KB, text/plain)
2019-04-18 16:24 UTC, Juergen Rose
Details
emerge --info '=dev-util/valgrind-3.15.0::gentoo' (file_683778.txt,25.49 KB, text/plain)
2019-04-18 16:29 UTC, Juergen Rose
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Juergen Rose 2019-04-18 16:24:38 UTC
Created attachment 573366 [details]
build.log

'MAKEOPTS=-j1 emerge -v1 valgrind' fails with:
...
make[2]: Entering directory '/var/tmp/portage/dev-util/valgrind-3.15.0/work/valgrind-3.15.0/mpi'
/usr/bin/mpicc    -I../include  -g -O -fno-omit-frame-pointer -Wall -fpic -m64 -Wno-deprecated-declarations -march=broadwell -O2 -pipe -c -o libmpiwrap_amd64_linux_so-libmpiwrap.o `test -f 'libmpiwrap.c' || echo './'`libmpiwrap.c
In file included from /usr/include/mpi.h:10,
                 from libmpiwrap.c:116:
libmpiwrap.c: In function ‘showTy’:
libmpiwrap.c:281:19: error: expected expression before ‘_Static_assert’
    else if (ty == MPI_UB)             fprintf(f,"UB");
                   ^~~~~~
libmpiwrap.c:282:19: error: expected expression before ‘_Static_assert’
    else if (ty == MPI_LB)             fprintf(f,"LB");
                   ^~~~~~
libmpiwrap.c: In function ‘extentOfTy’:
libmpiwrap.c:462:8: warning: implicit declaration of function ‘PMPI_Type_extent’; did you mean ‘MPI_Type_extent’? [-Wimplicit-function-declaration]
    r = PMPI_Type_extent(ty, &n);
        ^~~~~~~~~~~~~~~~
        MPI_Type_extent
In file included from /usr/include/mpi.h:10,
                 from libmpiwrap.c:116:
libmpiwrap.c: In function ‘walk_type’:
libmpiwrap.c:736:17: error: expected expression before ‘_Static_assert’
       if (ty == MPI_LB || ty == MPI_UB)
                 ^~~~~~
make[2]: *** [Makefile:657: libmpiwrap_amd64_linux_so-libmpiwrap.o] Error 1





root@lynx:/root(39)# emerge -pqv '=dev-util/valgrind-3.15.0::gentoo'
[ebuild     U ] dev-util/valgrind-3.15.0 [3.14.0] USE="mpi"
Comment 1 Juergen Rose 2019-04-18 16:29:43 UTC
Created attachment 573368 [details]
emerge --info '=dev-util/valgrind-3.15.0::gentoo'
Comment 2 Juergen Rose 2019-04-18 16:35:19 UTC
'USE=-mpi emerge -v1 valgrind' works.
Comment 3 Juergen Rose 2019-04-18 16:37:28 UTC
root@lynx:/root(41)# qlist -Iv mpi
...
dev-perl/XML-Compile-WSDL11-3.60.0
dev-python/mpi4py-3.0.0
sci-libs/mpir-3.0.0
sys-cluster/openmpi-4.0.1
sys-libs/compiler-rt-8.0.0
sys-libs/compiler-rt-sanitizers-8.0.0
virtual/mpi-2.0-r5
Comment 4 Arfrever Frehtes Taifersar Arahesis 2019-05-05 00:12:10 UTC
*** Bug 685064 has been marked as a duplicate of this bug. ***
Comment 5 Juergen Rose 2019-06-23 13:58:53 UTC
It still fails.
Comment 6 Bernardo Meurer 2019-09-17 23:13:13 UTC
I'm running into the same issue:
```
In file included from /usr/include/mpi.h:10,
                 from libmpiwrap.c:116:
libmpiwrap.c: In function ‘showTy’:
libmpiwrap.c:281:19: error: expected expression before ‘_Static_assert’
  281 |    else if (ty == MPI_UB)             fprintf(f,"UB");
      |                   ^~~~~~
libmpiwrap.c:282:19: error: expected expression before ‘_Static_assert’
  282 |    else if (ty == MPI_LB)             fprintf(f,"LB");
      |                   ^~~~~~
libmpiwrap.c: In function ‘extentOfTy’:
libmpiwrap.c:462:8: warning: implicit declaration of function ‘PMPI_Type_extent’; did you mean ‘MPI_Type_extent’? [-Wimplicit-function-declaration]
  462 |    r = PMPI_Type_extent(ty, &n);
      |        ^~~~~~~~~~~~~~~~
      |        MPI_Type_extent
In file included from /usr/include/mpi.h:10,
                 from libmpiwrap.c:116:
libmpiwrap.c: In function ‘walk_type’:
libmpiwrap.c:736:17: error: expected expression before ‘_Static_assert’
  736 |       if (ty == MPI_LB || ty == MPI_UB)
      |                 ^~~~~~
make[2]: *** [Makefile:657: libmpiwrap_amd64_linux_so-libmpiwrap.o] Error 1
make[2]: Leaving directory '/var/tmp/portage/dev-util/valgrind-3.15.0/work/valgrind-3.15.0/mpi'
make[1]: *** [Makefile:841: all-recursive] Error 1
make[1]: Leaving directory '/var/tmp/portage/dev-util/valgrind-3.15.0/work/valgrind-3.15.0'
make: *** [Makefile:710: all] Error 2
```
Comment 7 Sven Eden 2019-12-18 17:21:05 UTC
sys-cluster/openmpi-4.x has to be configured with
  --enable-mpi1-compatibility
so valgrind can keep using these deprecated facilities.

However, until valgrind catches up, a USE flag for that option in OpenMPI, which is the requested by Valgrind might do the trick.
Comment 8 Arfrever Frehtes Taifersar Arahesis 2020-01-22 01:40:58 UTC
A patch is attached in upstream bug (https://bugs.kde.org/show_bug.cgi?id=401416#c3).

Maybe that patch could be conditionally applied?:

if has_version ">=sys-cluster/openmpi-4"; then
  eapply ...
fi
Comment 9 Sven Eden 2020-03-23 12:52:46 UTC
(In reply to Arfrever Frehtes Taifersar Arahesis from comment #8)
> A patch is attached in upstream bug
> (https://bugs.kde.org/show_bug.cgi?id=401416#c3).
> 
> Maybe that patch could be conditionally applied?:
> 
> if has_version ">=sys-cluster/openmpi-4"; then
>   eapply ...
> fi

That patch works like a charm!