Opened 5 years ago
Closed 5 years ago
#59329 closed defect (fixed)
mpich-default: "error: Aborting because C++ compiler does not work"
Reported by: | Schamschula (Marius Schamschula) | Owned by: | dstrubbe (David Strubbe) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | |
Keywords: | Cc: | MarcusCalhoun-Lopez (Marcus Calhoun-Lopez), aaschwanden (Andy Aschwanden) | |
Port: | mpich openmpi |
Description
While installing an octave package under Mojave (Xcode 10.3), after installing libgcc9 and gcc9,
I get
configure:46412: error: Aborting because C++ compiler does not work. If you do not need a C++ compiler, configure with --disable-cxx
This is the second machine with this error. Full log attached.
Attachments (1)
Change History (13)
Changed 5 years ago by Schamschula (Marius Schamschula)
Attachment: | mpich-default-config.log.zip added |
---|
comment:1 Changed 5 years ago by dstrubbe (David Strubbe)
comment:2 Changed 5 years ago by Schamschula (Marius Schamschula)
I don't know. However, before https://github.com/macports/macports-ports/commit/3378f68291ca0e1a1a6ce793d907b19c77a57184 everything worked.
comment:3 Changed 5 years ago by gjolleyrogers (Garry Jolley-Rogers)
+1.
Encountered after I decided to reinstall all ports fresh. osx 10.14 Xcode 11.
double plus frustrating
.
comment:4 Changed 5 years ago by jmroot (Joshua Root)
Cc: | MarcusCalhoun-Lopez added |
---|
[31b04db7a19d7d0b5b9952943094cbca2620723e/macports-ports] added the stdlib setting. I guess that change wasn't correct for all cases if it's being used with clang and not just macports-gcc.
comment:5 Changed 5 years ago by jmroot (Joshua Root)
Port: | openmpi added |
---|
#59330 reported a very similar problem with openmpi.
comment:6 Changed 5 years ago by willic3 (Charles Williams)
I believe that this ticket is similar to, but not identical to #59330. For that ticket, I believe that 'cxx_stdlib' is being set to 'libstdc++' in the compilers PortGroup (I may be wrong about this). Is there a way to determine where these variables are being set?
comment:7 Changed 5 years ago by rubendibattista (Ruben Di Battista)
I'm also hitting this problem.
Do the updates to ports get checked with build bots? Shouldn't this had been caught during build tests?
comment:8 Changed 5 years ago by rubendibattista (Ruben Di Battista)
diff --git a/_resources/port1.0/group/compilers-1.0.tcl b/_resources/port1.0/group/compilers-1.0.tcl index 9fc68b4c8fa..d4b0435fab8 100644 --- a/_resources/port1.0/group/compilers-1.0.tcl +++ b/_resources/port1.0/group/compilers-1.0.tcl @@ -116,7 +116,7 @@ foreach v ${gcc_versions} { set cdb(gcc$v,fc) ${prefix}/bin/gfortran-mp-$compiler_version set cdb(gcc$v,f77) ${prefix}/bin/gfortran-mp-$compiler_version set cdb(gcc$v,f90) ${prefix}/bin/gfortran-mp-$compiler_version - set cdb(gcc$v,cxx_stdlib) libstdc++ + set cdb(gcc$v,cxx_stdlib) libc++ } set clang_versions {33 34 37 39 40 50 60 70 80 90}
This fix the configure problem. For what I can understand in the code of compilers.tcl
, that cxx_stdlib
option should not be set if compiling with clang
. So I don't get why it actually happens.
comment:9 Changed 5 years ago by willic3 (Charles Williams)
This fix makes perfect sense to me, because the fortran compilers won't care about the setting, and the clang compilers require libc++. This is much better than my temporary (and non-portable) fix, which involved setting CXXFLAGS for the configure arguments.
comment:10 Changed 5 years ago by aaschwanden (Andy Aschwanden)
Cc: | aaschwanden added |
---|
comment:11 Changed 5 years ago by MarcusCalhoun-Lopez (Marcus Calhoun-Lopez)
Using the compilers PG, the variant gccX can have two different meanings:
- Use GCC for all compilers (C, C++, etc.)
- Use GCC for Fortran only
For case 2, configure.cxx_stdlib
should not be changed, which is what happened in a recent commit.
comment:12 Changed 5 years ago by MarcusCalhoun-Lopez (Marcus Calhoun-Lopez)
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
I'm not sure this is a problem of mpich per se. The key lines are: