Opened 6 years ago

Closed 6 years ago

#57119 closed defect (fixed)

mpich @3.2.1 : Incompatible Fortran and C Object File Types

Reported by: lzkelley (Luke) Owned by: eborisch (Eric A. Borisch)
Priority: Normal Milestone:
Component: ports Version: 2.5.3
Keywords: Cc: seanfarley (Sean Farley), cjones051073 (Chris Jones)
Port: mpich

Description (last modified by lzkelley (Luke))

MacPorts 2.5.3 macOS 10.12.6

I'm trying to install mpich, and get an incompatibility error during the Configuring mpich-default step (log attached):

:info:configure checking whether Fortran 77 and C objects are compatible... no
:info:configure checking for file... file
:info:configure configure: error: ****  Incompatible Fortran and C Object File Types!  ****
:info:configure F77 Object File Type produced by "/opt/local/bin/gfortran-mp-7  -pipe -m64" is : : cannot open `' (No such file or directory).
:info:configure  C  Object File Type produced by "/usr/bin/clang  -pipe -arch x86_64  -O2" is : : Mach-O 64-bit object x86_64.
:info:configure Command failed:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_science_mpich/mpich-default/work/mpich-3.2.1-x86_64" && ./configure --prefix=/opt/local --disable-dependency-tracking --disable-dependency-tracking --disable-silent-rules --enable-base-cache --enable-cache --enable-cxx --enable-fast=O2 --enable-shared --enable-smpcoll --with-device=ch3:nemesis --with-pm=hydra --with-thread-package=posix --enable-versioning F90FLAGS='' F90='' --enable-timer-type=mach_absolute_time --libdir=/opt/local/lib/mpich-mp --sysconfdir=/opt/local/etc/mpich-mp --program-suffix=-mpich-mp --includedir=/opt/local/include/mpich-mp MPICHLIB_CFLAGS="$CFLAGS" CFLAGS="" MPICHLIB_CPPFLAGS="$CPPFLAGS" CPPFLAGS="" MPICHLIB_CXXFLAGS="$CXXFLAGS" CXXFLAGS="" MPICHLIB_FFLAGS="$FFLAGS" FFLAGS="" MPICHLIB_FCFLAGS="$FCFLAGS" FCFLAGS="" --enable-fortran --disable-dependency-tracking 
:info:configure Exit code: 1

Please let me know if there's any other information I can provide.

Attachments (3)

config.log (97.6 KB) - added by lzkelley (Luke) 6 years ago.
config file
main.log (49.6 KB) - added by lzkelley (Luke) 6 years ago.
main log with error
main.2.log (94.5 KB) - added by lzkelley (Luke) 6 years ago.
updated main.log

Download all attachments as: .zip

Change History (12)

Changed 6 years ago by lzkelley (Luke)

Attachment: config.log added

config file

Changed 6 years ago by lzkelley (Luke)

Attachment: main.log added

main log with error

comment:1 Changed 6 years ago by lzkelley (Luke)

Description: modified (diff)

comment:2 Changed 6 years ago by mf2k (Frank Schima)

Cc: seanfarley added; eborisch@… sean@… removed
Owner: set to eborisch
Status: newassigned

comment:3 Changed 6 years ago by eborisch (Eric A. Borisch)

Sure looks like a duplicate of #56938; try this and see if it works:

sudo port selfupdate
sudo port upgrade cctools
sudo port clean mpich-default
sudo port install mpich-default

Please report back so we can close / investigate as necessary.

comment:4 in reply to:  3 ; Changed 6 years ago by lzkelley (Luke)

Replying to eborisch:

Sure looks like a duplicate of #56938; try this and see if it works:

sudo port selfupdate
sudo port upgrade cctools
sudo port clean mpich-default
sudo port install mpich-default

Please report back so we can close / investigate as necessary.

I tried the above. I wasn't able to run sudo port upgrade cctools (it said libgcc7 was broken, no other info), but uninstalling and reinstalling libgcc7 and then reinstalling cctools worked. Trying to install mpich-default leads to (seemingly) the same error:

:info:configure checking for Fortran 77 libraries of /opt/local/bin/gfortran-mp-7... 
:info:configure checking whether /opt/local/bin/gfortran-mp-7 accepts the FLIBS found by autoconf... no
:info:configure checking for valid entries in FLIBS... 
:info:configure checking whether /usr/bin/clang links with FLIBS found by autoconf... yes
:info:configure checking whether Fortran 77 and C objects are compatible... no
:info:configure checking for file... file
:info:configure configure: error: ****  Incompatible Fortran and C Object File Types!  ****
:info:configure F77 Object File Type produced by "/opt/local/bin/gfortran-mp-7  -pipe" is : : cannot open `' (No such file or directory).
:info:configure  C  Object File Type produced by "/usr/bin/clang  -pipe -arch x86_64  -O2" is : : Mach-O 64-bit object x86_64.
:info:configure Command failed:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_science_mpich/mpich-default/work/mpich-3.2.1" && ./configure --prefix=/opt/local --disable-dependency-tracking --disable-silent-rules --enable-base-cache --enable-cache --enable-cxx --enable-fast=O2 --enable-shared --enable-smpcoll --with-device=ch3:nemesis --with-pm=hydra --with-thread-package=posix --enable-versioning F90FLAGS='' F90='' --enable-timer-type=mach_absolute_time --libdir=/opt/local/lib/mpich-mp --sysconfdir=/opt/local/etc/mpich-mp --program-suffix=-mpich-mp --includedir=/opt/local/include/mpich-mp MPICHLIB_CFLAGS="$CFLAGS" CFLAGS="" MPICHLIB_CPPFLAGS="$CPPFLAGS" CPPFLAGS="" MPICHLIB_CXXFLAGS="$CXXFLAGS" CXXFLAGS="" MPICHLIB_FFLAGS="$FFLAGS" FFLAGS="" MPICHLIB_FCFLAGS="$FCFLAGS" FCFLAGS="" --enable-fortran 
:info:configure Exit code: 1
:error:configure Failed to configure mpich-default, consult /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_science_mpich/mpich-default/work/mpich-3.2.1/config.log
:error:configure Failed to configure mpich-default: configure failure: command execution failed
:debug:configure Error code: NONE
:debug:configure Backtrace: configure failure: command execution failed
:debug:configure     while executing
:debug:configure "$procedure $targetname"
:error:configure See /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_science_mpich/mpich-default/main.log for details.

I'll attached the full, updated main.log (new: main.2.log)


In the referenced ticket () they say to make sure the xcode cctools variant is installed. I did a port variants cctools and get:

cctools has the variants:
   llvm39: Use llvm-3.9 for libLTO, llvm-mc, llvm-size, and llvm-nm
     * conflicts with llvm40 llvm50 llvmdev xcode
   llvm40: Use llvm-4.0 for libLTO, llvm-mc, llvm-size, and llvm-nm
     * conflicts with llvm39 llvm50 llvmdev xcode
[+]llvm50: Use llvm-5.0 for libLTO, llvm-mc, llvm-size, and llvm-nm
     * conflicts with llvm39 llvm40 llvmdev xcode
   llvmdev: Use llvm-devel for libLTO, llvm-mc, llvm-size, and llvm-nm
     * conflicts with llvm39 llvm40 llvm50 xcode
   universal: Build for multiple architectures
     * conflicts with xcode
   xcode: Use Xcode supplied toolkit
     * conflicts with universal

This means the llvm50 is the installed variant, I think. Should I try the xcode version?

Last edited 6 years ago by lzkelley (Luke) (previous) (diff)

Changed 6 years ago by lzkelley (Luke)

Attachment: main.2.log added

updated main.log

comment:5 in reply to:  4 Changed 6 years ago by lzkelley (Luke)

Replying to lzkelley:

Replying to eborisch:

Sure looks like a duplicate of #56938; try this and see if it works:

sudo port selfupdate
sudo port upgrade cctools
sudo port clean mpich-default
sudo port install mpich-default

Please report back so we can close / investigate as necessary.

I tried the above. I wasn't able to run sudo port upgrade cctools (it said libgcc7 was broken, no other info), but uninstalling and reinstalling libgcc7 and then reinstalling cctools worked. Trying to install mpich-default leads to (seemingly) the same error:

:info:configure checking for Fortran 77 libraries of /opt/local/bin/gfortran-mp-7... 
:info:configure checking whether /opt/local/bin/gfortran-mp-7 accepts the FLIBS found by autoconf... no
:info:configure checking for valid entries in FLIBS... 
:info:configure checking whether /usr/bin/clang links with FLIBS found by autoconf... yes
:info:configure checking whether Fortran 77 and C objects are compatible... no
:info:configure checking for file... file
:info:configure configure: error: ****  Incompatible Fortran and C Object File Types!  ****
:info:configure F77 Object File Type produced by "/opt/local/bin/gfortran-mp-7  -pipe" is : : cannot open `' (No such file or directory).
:info:configure  C  Object File Type produced by "/usr/bin/clang  -pipe -arch x86_64  -O2" is : : Mach-O 64-bit object x86_64.
:info:configure Command failed:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_science_mpich/mpich-default/work/mpich-3.2.1" && ./configure --prefix=/opt/local --disable-dependency-tracking --disable-silent-rules --enable-base-cache --enable-cache --enable-cxx --enable-fast=O2 --enable-shared --enable-smpcoll --with-device=ch3:nemesis --with-pm=hydra --with-thread-package=posix --enable-versioning F90FLAGS='' F90='' --enable-timer-type=mach_absolute_time --libdir=/opt/local/lib/mpich-mp --sysconfdir=/opt/local/etc/mpich-mp --program-suffix=-mpich-mp --includedir=/opt/local/include/mpich-mp MPICHLIB_CFLAGS="$CFLAGS" CFLAGS="" MPICHLIB_CPPFLAGS="$CPPFLAGS" CPPFLAGS="" MPICHLIB_CXXFLAGS="$CXXFLAGS" CXXFLAGS="" MPICHLIB_FFLAGS="$FFLAGS" FFLAGS="" MPICHLIB_FCFLAGS="$FCFLAGS" FCFLAGS="" --enable-fortran 
:info:configure Exit code: 1
:error:configure Failed to configure mpich-default, consult /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_science_mpich/mpich-default/work/mpich-3.2.1/config.log
:error:configure Failed to configure mpich-default: configure failure: command execution failed
:debug:configure Error code: NONE
:debug:configure Backtrace: configure failure: command execution failed
:debug:configure     while executing
:debug:configure "$procedure $targetname"
:error:configure See /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_science_mpich/mpich-default/main.log for details.

I'll attached the full, updated main.log (new: main.2.log)


In the referenced ticket () they say to make sure the xcode cctools variant is installed. I did a port variants cctools and get:

cctools has the variants:
   llvm39: Use llvm-3.9 for libLTO, llvm-mc, llvm-size, and llvm-nm
     * conflicts with llvm40 llvm50 llvmdev xcode
   llvm40: Use llvm-4.0 for libLTO, llvm-mc, llvm-size, and llvm-nm
     * conflicts with llvm39 llvm50 llvmdev xcode
[+]llvm50: Use llvm-5.0 for libLTO, llvm-mc, llvm-size, and llvm-nm
     * conflicts with llvm39 llvm40 llvmdev xcode
   llvmdev: Use llvm-devel for libLTO, llvm-mc, llvm-size, and llvm-nm
     * conflicts with llvm39 llvm40 llvm50 xcode
   universal: Build for multiple architectures
     * conflicts with xcode
   xcode: Use Xcode supplied toolkit
     * conflicts with universal

This means the llvm50 is the installed variant, I think. Should I try the xcode version?

Update: using the xcode version fixes the problem.

comment:6 Changed 6 years ago by lzkelley (Luke)

The recommendation from @eborisch was *almost* enough to solve the problem. Full solution was:

sudo port selfupdate
sudo port upgrade outdated
sudo port uninstall -f cctools
sudo port install cctools +xcode -llvm50
sudo port clean mpich-default
sudo port install mpich-default

Is there a way to require that cctools use the xcode variant, and be at or above version @895_7 when trying to install mpich?

comment:7 Changed 6 years ago by eborisch (Eric A. Borisch)

Cc: cjones051073 added

It does just that (force +xcode), but only for xcode version 9 and above; you've got 8 (I think, looking at the logs.)

Tagging Chris Jones (cc:) to see what his thoughts are on this.

comment:8 Changed 6 years ago by cjones051073 (Chris Jones)

I suspect part of the problem here is the 10.12 buildit actually has Xcode 9 installed, not 8. See for instance

DEBUG: Starting logging for py37-yt
DEBUG: macOS 10.12 (darwin/16.7.0) arch i386
DEBUG: MacPorts 2.5.3
DEBUG: Xcode 9.2
DEBUG: SDK 10.12

just taken from a recent build.

I have seen evidence previously that this information somehow gets 'baked' into the gcc compilers, so when you install one from the binary tarball made from the builedbot, it expects to use the cctools from Xcode 9, which you don't have.

Not sure the right approach here. Is Xcode 9 the 'recommended' one on 10.12 ? If yes, upgrade yours. If not, I wonder why the buildbot has it.

comment:9 Changed 6 years ago by eborisch (Eric A. Borisch)

Resolution: fixed
Status: assignedclosed

It looks like the user needs to upgrade to Xcode 9: 9.2 is the newest that will run on 10.12, based on this, and I'd say that running the most recent available Xcode is a reasonable recommendation. (Especially since that appears to be the buildbot state.)

Perhaps we should add warnings when installing from compiled packages if the buildbot environment (Xcode & MacPorts version, since OS versions will be the same 10.y by design) doesn't match the local environment... But that's a discussion for somewhere else.

Note: See TracTickets for help on using tickets.