[CCP14 Home: (Frames | No Frames)]
CCP14 Mirrors: [UK] | [CA] | [US] | [AU]

(This Webpage Page in No Frames Mode)

CCP14

Methods, Problems and Solutions

BSD UNIX Information for Crystallography

Installing EGCS G77 Fortran 77 on FreeBSD 3.3

The CCP14 Homepage is at http://www.ccp14.ac.uk

[Back to Problems and Solutions]
[Back to: BSD UNIX Information for Crystallography] [To: Linux Information for Crystallography]

Acknowledgements

Thanks to assistance from Matthew Seaman,

FreeBSD: The Power to Serve

(Last update 31 October, as gcc-2.95.1 has been updated by gcc-2.95.2. The old version has disappeared from the FTP sites so some custom modifications are required to the Makefile script)

Disclaimer

Note: Because of variations in install, multiple toolsets, (never knowing whether a previous install might have affected the next one); some/all(?) of the following information might be wrong; and there are probably better methods for doing the following. Keep this in mind and feel free to think a bit before blindly following the instructions.

FreeBSD comes with an f2c type system for compiling Fortran programs which can cause difficulties/nuances when compiling up crystallographic Fortran programs written more for a pure GNU G77 compiler.

However, FreeBSD has a very nifty package distribution system which also allows the downloading of the egcs compiler which comes with G77. As this is not part of the canned binary distribution, Makefiles exists that will download the latest source from the home website and compile it up. Then all you need to do is a make install to install. This is normally done as root.

After installation, the GNU Fortran compiler should be called using the command g77.


Assuming you have installed the posts distribution. (if not, as root, run /stand/sysinstall and install the packages distribution). As root, enter the /usr/ports/lang/egcs directory.


As gcc-2.95.1 has been updated by gcc-2.95.2, edit Makefile and substitute the reference to gcc-2.95.1 with gcc-2.95.2

Type make NO_CHECKSUM=yes

FreeBSD will then try and download the egcs distribution and then configure and compiler up the system up. This may take a while and it could be good to go and have a cup of tea at this point. (Normally you would only have to type "make" but the upgrade of gcc has created some complications)


When FreeBSD finishes compiling up egcs, type make install

FreeBSD will then install the compilers including G77. On some other terminal screens (if using csh), you may have to type rehash to have it register the updated programs.


A note about this

The slowest part of the above operation can be the download via FTP as defined in the makefile. This can also be impractical if on a dialup or very slow link. A way around this is to have already downloaded the files at a more convenient time and all you have to do is put these files in the /usr/port/distfiles directory in FreeBSD prior to running the above Makefile.

For the above distribution, the required files are:

  • bzip2-0.9.5c.tar.gz
  • gcc-core-2.95.2.tar.bz2
  • gcc-g++-2.95.2.tar.bz2
  • gcc-g77-2.95.2.tar.bz2
  • gcc-java-2.95.2.tar.bz2
  • gcc-objc-2.95.2.tar.bz2
  • make-3.77.tar.gz

Lists of GCC EGCS mirrors:

Some UK and other Mirror Sites:


[Back to Problems and Solutions]
[Back to: BSD UNIX Information for Crystallography] [To: Linux Information for Crystallography]

[CCP14 Home: (Frames | No Frames)]
CCP14 Mirrors: [UK] | [CA] | [US] | [AU]

(This Webpage Page in No Frames Mode)

If you have any queries or comments, please feel free to contact the CCP14