Opened 12 years ago

Last modified 12 years ago

#32881 closed enhancement

fftw-3 gcc46 variant builds with clang — at Version 7

Reported by: stefan@… Owned by: ram@…
Priority: Normal Milestone:
Component: ports Version: 2.0.3
Keywords: Cc: krogalon@…
Port: fftw-3

Description (last modified by skymoo (Adam Mercer))

I've tried to build the gcc46 variant of fftw-3. But clang is picked up as compiler during configure. I've tried to use port select to choose mp-gcc46 too, but it didn't help.

Change History (8)

comment:1 Changed 12 years ago by stefan@…

Here is the missing info (can't change the summary):

fftw-3 @3.3 +gcc46

XCode 4.2.1 OS X 10.7.2

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

Owner: changed from macports-tickets@… to ram@…
Status: newassigned

Can you attach the build log.

comment:3 Changed 12 years ago by krogalon@…

Hi, after looking at the Portfile of fftw-3 more closely, it seems to me that the default c compiler is never set. Only the fortran compiler with configure.f77, which only affects the fortran wrappers to the library. Whereas in the fftw (version 2) package, the compiler is set for each variant with configure.compiler .

Is the new behavior intentional? Doesn't it make more sense to compile the whole library with the compiler selected with the variant?

comment:4 Changed 12 years ago by krogalon@…

Cc: krogalon@… added

Cc Me!

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

This has been like this for a very long time.

fftw-3 using the gcc46 variant builds without issue for me on Lion.

Are you saying that it fails to build for you or that clang is used. With the way the port is currently setup clang should be used to build the c source and gfortran (from whatever gcc variant) used for the fortran source. Are you seeing different behaviour?

comment:6 Changed 12 years ago by krogalon@…

Hi! It doesn't fail to build, it uses clang. Which went against my expectation that, using variant +gcc46, gcc 4.6 would be used to build the package. I don't understand why only the fortran bindings should be compiled with gcc 4.6, but the c part (i.e., the actual library, if I'm not mistaken) with the current standard compiler.

I would suggest to change the Portfile such that the gccX variants selects both the fortran and the c compiler (with configure.compiler), as it is done in the fftw package. And other packages, like octave for example. Unless there's a good reason not to, of course.

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

Description: modified (diff)
Type: defectenhancement

I'll take a look but am very busy at the moment, patches are welcome.

Changed 12 years ago by skymoo (Adam Mercer)

Attachment: compiler_variants.diff added
Note: See TracTickets for help on using tickets.