Opened 13 years ago
Closed 12 years ago
#32881 closed enhancement (fixed)
fftw-3 gcc46 variant builds with clang
Reported by: | stefan@… | Owned by: | skymoo (Adam Mercer) |
---|---|---|---|
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.
Attachments (1)
Change History (12)
comment:1 Changed 13 years ago by stefan@…
comment:2 Changed 13 years ago by skymoo (Adam Mercer)
Owner: | changed from macports-tickets@… to ram@… |
---|---|
Status: | new → assigned |
Can you attach the build log.
comment:3 Changed 13 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:5 Changed 13 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 13 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 13 years ago by skymoo (Adam Mercer)
Description: | modified (diff) |
---|---|
Type: | defect → enhancement |
I'll take a look but am very busy at the moment, patches are welcome.
Changed 13 years ago by skymoo (Adam Mercer)
Attachment: | compiler_variants.diff added |
---|
comment:8 Changed 13 years ago by skymoo (Adam Mercer)
The attached patch will cause the selected compiler to be used when building the entire port instead of the just the fortran wrappers. This isn't a complete patch as with this applied the variant descriptions are no longer correct, they currently state that the gcc*
variants: "create Fortran wrappers using gcc*
". But after the application of this patch, the whole port is built using this compiler, so if this patch is applied then these variant descriptions will also need to change. In addition it also needs to be ported to fftw-3-single
and fftw-3-long
so all fftw-3
ports are consistent.
comment:10 Changed 12 years ago by s.schwandter@…
Hi! I'm the original bug reporter, but due to my old email address not working anymore, I had to create a new account.
The patch does exactly what I was suggesting, yes.
comment:11 Changed 12 years ago by skymoo (Adam Mercer)
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
I modified the gcc variants in r97612 so that the entire toolchain is used, and not just the fortran compiler.
Here is the missing info (can't change the summary):
fftw-3 @3.3 +gcc46
XCode 4.2.1 OS X 10.7.2