Bug 266192 - lang/opencoarrays: Fails to build with GCC 12: Error: Cannot find keyword named 'operator' in call to 'co_reduce' at (1)
Summary: lang/opencoarrays: Fails to build with GCC 12: Error: Cannot find keyword nam...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Lorenzo Salvadore
URL: http://package18.nyi.freebsd.org/data...
Keywords:
Depends on:
Blocks: 265948
  Show dependency treegraph
 
Reported: 2022-09-03 09:21 UTC by Lorenzo Salvadore
Modified: 2022-09-15 21:40 UTC (History)
2 users (show)

See Also:
miguel: maintainer-feedback+


Attachments
Update to 2.10.0 (1.39 KB, patch)
2022-09-15 10:48 UTC, Lorenzo Salvadore
miguel: maintainer-approval+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Lorenzo Salvadore freebsd_committer freebsd_triage 2022-09-03 09:21:12 UTC
Updating GCC_DEFAULT from GCC 11 to GCC 12 is blocked by the fact that building this port with GCC 12 on i386 and amd64 fails.

The error message is the following:



/wrkdirs/usr/ports/lang/opencoarrays/work/OpenCoarrays-2.9.0/src/tests/unit/collectives/co_reduce_res_im.f90:14:63:                                                                            
                                                                                                                                                                                               
   14 |   call co_reduce ( value, result_image = 1, operator = myProd )                                                                                                                        
      |                                                               1                        
Error: Cannot find keyword named 'operator' in call to 'co_reduce' at (1)                      
Error: comand:                                                                                 
   `/usr/local/bin/gfortran12 -I/wrkdirs/usr/ports/lang/opencoarrays/work/.build/include/OpenCoarrays-2.9.0_GNU-12 -fcoarray=lib -lpthread -Wl,-rpath=-Wl,-rpath=/usr/local/lib/gcc12 -Wl,-rpat
h -Wl,/usr/local/mpi/openmpi/lib -Wl,--enable-new-dtags -pthread -I/usr/local/mpi/openmpi/include -I/usr/local/mpi/openmpi/lib -DPREFIX_NAME=_gfortran_caf_ -DGCC_GE_7 -DGCC_GE_8 -DHAVE_MPI -D
MPI_WORKING_MODULE -O3 -DNDEBUG -O3 -o /wrkdirs/usr/ports/lang/opencoarrays/work/.build/bin/OpenCoarrays-2.9.0-tests/co_reduce_res_im /wrkdirs/usr/ports/lang/opencoarrays/work/OpenCoarrays-2.
9.0/src/tests/unit/collectives/co_reduce_res_im.f90 /wrkdirs/usr/ports/lang/opencoarrays/work/.build/lib/libopencoarrays_test_utilities.a /wrkdirs/usr/ports/lang/opencoarrays/work/.build/lib/
libopencoarrays_mod.a /wrkdirs/usr/ports/lang/opencoarrays/work/.build/lib/libcaf_mpi.a /usr/local/mpi/openmpi/lib/libmpi_usempi.so /usr/local/mpi/openmpi/lib/libmpi_mpifh.so /usr/local/mpi/o
penmpi/lib/libmpi.so`                                                                                                                                                                          
failed to compile. 


Please see also the log in the URL field. This URL might be useful to solve the issue: http://gcc.gnu.org/gcc-12/porting_to.html .
Comment 1 Fernando Apesteguía freebsd_committer freebsd_triage 2022-09-03 17:23:57 UTC
^Triage: Reporter is committer, assign accordingly.
Comment 2 Lorenzo Salvadore freebsd_committer freebsd_triage 2022-09-15 10:48:31 UTC
Created attachment 236565 [details]
Update to 2.10.0

This patch that updates the port to 2.10.0 also fixes the issue with GCC 12.
Comment 3 Lorenzo Salvadore freebsd_committer freebsd_triage 2022-09-15 21:26:11 UTC
Thanks Miguel for looking at this bug report.

Please note that you have set the maintainer-feedback flag, which is fine if what you wanted to say is that you are looking at the bug report. But if what you wanted to do was approving the patch I proposed, you should then set the maintainer-approval flag instead (click on Details for the attached patch, then set the maintainer-approval flag).

In general, adding a few words in a comment is a good idea to be clearer (e.g. "I am looking into your patch" or "Patch approved").

Thanks.
Comment 4 commit-hook freebsd_committer freebsd_triage 2022-09-15 21:39:19 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=025559f22b37f743cf13fdf63e7b3dd4ca1a40bd

commit 025559f22b37f743cf13fdf63e7b3dd4ca1a40bd
Author:     Lorenzo Salvadore <salvadore@FreeBSD.org>
AuthorDate: 2022-09-15 09:25:03 +0000
Commit:     Lorenzo Salvadore <salvadore@FreeBSD.org>
CommitDate: 2022-09-15 21:37:57 +0000

    lang/opencoarrays: Update to 2.10.0

    Also fix build with GCC 12 [1].

    Changes: https://github.com/sourceryinstitute/OpenCoarrays/compare/2.9.0...2.10.0

    PR:             266192 [1]
    Approved by:    Miguel Gocobachi <miguel@gocobachi.dev> (maintainer)

 lang/opencoarrays/Makefile | 2 +-
 lang/opencoarrays/distinfo | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)
Comment 5 Lorenzo Salvadore freebsd_committer freebsd_triage 2022-09-15 21:40:27 UTC
Committed, thanks Miguel.