Hi, I have just been given some fortran source, which I need to compile, so I was curious to know whether a fortran compiler existed as part of MacPorts? There doesn't seem to be a Fortran compiler as part of the basic gcc installers that comes with XCode, at least there doesn't seem to be an f77 command. Andre PS I had sent this before, but its been a few hours and it hasn't appeared on the list, so trying again.
Andre-John Mas wrote:
Hi,
I have just been given some fortran source, which I need to compile, so I was curious to know whether a fortran compiler existed as part of MacPorts? There doesn't seem to be a Fortran compiler as part of the basic gcc installers that comes with XCode, at least there doesn't seem to be an f77 command.
If you want to use the gcc4.3 or g77 fortran compiler in a packaged form (i.e. not using MacPorts) then you can download it from: http://hpc.sourceforge.net/ There are a lot of other goodies there so it is worth visiting this site David Rowe
On 6-Jun-07, at 05:11 , David Rowe wrote:
Andre-John Mas wrote:
Hi,
I have just been given some fortran source, which I need to compile, so I was curious to know whether a fortran compiler existed as part of MacPorts? There doesn't seem to be a Fortran compiler as part of the basic gcc installers that comes with XCode, at least there doesn't seem to be an f77 command.
If you want to use the gcc4.3 or g77 fortran compiler in a packaged form (i.e. not using MacPorts) then you can download it from: http://hpc.sourceforge.net/
There are a lot of other goodies there so it is worth visiting this site
This is what I ended up doing, since the MacPorts flavours just weren't working for me. I installed g77 and then made a symbolic link f77 -> g77. I now have the source of the project compiling, but the linking seems to be failing. Any help would be appreciated, since I am a total newbie when it comes to Fortran and compiling Fortran applications. I am actually trying to help out a friend who needs this tool. The application is 'Curves': http://www.ibpc.fr/UPR9080/Curindex.html Below are the results of the build: $ make f77 -static -c aacur.f f77 -static -c analy.f f77 -static -c aver.f f77 -static -c axeint.f f77 -static -c bacint.f f77 -static -c backbo.f f77 -static -c bonder.f f77 -static -c calc.f f77 -static -c cubspl.f f77 -static -c deriv.f f77 -static -c diff.f f77 -static -c eigen.f f77 -static -c grads.f f77 -static -c gradt.f f77 -static -c grgrap.f f77 -static -c groove.f f77 -static -c input.f f77 -static -c locate.f f77 -static -c locpar.f f77 -static -c lsfit.f f77 -static -c mc11a.f f77 -static -c minfor.f f77 -static -c move.f f77 -static -c nml.f f77 -static -c outaxe.f f77 -static -c params.f f77 -static -c pdbout.f f77 -static -c plate.f f77 -static -c setd.f f77 -static -c setend.f f77 -static -c setup.f f77 -static -c title.f f77 -static -c torp.f f77 -static -c up.f f77 aacur.o analy.o aver.o axeint.o bacint.o backbo.o bonder.o calc.o cubspl.o deriv.o diff.o eigen.o grads.o gradt.o grgrap.o groove.o input.o locate.o locpar.o lsfit.o mc11a.o minfor.o move.o nml.o outaxe.o params.o pdbout.o plate.o setd.o setend.o setup.o title.o torp.o up.o -o Cur5_s /usr/bin/ld: aacur.o has external relocation entries in non-writable section (__TEXT,__text) for symbols: _s_stop _f_clos _e_wsfe _do_fio _s_wsfe _f_open _s_cat _i_indx _s_cmp _e_wsle _do_lio _s_wsle _s_copy _e_rsle _s_rsle _e_rsfe _s_rsfe collect2: ld returned 1 exit status make: *** [Cur5_s] Error 1
Hi Andre-John, On 07.06.2007, at 18:56, Andre-John Mas wrote:
since the MacPorts flavours just weren't working for me.
Since this is a MacPorts list, I will try to help you with that... What did you try in order to get a MacPorts installed fortran compiler? Did you successfully install MacPorts using its automatic installer? Could you update it? You do that by running sudo port selfupdate on the command-line. Then you can install the current GCC release, which includes gfortran, by running sudo port install gcc42 Does that work? If not, what is the output of the following command? sudo port -vd install gcc42 If all this helps, you ought to be able to set the Fortran compiler and the linker in the Makefile to gfortran-mp-4.2 This is actually /opt/local/bin/gfortran-mp-4.2 Hope this helps. If you continue to have problems with MacPorts, please feel free to ask on this mailing list. Greetings, Jochen -- Einigkeit und Recht und Freiheit http://www.Jochen- Kuepper.de Liberté, Égalité, Fraternité GnuPG key: CC1B0B4D Sex, drugs and rock-n-roll
participants (3)
-
Andre-John Mas
-
David Rowe
-
Jochen Küpper