[MacPorts] #20361: fftw-3: failure during configure phase, compiler does not recognize -arch flag
#20361: fftw-3: failure during configure phase, compiler does not recognize -arch flag ---------------------------------+------------------------------------------ Reporter: simon@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 1.8.0 Keywords: fftw-3 -arch | Port: fftw-3 ---------------------------------+------------------------------------------ While trying to upgrade fftw-3 @3.2.1_2+gcc43 the configure script fails with the following error: {{{ checking for Fortran 77 name-mangling scheme... configure: error: in `/opt/local/var/macports/build/_opt_local_macports- trunk_dports_math_fftw-3/work/fftw-3.2.2': configure: error: cannot compile a simple Fortran program }}} config.log shows: {{{ configure:25700: gfortran-mp-4.3 -o conftest -pipe -O2 -arch i386 -L/opt/local/lib -arch i386 conftest.f -lm f951: error: unrecognized command line option "-arch" f951: error: unrecognized command line option "-arch" }}} I have not tested it for other gcc variants and I am aware that this is related to changes in 1.8 -- Ticket URL: <http://trac.macports.org/ticket/20361> MacPorts <http://www.macports.org/> Ports system for Mac OS
#20361: fftw-3: failure during configure phase, compiler does not recognize -arch flag ---------------------------------+------------------------------------------ Reporter: simon@… | Owner: ram@… Type: defect | Status: assigned Priority: Normal | Milestone: Component: ports | Version: 1.8.0 Keywords: fftw-3 -arch | Port: fftw-3 ---------------------------------+------------------------------------------ Changes (by ram@…): * cc: ram@… (removed) * owner: macports-tickets@… => ram@… * status: new => assigned -- Ticket URL: <http://trac.macports.org/ticket/20361#comment:1> MacPorts <http://www.macports.org/> Ports system for Mac OS
#20361: fftw-3: failure during configure phase, compiler does not recognize -arch flag ---------------------------------+------------------------------------------ Reporter: simon@… | Owner: ram@… Type: defect | Status: assigned Priority: Normal | Milestone: Component: ports | Version: 1.8.0 Keywords: fftw-3 -arch | Port: fftw-3 ---------------------------------+------------------------------------------ Comment(by ram@…): I can't reproduce this on my MBP running Leopard and MacPorts-1.7.1. Are you trying to build universally? -- Ticket URL: <http://trac.macports.org/ticket/20361#comment:2> MacPorts <http://www.macports.org/> Ports system for Mac OS
#20361: fftw-3: failure during configure phase, compiler does not recognize -arch flag ---------------------------------+------------------------------------------ Reporter: simon@… | Owner: ram@… Type: defect | Status: assigned Priority: Normal | Milestone: Component: ports | Version: 1.8.0 Keywords: fftw-3 -arch | Port: fftw-3 ---------------------------------+------------------------------------------ Comment(by simon@…): No, I am not. From 1.8.0 on configure.archflags is being set by base. For example #20280 shows the same behavior for the gcc port itself. -- Ticket URL: <http://trac.macports.org/ticket/20361#comment:3> MacPorts <http://www.macports.org/> Ports system for Mac OS
#20361: fftw-3: failure during configure phase, compiler does not recognize -arch flag ---------------------------------+------------------------------------------ Reporter: simon@… | Owner: ram@… Type: defect | Status: assigned Priority: Normal | Milestone: Component: ports | Version: 1.8.0 Keywords: fftw-3 -arch | Port: fftw-3 ---------------------------------+------------------------------------------ Comment(by toby@…): I believe the port needs to use configure.compiler instead of directly setting the fortran compiler. Should make the check in base work... -- Ticket URL: <http://trac.macports.org/ticket/20361#comment:4> MacPorts <http://www.macports.org/> Ports system for Mac OS
#20361: fftw-3: failure during configure phase, compiler does not recognize -arch flag ---------------------------------+------------------------------------------ Reporter: simon@… | Owner: ram@… Type: defect | Status: assigned Priority: Normal | Milestone: Component: ports | Version: 1.8.0 Keywords: fftw-3 -arch | Port: fftw-3 ---------------------------------+------------------------------------------ Comment(by ram@…): Replying to [comment:4 toby@…]:
I believe the port needs to use configure.compiler instead of directly setting the fortran compiler. Should make the check in base work...
How? I thought that using `configure.f77` was the correct way of setting which f77 compiler to use, and reading the description of `configure.compiler` in the guide seems to indicate this as well. -- Ticket URL: <http://trac.macports.org/ticket/20361#comment:5> MacPorts <http://www.macports.org/> Ports system for Mac OS
#20361: fftw-3: failure during configure phase, compiler does not recognize -arch flag ---------------------------------+------------------------------------------ Reporter: simon@… | Owner: ram@… Type: defect | Status: assigned Priority: Normal | Milestone: Component: ports | Version: 1.8.0 Keywords: fftw-3 -arch | Port: fftw-3 ---------------------------------+------------------------------------------ Comment(by blb@…): Does {{{ configure.compiler macports-gcc-4.? }}} work instead of setting just configure.f77? -- Ticket URL: <http://trac.macports.org/ticket/20361#comment:6> MacPorts <http://www.macports.org/> Ports system for Mac OS
#20361: fftw-3: failure during configure phase, compiler does not recognize -arch flag ---------------------------------+------------------------------------------ Reporter: simon@… | Owner: ram@… Type: defect | Status: assigned Priority: Normal | Milestone: Component: ports | Version: 1.8.0 Keywords: fftw-3 -arch | Port: fftw-3 ---------------------------------+------------------------------------------ Comment(by simon@…): Replying to [comment:6 blb@…]:
Does {{{ configure.compiler macports-gcc-4.? }}} work instead of setting just configure.f77?
I tried to set {{{ configure.compiler macports-gcc-4.3 }}} in the gcc43 variant. Now the "-arch error" appears already on checking the C compiler {{{ gcc-mp-4.3 }}}. -- Ticket URL: <http://trac.macports.org/ticket/20361#comment:7> MacPorts <http://www.macports.org/> Ports system for Mac OS
#20361: (trunk) fftw-3 +gcc43: failure during configure phase, compiler does not recognize -arch flag ---------------------------------+------------------------------------------ Reporter: simon@… | Owner: ram@… Type: defect | Status: assigned Priority: Normal | Milestone: Component: ports | Version: 1.8.0 Keywords: fftw-3 -arch | Port: fftw-3 ---------------------------------+------------------------------------------ Comment(by toby@…): It's possible that the configure.compiler setting gets used earlier, and setting in the variant is too late for the arch_flag_supported check to operate correctly. -- Ticket URL: <http://trac.macports.org/ticket/20361#comment:8> MacPorts <http://www.macports.org/> Ports system for Mac OS
#20361: (trunk) fftw-3 +gcc43: failure during configure phase, compiler does not recognize -arch flag ---------------------------------+------------------------------------------ Reporter: simon@… | Owner: ram@… Type: defect | Status: assigned Priority: Normal | Milestone: Component: ports | Version: 1.8.0 Keywords: fftw-3 -arch | Port: fftw-3 ---------------------------------+------------------------------------------ Comment(by toby@…): openmpi also affected, #20375 -- Ticket URL: <http://trac.macports.org/ticket/20361#comment:9> MacPorts <http://www.macports.org/> Ports system for Mac OS
#20361: (trunk) fftw-3 +gcc43: failure during configure phase, compiler does not recognize -arch flag ---------------------------------+------------------------------------------ Reporter: simon@… | Owner: ram@… Type: defect | Status: assigned Priority: Normal | Milestone: MacPorts 1.8.0 Component: ports | Version: 1.8.0 Keywords: fftw-3 -arch | Port: fftw-3 ---------------------------------+------------------------------------------ Changes (by jmr@…): * cc: jmr@… (added) * milestone: => MacPorts 1.8.0 Comment: Replying to [comment:8 toby@…]:
It's possible that the configure.compiler setting gets used earlier, and setting in the variant is too late for the arch_flag_supported check to operate correctly.
Yeah, configure.archflags gets appended to configure.{c,cxx,f}flags before variants are executed. There are a couple of issues here: first, I don't think any fortran compiler supports -arch, so we should probably always use -m32/-m64 in configure.f*flags. Second, it's probably a bad idea to be appending to those variables at all, since there's really no time you can do it without the potential for getting it wrong. I think the convention just has to be that configure.archflags will be added to the right environment variable during configure, but if you are patching CFLAGS into a Makefile manually or whatever you'll just have to specifically put the archflags in there as well. -- Ticket URL: <http://trac.macports.org/ticket/20361#comment:11> MacPorts <http://www.macports.org/> Ports system for Mac OS
#20361: don't pass -arch to fortran compilers ----------------------------------+----------------------------------------- Reporter: simon@… | Owner: ram@… Type: defect | Status: closed Priority: Normal | Milestone: MacPorts 1.8.0 Component: base | Version: 1.8.0 Resolution: fixed | Keywords: fftw-3 -arch Port: fftw-3 | ----------------------------------+----------------------------------------- Changes (by jmr@…): * status: assigned => closed * resolution: => fixed * component: ports => base Comment: r54236 -- Ticket URL: <http://trac.macports.org/ticket/20361#comment:12> MacPorts <http://www.macports.org/> Ports system for Mac OS
#20361: don't pass -arch to fortran compilers ----------------------------------+----------------------------------------- Reporter: simon@… | Owner: ram@… Type: defect | Status: closed Priority: Normal | Milestone: MacPorts 1.8.0 Component: base | Version: 1.8.0 Resolution: fixed | Keywords: fftw-3 -arch Port: fftw-3 | ----------------------------------+----------------------------------------- Comment(by alakazam@…): The problem was also present in the latest revision of the octave Portfile. r54236 fixes this issue. Thanks ! -- Ticket URL: <http://trac.macports.org/ticket/20361#comment:13> MacPorts <http://www.macports.org/> Ports system for Mac OS
participants (1)
-
MacPorts