![](https://secure.gravatar.com/avatar/b4929294417e9ac44c17967baae75a36.jpg?s=120&d=mm&r=g)
Hi, I have the latest version of Mandrake, which has no g77, only gfortran - and needed the following patch to compile (with some added g77, gfortran outputs): Index: numpy/distutils/fcompiler/gnu.py =================================================================== --- numpy/distutils/fcompiler/gnu.py (revision 2033) +++ numpy/distutils/fcompiler/gnu.py (working copy) @@ -20,8 +20,13 @@ # GNU Fortran (GCC) 3.3.3 (Debian 20040401) # GNU Fortran 0.5.25 20010319 (prerelease) # Redhat: GNU Fortran (GCC 3.2.2 20030222 (Red Hat Linux 3.2.2-5)) 3.2.2 20030222 (Red Hat Linux 3.2.2-5) + # Mandrake: GNU Fortran (GCC) 3.3.6 (Mandrakelinux release 3.3.6-2mdk) + # + # 'gfortran --version' results + # Redhat: GNU Fortran 95 (GCC 4.0.2 20051125 (Red Hat 4.0.2-8)) + # Mandrake: GNU Fortran 95 (GCC 4.0.1 (4.0.1-5mdk for Mandriva Linux release 2006.0)) - for fc_exe in map(find_executable,['g77','f77']): + for fc_exe in map(find_executable,['g77','f77','gfortran']): if os.path.isfile(fc_exe): break executables = { @@ -41,7 +46,10 @@ if os.name != 'nt' and sys.platform!='cygwin': pic_flags = ['-fPIC'] - g2c = 'g2c' + if os.path.basename(fc_exe) == 'gfortran': + g2c = 'gfortran' + else: + g2c = 'g2c' #def get_linker_so(self): # # win32 linking should be handled by standard linker Can I suggest this a patch to svn numpy? Thanks, Matthew
![](https://secure.gravatar.com/avatar/38d5ac232150013cbf1a4639538204c0.jpg?s=120&d=mm&r=g)
Hi, Perhaps it would also make sense to add g95 (http://g95.sourceforge.net/ or g95.org) which is different than gfortran ( http://gcc.gnu.org/wiki/TheOtherGCCBasedFortranCompiler). Regards Bruce On 1/31/06, Matthew Brett <matthew.brett@gmail.com> wrote:
![](https://secure.gravatar.com/avatar/b4929294417e9ac44c17967baae75a36.jpg?s=120&d=mm&r=g)
Oops - sorry, I completely missed that - and thanks a lot for the pointer. For those as slow as I am, the build command seemed to be: python setup.py config --fcompiler=gnu95 build I am afraid this is a sign that I am lost in the build system. Is there a good place to start to get to grips with options like the above? And, is there a simple way to pass my favorite compiler optimization flags into the build? Thanks a lot, Matthew
![](https://secure.gravatar.com/avatar/38d5ac232150013cbf1a4639538204c0.jpg?s=120&d=mm&r=g)
Hi, Perhaps it would also make sense to add g95 (http://g95.sourceforge.net/ or g95.org) which is different than gfortran ( http://gcc.gnu.org/wiki/TheOtherGCCBasedFortranCompiler). Regards Bruce On 1/31/06, Matthew Brett <matthew.brett@gmail.com> wrote:
![](https://secure.gravatar.com/avatar/b4929294417e9ac44c17967baae75a36.jpg?s=120&d=mm&r=g)
Oops - sorry, I completely missed that - and thanks a lot for the pointer. For those as slow as I am, the build command seemed to be: python setup.py config --fcompiler=gnu95 build I am afraid this is a sign that I am lost in the build system. Is there a good place to start to get to grips with options like the above? And, is there a simple way to pass my favorite compiler optimization flags into the build? Thanks a lot, Matthew
participants (3)
-
Bruce Southey
-
Matthew Brett
-
Pearu Peterson