Opened 12 years ago

Closed 12 years ago

#34370 closed defect (fixed)

fftw-3 fails to build with mpich2

Reported by: numaryu Owned by: skymoo (Adam Mercer)
Priority: Normal Milestone:
Component: ports Version: 2.0.4
Keywords: Cc: tenomoto (Takeshi Enomoto), eborisch (Eric A. Borisch)
Port: mpich2 fftw-3

Description

fftw-3 fails to build with +gcc45 and +mpich2 because the -arch flag is passed to macports-gcc. This is similar to Ticket #34290, and the same solution can be applied (r92596).

Attachments (1)

Portfile.diff (3.4 KB) - added by eborisch (Eric A. Borisch) 12 years ago.

Download all attachments as: .zip

Change History (15)

comment:1 Changed 12 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: ram removed
Owner: changed from macports-tickets@… to ram@…

The Cc field needs complete email addresses.

Wouldn't a better solution be to make the compiler that the mpich2 port installs respect the CC environment variable? Then it could be fixed in the mpich2 port, at the source, instead of having to be fixed in every port that uses mpich2.

comment:2 Changed 12 years ago by skymoo (Adam Mercer)

Cc: eborisch@… added

Ryan's idea sounds like a better solution to me, it's better to fix the problems and not the symptoms.

comment:3 Changed 12 years ago by skymoo (Adam Mercer)

Cc: takeshi@… added

comment:4 Changed 12 years ago by jmroot (Joshua Root)

Port: mpich2 added

comment:5 Changed 12 years ago by skymoo (Adam Mercer)

Cc: ram@… added; eborisch@… removed
Owner: changed from ram@… to eborisch@…

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

In general, mpich2 is configured/built to use a particular compiler (mpicc and mpicxx are wrappers around the desired compiler) ... other compilers may be used so long as the requirements listed here are met.

Other compilers (meeting these requirements) to be wrapped can be specified for mpicc and mpicxx by setting the environment variables MPICH_CC and MPICH_CXX, respectively. (MPICH_F90 as well for mpif90)

I'm not going to change MPICH2 to 'respect' CC, as for many MPI project builds, CC=mpicc.

This discusion is also relevant: http://lists.macosforge.org/pipermail/macports-dev/2012-August/020012.html

If mpich2 is built +gcc45, and fftw's +gcc45 variant meant "please use gcc-mp-45 for all your compilation needs" and not "just for fortran", the build would succeed (I believe) as the flags would be gcc45 "appropriate."

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

Cc: eborisch@… added

Cc Me!

comment:8 Changed 12 years ago by eborisch (Eric A. Borisch)

Owner: changed from eborisch@… to ram@…

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

Cc: ram@… removed

comment:10 in reply to:  6 Changed 12 years ago by skymoo (Adam Mercer)

Replying to eborisch@…:

If mpich2 is built +gcc45, and fftw's +gcc45 variant meant "please use gcc-mp-45 for all your compilation needs" and not "just for fortran", the build would succeed (I believe) as the flags would be gcc45 "appropriate."

There was a ticket requesting this, I provided a patch and asked for feedback but the OP was silent. Maybe it's time to revisit.

comment:11 Changed 12 years ago by skymoo (Adam Mercer)

In r97612 the fftw-3 port was modified so that the entire gcc toolchain is used for the gcc variants and not just for the fortran components. Does this help?

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

It works, with the attached modifications (typos and some additional include conflicts to weed out in -long and -single.)

Also changed mpich2 dep to a path-style dependency so mpich2-devel can satisfy.

Changed 12 years ago by eborisch (Eric A. Borisch)

Attachment: Portfile.diff added

comment:13 Changed 12 years ago by skymoo (Adam Mercer)

Looks good, I should be able to get round to committing this tonight. Feel free to commit it yourself if you have the time.

comment:14 Changed 12 years ago by eborisch (Eric A. Borisch)

Resolution: fixed
Status: newclosed

Done in r97639 (typos) and r97642. Closing.

Note: See TracTickets for help on using tickets.