distutils seems to pick the wrong fortran compiler flags

Aug. 5, 2013
5:09 p.m.
Hi, I'm using f2py shipping with EPD 32 bit on 64 bit Mac OS 10.8. The command "f2py -c -m plot3d --fcompiler=gnu95 plot3d.f90" compiles the objects files in 32 bit, which is good, but fails at the linkage step with a "file was built for i386 which is not the architecture being linked (x86_64)" warning. See this post for a full output: http://stackoverflow.com/questions/18003399/wrapping-32-bit-libraries-with-f... My solution was to hack numpy/distutils/fcompiler/gnu.py by explicitly adding the "-m32" flag to the "compiler_f77", "compiler_f90" and "linker_so" keys of the "executables" dictionary of the "Gnu95FCompiler" class (line 251). I'm sure there's a nicer way to do that though... -- Hugo Gagnon
4208
Age (days ago)
4208
Last active (days ago)
0 comments
1 participants
participants (1)
-
Hugo Gagnon