Opened 6 months ago

Last modified 5 weeks ago

#68795 new defect

netcdf configure error with +mpich +gcc12

Reported by: numaryu Owned by:
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc: tenomoto (Takeshi Enomoto), Dave-Allured (Dave Allured), Schamschula (Marius Schamschula)
Port: netcdf

Description

configuration fails with +mpich +gcc12 as shown in the attached log. The error is caused by adding incompatible stdlib to c++ compiler, which must be mpicxx (g++).

I guess cxx must be added to compilers.choose.

Attachments (1)

netcdf+mpich+gcc12_fail.log (133.3 KB) - added by numaryu 6 months ago.

Download all attachments as: .zip

Change History (4)

Changed 6 months ago by numaryu

Attachment: netcdf+mpich+gcc12_fail.log added

comment:1 Changed 5 months ago by Dave-Allured (Dave Allured)

Cc: Dave-Allured added

comment:2 Changed 5 weeks ago by Schamschula (Marius Schamschula)

Cc: Schamschula added

comment:3 Changed 5 weeks ago by Schamschula (Marius Schamschula)

I see the same error under Ventura 13.6.6 and Xcode 15.2.

However, the problem is with cmake not finding mpicxx-mpich-mp

So I changed the

if {[mpi_variant_isset]} {
    configure.cflags-append -DHDF5_PARALLEL
    configure.args-append   -DENABLE_PARALLEL_TESTS=ON
}

block to

if {[mpi_variant_isset]} {
    configure.cflags-append -DHDF5_PARALLEL
    configure.args-append   -DENABLE_PARALLEL_TESTS=ON \
                            -DMPI_CXX_COMPILER=${prefix}/bin/mpicxx-mpich-mp
}

I'm not expert with the mpi PortGroup. There's probably a cleaner way that works for all versions of mpi..

Note: See TracTickets for help on using tickets.