Bug 263542 - science/nwchem: Fails to build with GCC 11: gfortran11: error: unrecognized command-line option '-i8'; did you mean '-k8'?
Summary: science/nwchem: Fails to build with GCC 11: gfortran11: error: unrecognized c...
Status: Closed Unable to Reproduce
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Yuri Victorovich
URL: http://package18.nyi.freebsd.org/data...
Keywords:
Depends on:
Blocks: 258378
  Show dependency treegraph
 
Reported: 2022-04-24 22:10 UTC by Lorenzo Salvadore
Modified: 2022-05-22 16:45 UTC (History)
1 user (show)

See Also:
bugzilla: maintainer-feedback? (yuri)


Attachments

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-04-24 22:10:54 UTC
Updating GCC_DEFAULT from GCC 10 to GCC 11 is blocked by the fact that building this port with GCC 11 gives the following error (full log in URL):

gmake[2]: Entering directory '/wrkdirs/usr/ports/science/nwchem/work/nwchem-7.0.2-release/src/basis'
Compiling basis.F...
gfortran11: error: unrecognized command-line option '-i8'; did you mean '-k8'?
gmake[2]: *** [../config/makefile.h:3040: /wrkdirs/usr/ports/science/nwchem/work/nwchem-7.0.2-release/src/../lib/LINUX64/libnwcutil.a(basis.o)] Error 1
gmake[2]: *** Waiting for unfinished jobs....
Compiling bas_input.F...
gfortran11: error: unrecognized command-line option '-i8'; did you mean '-k8'?
gmake[2]: *** [../config/makefile.h:3040: /wrkdirs/usr/ports/science/nwchem/work/nwchem-7.0.2-release/src/../lib/LINUX64/libnwcutil.a(bas_input.o)] Error 1
gmake[2]: Leaving directory '/wrkdirs/usr/ports/science/nwchem/work/nwchem-7.0.2-release/src/basis'
gmake[1]: *** [GNUmakefile:105: libraries] Error 1
gmake[1]: Leaving directory '/wrkdirs/usr/ports/science/nwchem/work/nwchem-7.0.2-release/src'

Also, it should be checked if USE_GCC is still needed and that the default clang compiler can't be used instead.
Comment 1 Yuri Victorovich freebsd_committer freebsd_triage 2022-04-24 22:31:26 UTC
Upstream bug report: https://github.com/nwchemgit/nwchem/issues/601
Comment 2 Yuri Victorovich freebsd_committer freebsd_triage 2022-04-25 00:28:09 UTC
I couldn't reproduce the failure with gcc-11 on 13.0-STABLE.
Comment 3 Lorenzo Salvadore freebsd_committer freebsd_triage 2022-04-25 19:23:26 UTC
(In reply to Yuri Victorovich from comment #2)

The exp-run tests have been made many months ago so things might indeed have changed in the meantime. The log is about 12.2, which is now eol. Are you able to reproduce the bug with 12.3? If not, feel free to close the bug: we can always re-open it or open a new one if a new exp-run finds some other issue.

Thanks.
Comment 4 Lorenzo Salvadore freebsd_committer freebsd_triage 2022-05-22 12:31:46 UTC
I tested the port more deeply and here are the results:

- the port builds fine on amd64 {12.3,13.0,13.1}-RELEASE with GCC 11;

- the port does not build on any i386 version, at least with default options, because its dependency tree contains sysutils/slurm-wlm which has

  NOT_FOR_ARCHS=          armv6 armv7 i386 mips powerpc powerpcspe
  NOT_FOR_ARCHS_REASON=   32-bit support is deprecated

  Maybe it should be considered to insert similar lines into nwchem too, unless the need on slurm-wlm can be bypassed some way.

So, the port does not seem to have any issue with GCC 11 and I close the bug.
Comment 5 Lorenzo Salvadore freebsd_committer freebsd_triage 2022-05-22 14:06:41 UTC
Actually, I see that many ports are affected by slurm-wlm not being available for i386 architecture, so it is probably not the best solution to transfer NOT_FOR_ARCHS on other ports: it would be better to try to fix the issue.

I might try to fix it myself.
Comment 6 Yuri Victorovich freebsd_committer freebsd_triage 2022-05-22 16:25:43 UTC
(In reply to Lorenzo Salvadore from comment #5)

net/openmpi depends on slurm-wlm.

openmpi is a more modern implementation of the MPI interface that is used my many ports needing MPI.


Yuri
Comment 7 Lorenzo Salvadore freebsd_committer freebsd_triage 2022-05-22 16:45:23 UTC
(In reply to Yuri Victorovich from comment #6)

Thanks Yuri, but I don't think the issue is with net/openmpi: the port has
OPTIONS_EXCLUDE_i386=           SLURM
so the dependency should be excluded on i386 arch.

On the other hand, no such option is present to exclude slurm-wlm from net/mpich:
the port is being updated in bug #262010 so I have asked there if it would be possible to remove the dependency. I am going to suggest to use the same approach used by openmpi.